summaryrefslogtreecommitdiff
path: root/src/device/usbd_pvt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd_pvt.h')
-rw-r--r--src/device/usbd_pvt.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h
index 29753451e..6fad46db3 100644
--- a/src/device/usbd_pvt.h
+++ b/src/device/usbd_pvt.h
@@ -48,7 +48,7 @@ typedef struct
uint16_t (* open ) (uint8_t rhport, tusb_desc_interface_t const * desc_intf, uint16_t max_len);
bool (* control_xfer_cb ) (uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);
bool (* xfer_cb ) (uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
- void (* sof ) (uint8_t rhport); /* optional */
+ void (* sof ) (uint8_t rhport, uint32_t frame_count); // optional
} usbd_class_driver_t;
// Invoked when initializing device stack to get additional class drivers.
@@ -62,6 +62,7 @@ void usbd_int_set(bool enabled);
//--------------------------------------------------------------------+
// USBD Endpoint API
+// Note: rhport should be 0 since device stack only support 1 rhport for now
//--------------------------------------------------------------------+
// Open an endpoint
@@ -102,6 +103,9 @@ bool usbd_edpt_ready(uint8_t rhport, uint8_t ep_addr)
return !usbd_edpt_busy(rhport, ep_addr) && !usbd_edpt_stalled(rhport, ep_addr);
}
+// Enable SOF interrupt
+void usbd_sof_enable(uint8_t rhport, bool en);
+
/*------------------------------------------------------------------*/
/* Helper
*------------------------------------------------------------------*/