Skip to content

Commit 4c6e9ce

Browse files
committed
make webusb tud_vendor_control_xfer_cb() weak by default to be overwritable for user sketch
1 parent e92d597 commit 4c6e9ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/arduino/webusb/Adafruit_USBD_WebUSB.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ uint8_t const *tud_descriptor_bos_cb(void) { return desc_bos; }
251251
// Driver response accordingly to the request and the transfer stage
252252
// (setup/data/ack) return false to stall control endpoint (e.g unsupported
253253
// request)
254-
bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage,
255-
tusb_control_request_t const *request) {
254+
TU_ATTR_WEAK bool
255+
tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage,
256+
tusb_control_request_t const *request) {
256257
if (!_webusb_dev) {
257258
return false;
258259
}

0 commit comments

Comments
 (0)