summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd.h')
-rw-r--r--src/device/usbd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 943b1c79b..a77110bde 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -59,6 +59,14 @@ static inline bool tud_ready(void)
// Remote wake up host, only if suspended and enabled by host
bool tud_remote_wakeup(void);
+// Carry out Data and Status stage of control transfer
+// - If len = 0, it is equivalent to sending status only
+// - If len > wLength : it will be truncated
+bool tud_control_xfer(uint8_t rhport, tusb_control_request_t const * request, void* buffer, uint16_t len);
+
+// Send STATUS (zero length) packet
+bool tud_control_status(uint8_t rhport, tusb_control_request_t const * request);
+
//--------------------------------------------------------------------+
// Application Callbacks (WEAK is optional)
//--------------------------------------------------------------------+
@@ -92,6 +100,10 @@ TU_ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en);
// Invoked when usb bus is resumed
TU_ATTR_WEAK void tud_resume_cb(void);
+// Invoked when received control request with VENDOR TYPE
+TU_ATTR_WEAK bool tud_control_vendor_request_cb(uint8_t rhport, tusb_control_request_t const * request);
+TU_ATTR_WEAK bool tud_control_vendor_complete_cb(uint8_t rhport, tusb_control_request_t const * request);
+
//--------------------------------------------------------------------+
// Descriptor Templates
//--------------------------------------------------------------------+