diff options
| -rw-r--r-- | tmk_core/protocol/arm_atsam/main_arm_atsam.c | 2 | ||||
| -rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 2 | ||||
| -rw-r--r-- | tmk_core/protocol/vusb/vusb.c | 12 |
3 files changed, 6 insertions, 10 deletions
diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index e15d51a26..9c8073dd9 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c | |||
| @@ -131,7 +131,7 @@ void send_extra(uint8_t report_id, uint16_t data) { | |||
| 131 | void send_system(uint16_t data) { | 131 | void send_system(uint16_t data) { |
| 132 | #ifdef EXTRAKEY_ENABLE | 132 | #ifdef EXTRAKEY_ENABLE |
| 133 | if (data != 0) data = data - SYSTEM_POWER_DOWN + 1; | 133 | if (data != 0) data = data - SYSTEM_POWER_DOWN + 1; |
| 134 | send_extra(REPORT_ID_SYSTEM, data); | 134 | send_extra(REPORT_ID_SYSTEM, data); |
| 135 | #endif // EXTRAKEY_ENABLE | 135 | #endif // EXTRAKEY_ENABLE |
| 136 | } | 136 | } |
| 137 | 137 | ||
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 792db4340..933b212c9 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -700,7 +700,7 @@ static void send_system(uint16_t data) { | |||
| 700 | */ | 700 | */ |
| 701 | static void send_consumer(uint16_t data) { | 701 | static void send_consumer(uint16_t data) { |
| 702 | #ifdef EXTRAKEY_ENABLE | 702 | #ifdef EXTRAKEY_ENABLE |
| 703 | uint8_t where = where_to_send(); | 703 | uint8_t where = where_to_send(); |
| 704 | 704 | ||
| 705 | # ifdef BLUETOOTH_ENABLE | 705 | # ifdef BLUETOOTH_ENABLE |
| 706 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { | 706 | if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { |
diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 71263344f..110b3069b 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c | |||
| @@ -113,10 +113,10 @@ static void send_mouse(report_mouse_t *report) { | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static void send_extra(uint8_t report_id, uint16_t data) { | 115 | static void send_extra(uint8_t report_id, uint16_t data) { |
| 116 | static uint8_t last_id = 0; | 116 | static uint8_t last_id = 0; |
| 117 | static uint16_t last_data = 0; | 117 | static uint16_t last_data = 0; |
| 118 | if ((report_id == last_id) && (data == last_data)) return; | 118 | if ((report_id == last_id) && (data == last_data)) return; |
| 119 | last_id = report_id; | 119 | last_id = report_id; |
| 120 | last_data = data; | 120 | last_data = data; |
| 121 | 121 | ||
| 122 | report_extra_t report = {.report_id = report_id, .usage = data}; | 122 | report_extra_t report = {.report_id = report_id, .usage = data}; |
| @@ -125,13 +125,9 @@ static void send_extra(uint8_t report_id, uint16_t data) { | |||
| 125 | } | 125 | } |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static void send_system(uint16_t data) { | 128 | static void send_system(uint16_t data) { send_extra(REPORT_ID_SYSTEM, data); } |
| 129 | send_extra(REPORT_ID_SYSTEM, data); | ||
| 130 | } | ||
| 131 | 129 | ||
| 132 | static void send_consumer(uint16_t data) { | 130 | static void send_consumer(uint16_t data) { send_extra(REPORT_ID_CONSUMER, data); } |
| 133 | send_extra(REPORT_ID_CONSUMER, data); | ||
| 134 | } | ||
| 135 | 131 | ||
| 136 | /*------------------------------------------------------------------* | 132 | /*------------------------------------------------------------------* |
| 137 | * Request from host * | 133 | * Request from host * |
