X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fhost.c;h=8dd2abbee8d86048ff21ad9c9cd4c0b42054695e;hb=f427529a30487de45ebfbe6fbba9c290738878ab;hp=cc26d55c22b94b9d85f06503fad3160ccadafaf7;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git diff --git a/common/host.c b/common/host.c index cc26d55c..8dd2abbe 100644 --- a/common/host.c +++ b/common/host.c @@ -168,13 +168,16 @@ void host_mouse_send(report_mouse_t *report) void host_system_send(uint16_t data) { + static uint16_t last_data = 0; + if (data == last_data) return; + last_data = data; + if (!driver) return; (*driver->send_system)(data); } void host_consumer_send(uint16_t data) { - // TODO: this is needed? static uint16_t last_data = 0; if (data == last_data) return; last_data = data;