Add experimental setting HOST_KEY_REPORT_DELAY
This commit is contained in:
parent
c56c35b5a9
commit
7995a9027d
|
@ -7,6 +7,8 @@
|
|||
#undef DEBOUNCE
|
||||
#define DEBOUNCE 50
|
||||
|
||||
#define HOST_KEY_REPORT_DELAY 20 //will impact matrix scan rate, but since debounce theoretically tracks in milliseconds, maybe it'll be fine?
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 135
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <util/delay.h> /* for _delay_ms() */
|
||||
#include "keyboard.h"
|
||||
#include "keycode.h"
|
||||
#include "host.h"
|
||||
|
@ -86,6 +87,10 @@ void host_keyboard_send(report_keyboard_t *report) {
|
|||
#endif
|
||||
(*driver->send_keyboard)(report);
|
||||
|
||||
#ifdef HOST_KEY_REPORT_DELAY
|
||||
_delay_ms(HOST_KEY_REPORT_DELAY);
|
||||
#endif
|
||||
|
||||
if (debug_keyboard) {
|
||||
dprintf("keyboard_report: %02X | ", report->mods);
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
|
@ -100,6 +105,10 @@ void host_nkro_send(report_nkro_t *report) {
|
|||
report->report_id = REPORT_ID_NKRO;
|
||||
(*driver->send_nkro)(report);
|
||||
|
||||
#ifdef HOST_KEY_REPORT_DELAY
|
||||
_delay_ms(HOST_KEY_REPORT_DELAY);
|
||||
#endif
|
||||
|
||||
if (debug_keyboard) {
|
||||
dprintf("nkro_report: %02X | ", report->mods);
|
||||
for (uint8_t i = 0; i < NKRO_REPORT_BITS; i++) {
|
||||
|
|
Loading…
Reference in New Issue