fix simple pull request comments. Implement descriptor index hack.
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
#include "bsp/board.h"
|
||||
#include "tusb.h"
|
||||
|
||||
#include "usb_descriptors.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO CONSTANT TYPEDEF PROTYPES
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -138,13 +136,13 @@ void hid_task(void)
|
||||
uint8_t keycode[6] = { 0 };
|
||||
keycode[0] = HID_KEY_A;
|
||||
|
||||
tud_hid_n_keyboard_report(keyboard_interface, REPORT_ID_KEYBOARD, 0, keycode);
|
||||
tud_hid_n_keyboard_report(keyboard_interface, 0, 0, keycode);
|
||||
|
||||
has_key = true;
|
||||
}else
|
||||
{
|
||||
// send empty key report if previously has key pressed
|
||||
if (has_key) tud_hid_n_keyboard_report(keyboard_interface, REPORT_ID_KEYBOARD, 0, NULL);
|
||||
if (has_key) tud_hid_n_keyboard_report(keyboard_interface, 0, 0, NULL);
|
||||
has_key = false;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +155,7 @@ void hid_task(void)
|
||||
int8_t const delta = 5;
|
||||
|
||||
// no button, right + down, no scroll pan
|
||||
tud_hid_n_mouse_report(mouse_interface, REPORT_ID_MOUSE, 0x00, delta, delta, 0, 0);
|
||||
tud_hid_n_mouse_report(mouse_interface, 0, 0x00, delta, delta, 0, 0);
|
||||
|
||||
// delay a bit before attempt to send keyboard report
|
||||
board_delay(10);
|
||||
|
||||
Reference in New Issue
Block a user