diff options
Diffstat (limited to 'common/keyboard.c')
| -rw-r--r-- | common/keyboard.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/common/keyboard.c b/common/keyboard.c index 5c2643c95..25f32eb02 100644 --- a/common/keyboard.c +++ b/common/keyboard.c | |||
| @@ -49,6 +49,7 @@ void keyboard_proc(void) | |||
| 49 | uint8_t fn_bits = 0; | 49 | uint8_t fn_bits = 0; |
| 50 | #ifdef EXTRAKEY_ENABLE | 50 | #ifdef EXTRAKEY_ENABLE |
| 51 | uint16_t consumer_code = 0; | 51 | uint16_t consumer_code = 0; |
| 52 | uint16_t system_code = 0; | ||
| 52 | #endif | 53 | #endif |
| 53 | 54 | ||
| 54 | matrix_scan(); | 55 | matrix_scan(); |
| @@ -89,22 +90,13 @@ void keyboard_proc(void) | |||
| 89 | #ifdef HOST_PJRC | 90 | #ifdef HOST_PJRC |
| 90 | if (suspend && remote_wakeup) { | 91 | if (suspend && remote_wakeup) { |
| 91 | usb_remote_wakeup(); | 92 | usb_remote_wakeup(); |
| 92 | } else { | ||
| 93 | host_system_send(SYSTEM_POWER_DOWN); | ||
| 94 | } | 93 | } |
| 95 | #else | ||
| 96 | host_system_send(SYSTEM_POWER_DOWN); | ||
| 97 | #endif | 94 | #endif |
| 98 | host_system_send(0); | 95 | system_code = SYSTEM_POWER_DOWN; |
| 99 | _delay_ms(500); | ||
| 100 | } else if (code == KB_SYSTEM_SLEEP) { | 96 | } else if (code == KB_SYSTEM_SLEEP) { |
| 101 | host_system_send(SYSTEM_SLEEP); | 97 | system_code = SYSTEM_SLEEP; |
| 102 | host_system_send(0); | ||
| 103 | _delay_ms(500); | ||
| 104 | } else if (code == KB_SYSTEM_WAKE) { | 98 | } else if (code == KB_SYSTEM_WAKE) { |
| 105 | host_system_send(SYSTEM_WAKE_UP); | 99 | system_code = SYSTEM_WAKE_UP; |
| 106 | host_system_send(0); | ||
| 107 | _delay_ms(500); | ||
| 108 | } | 100 | } |
| 109 | // Consumer Page | 101 | // Consumer Page |
| 110 | else if (code == KB_AUDIO_MUTE) { | 102 | else if (code == KB_AUDIO_MUTE) { |
| @@ -173,6 +165,7 @@ void keyboard_proc(void) | |||
| 173 | host_send_keyboard_report(); | 165 | host_send_keyboard_report(); |
| 174 | #ifdef EXTRAKEY_ENABLE | 166 | #ifdef EXTRAKEY_ENABLE |
| 175 | host_consumer_send(consumer_code); | 167 | host_consumer_send(consumer_code); |
| 168 | host_system_send(system_code); | ||
| 176 | #endif | 169 | #endif |
| 177 | #ifdef DEBUG_LED | 170 | #ifdef DEBUG_LED |
| 178 | // LED flash for debug | 171 | // LED flash for debug |
