Skip to content

Commit dcbde3e

Browse files
committed
add weak attribute to HID callback
1 parent 2ab122c commit dcbde3e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/arduino/Adafruit_USBH_Host.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void Adafruit_USBH_Host::task(void) { tuh_task(); }
5252
// tuh_hid_parse_report_descriptor() can be used to parse common/simple enough
5353
// descriptor. Note: if report descriptor length > CFG_TUH_ENUMERATION_BUFSIZE,
5454
// it will be skipped therefore report_desc = NULL, desc_len = 0
55-
void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance,
55+
TU_ATTR_WEAK void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance,
5656
uint8_t const *desc_report, uint16_t desc_len) {
5757
(void)dev_addr;
5858
(void)instance;
@@ -61,13 +61,13 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance,
6161
}
6262

6363
// Invoked when device with hid interface is un-mounted
64-
void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance) {
64+
TU_ATTR_WEAK void tuh_hid_umount_cb(uint8_t dev_addr, uint8_t instance) {
6565
(void)dev_addr;
6666
(void)instance;
6767
}
6868

6969
// Invoked when received report from device via interrupt endpoint
70-
void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance,
70+
TU_ATTR_WEAK void tuh_hid_report_received_cb(uint8_t dev_addr, uint8_t instance,
7171
uint8_t const *report, uint16_t len) {
7272
(void)dev_addr;
7373
(void)instance;

0 commit comments

Comments
 (0)