summaryrefslogtreecommitdiff
path: root/src/device/dcd.h
diff options
context:
space:
mode:
authorReinhard Panhuber <[email protected]>2020-07-25 14:26:24 +0200
committerReinhard Panhuber <[email protected]>2020-07-25 14:26:24 +0200
commite047fbe8fbc4727cee1fa720b82d4d6918a2d6c0 (patch)
tree6de402b58f82c14d7fc516c2351650ae3059ab94 /src/device/dcd.h
parentd91843bcd21262658b43480240e5dfc2b7d7bd20 (diff)
parent60355720364f66fff7856c3de1d18382f7912e31 (diff)
Merge remote-tracking branch 'upstream/master' into uac2
Diffstat (limited to 'src/device/dcd.h')
-rw-r--r--src/device/dcd.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 68798c259..a4635346b 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -60,11 +60,17 @@ typedef struct TU_ATTR_ALIGNED(4)
uint8_t rhport;
uint8_t event_id;
- union {
- // USBD_EVT_SETUP_RECEIVED
+ union
+ {
+ // BUS RESET
+ struct {
+ tusb_speed_t speed;
+ } bus_reset;
+
+ // SETUP_RECEIVED
tusb_control_request_t setup_received;
- // USBD_EVT_XFER_COMPLETE
+ // XFER_COMPLETE
struct {
uint8_t ep_addr;
uint8_t result;
@@ -143,6 +149,9 @@ extern void dcd_event_handler(dcd_event_t const * event, bool in_isr);
// helper to send bus signal event
extern void dcd_event_bus_signal (uint8_t rhport, dcd_eventid_t eid, bool in_isr);
+// helper to send bus reset event
+extern void dcd_event_bus_reset (uint8_t rhport, tusb_speed_t speed, bool in_isr);
+
// helper to send setup received
extern void dcd_event_setup_received(uint8_t rhport, uint8_t const * setup, bool in_isr);