Skip to content

Commit 81efcf7

Browse files
committed
enable usbd hid in core
1 parent 35b6128 commit 81efcf7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cores/nRF5/usb/Adafruit_TinyUSB_core/tinyusb/src/class/hid/hid_device.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len);
6060
// Invoked when receiving GET_REPORT control request
6161
// Application must fill buffer report's content and return its length.
6262
// Return zero will cause the stack to STALL request
63-
uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen);
63+
ATTR_WEAK uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen);
6464

6565
// Invoked when receiving SET_REPORT control request
66-
void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
66+
ATTR_WEAK void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
6767

6868
// Invoked when host switch mode Boot <-> Report via SET_PROTOCOL request
69-
void tud_hid_mode_changed_cb(uint8_t boot_mode) ATTR_WEAK;
69+
ATTR_WEAK void tud_hid_mode_changed_cb(uint8_t boot_mode);
7070

7171
//--------------------------------------------------------------------+
7272
// KEYBOARD API

cores/nRF5/usb/tusb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
//------------- CLASS -------------//
5656
#define CFG_TUD_CDC 1
5757
#define CFG_TUD_MSC 1
58-
#define CFG_TUD_HID 0
58+
#define CFG_TUD_HID 1
5959

6060
#define CFG_TUD_MIDI 0
6161
#define CFG_TUD_CUSTOM_CLASS 0

0 commit comments

Comments
 (0)