fix simple pull request comments. Implement descriptor index hack.

This commit is contained in:
Zachery Littell
2020-10-02 16:02:00 -05:00
parent 34775d909d
commit 081af79009
5 changed files with 25 additions and 47 deletions

View File

@@ -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);