diff options
Diffstat (limited to 'common/host.c')
| -rw-r--r-- | common/host.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/host.c b/common/host.c index cc26d55c2..8dd2abbee 100644 --- a/common/host.c +++ b/common/host.c | |||
| @@ -168,13 +168,16 @@ void host_mouse_send(report_mouse_t *report) | |||
| 168 | 168 | ||
| 169 | void host_system_send(uint16_t data) | 169 | void host_system_send(uint16_t data) |
| 170 | { | 170 | { |
| 171 | static uint16_t last_data = 0; | ||
| 172 | if (data == last_data) return; | ||
| 173 | last_data = data; | ||
| 174 | |||
| 171 | if (!driver) return; | 175 | if (!driver) return; |
| 172 | (*driver->send_system)(data); | 176 | (*driver->send_system)(data); |
| 173 | } | 177 | } |
| 174 | 178 | ||
| 175 | void host_consumer_send(uint16_t data) | 179 | void host_consumer_send(uint16_t data) |
| 176 | { | 180 | { |
| 177 | // TODO: this is needed? | ||
| 178 | static uint16_t last_data = 0; | 181 | static uint16_t last_data = 0; |
| 179 | if (data == last_data) return; | 182 | if (data == last_data) return; |
| 180 | last_data = data; | 183 | last_data = data; |
