diff options
| author | tmk <nobody@nowhere> | 2013-07-24 00:43:40 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-07-24 00:43:55 +0900 |
| commit | c7d309e34bf5d05f245811389bea495d814e2111 (patch) | |
| tree | 5812fd31a0c58c74d252bb638a736ee133cfa7c0 /common/bootmagic.c | |
| parent | 7e5081b5a8f2c6e0c3c8d2dc73717c0b3597ef84 (diff) | |
| parent | 05225dd9d8b666fec75ff5f1824f82fdfe7c0a77 (diff) | |
| download | qmk_firmware-c7d309e34bf5d05f245811389bea495d814e2111.tar.gz qmk_firmware-c7d309e34bf5d05f245811389bea495d814e2111.zip | |
Merge branch 'bootmagic_salt'(Fix issue #41)
Diffstat (limited to 'common/bootmagic.c')
| -rw-r--r-- | common/bootmagic.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/bootmagic.c b/common/bootmagic.c index 11eef3c3c..410dc6836 100644 --- a/common/bootmagic.c +++ b/common/bootmagic.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include "bootloader.h" | 5 | #include "bootloader.h" |
| 6 | #include "debug.h" | 6 | #include "debug.h" |
| 7 | #include "keymap.h" | 7 | #include "keymap.h" |
| 8 | #include "action_layer.h" | ||
| 8 | #include "eeconfig.h" | 9 | #include "eeconfig.h" |
| 9 | #include "bootmagic.h" | 10 | #include "bootmagic.h" |
| 10 | 11 | ||
| @@ -94,7 +95,7 @@ void bootmagic(void) | |||
| 94 | } | 95 | } |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | bool bootmagic_scan_keycode(uint8_t keycode) | 98 | static bool scan_keycode(uint8_t keycode) |
| 98 | { | 99 | { |
| 99 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { | 100 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { |
| 100 | matrix_row_t matrix_row = matrix_get_row(r); | 101 | matrix_row_t matrix_row = matrix_get_row(r); |
| @@ -108,3 +109,10 @@ bool bootmagic_scan_keycode(uint8_t keycode) | |||
| 108 | } | 109 | } |
| 109 | return false; | 110 | return false; |
| 110 | } | 111 | } |
| 112 | |||
| 113 | bool bootmagic_scan_keycode(uint8_t keycode) | ||
| 114 | { | ||
| 115 | if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false; | ||
| 116 | |||
| 117 | return scan_keycode(keycode); | ||
| 118 | } | ||
