Mercurial > louis > kiibohd-controller
diff Output/pjrcUSB/output_com.c @ 224:138e5ca7f8e4
Preparing ARM for USB NKRO
- API changes from the AVR NKRO support
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Sun, 21 Sep 2014 16:29:53 -0700 |
parents | fc3b9cb190cc |
children | 9a3c9f6f4866 |
line wrap: on
line diff
--- a/Output/pjrcUSB/output_com.c Sun Sep 21 11:55:37 2014 -0700 +++ b/Output/pjrcUSB/output_com.c Sun Sep 21 16:29:53 2014 -0700 @@ -106,7 +106,7 @@ // Protocol setting from the host. // 0 - Boot Mode // 1 - NKRO Mode (Default, unless set by a BIOS or boot interface) -volatile uint8_t USBKeys_Protocol = 1; +volatile uint8_t USBKeys_Protocol = 0; // Indicate if USB should send update // OS only needs update if there has been a change in state @@ -379,29 +379,18 @@ // USB Data Send inline void Output_send() { - // Don't send update if USB has not changed - if ( !USBKeys_Changed ) - { - // Clear modifiers and keys - USBKeys_Modifiers = 0; - USBKeys_Sent = 0; - - return; - } - // Boot Mode Only, unset stale keys if ( USBKeys_Protocol == 0 ) for ( uint8_t c = USBKeys_Sent; c < USB_BOOT_MAX_KEYS; c++ ) USBKeys_Keys[c] = 0; - // Send keypresses + // Send keypresses while there are pending changes while ( USBKeys_Changed ) usb_keyboard_send(); // Clear modifiers and keys USBKeys_Modifiers = 0; USBKeys_Sent = 0; - USBKeys_Changed = USBKeyChangeState_None; // Signal Scan Module we are finished switch ( USBKeys_Protocol )