From 4c6e9ce4e09af2c1d57aa6585579be7bf9b83c80 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 8 Aug 2024 16:30:31 +0700 Subject: [PATCH] make webusb tud_vendor_control_xfer_cb() weak by default to be overwritable for user sketch --- src/arduino/webusb/Adafruit_USBD_WebUSB.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arduino/webusb/Adafruit_USBD_WebUSB.cpp b/src/arduino/webusb/Adafruit_USBD_WebUSB.cpp index 593fd2e2..cf34e249 100644 --- a/src/arduino/webusb/Adafruit_USBD_WebUSB.cpp +++ b/src/arduino/webusb/Adafruit_USBD_WebUSB.cpp @@ -251,8 +251,9 @@ uint8_t const *tud_descriptor_bos_cb(void) { return desc_bos; } // Driver response accordingly to the request and the transfer stage // (setup/data/ack) return false to stall control endpoint (e.g unsupported // request) -bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, - tusb_control_request_t const *request) { +TU_ATTR_WEAK bool +tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, + tusb_control_request_t const *request) { if (!_webusb_dev) { return false; }