diff options
| author | hathach <[email protected]> | 2019-03-27 08:52:25 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-03-27 08:52:25 -0700 |
| commit | 86c24b310509a368cc6a9dfbec43ce531e71d598 (patch) | |
| tree | 81fec0b3724083a3515ef09e0b7d601ce01ec621 /src/device/dcd.h | |
| parent | 547cc045fa1d8862e7e00c1d7b4a0026531d0098 (diff) | |
| parent | 38f7d281d44c69593f1de3885a292ee7c5c39355 (diff) | |
Merge pull request #49 from hathach/develop
clean up porting API
Diffstat (limited to 'src/device/dcd.h')
| -rw-r--r-- | src/device/dcd.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h index 95a187298..186c4af0c 100644 --- a/src/device/dcd.h +++ b/src/device/dcd.h @@ -94,24 +94,6 @@ void dcd_set_address(uint8_t rhport, uint8_t dev_addr); // Receive Set Config request
void dcd_set_config (uint8_t rhport, uint8_t config_num);
-// Get current frame number
-uint32_t dcd_get_frame_number(uint8_t rhport);
-
-/*------------------------------------------------------------------*/
-/* Event Function
- * Called by DCD to notify USBD
- *------------------------------------------------------------------*/
-void dcd_event_handler(dcd_event_t const * event, bool in_isr);
-
-// helper to send bus signal event
-void dcd_event_bus_signal (uint8_t rhport, dcd_eventid_t eid, bool in_isr);
-
-// helper to send setup received
-void dcd_event_setup_received(uint8_t rhport, uint8_t const * setup, bool in_isr);
-
-// helper to send transfer complete event
-void dcd_event_xfer_complete (uint8_t rhport, uint8_t ep_addr, uint32_t xferred_bytes, uint8_t result, bool in_isr);
-
/*------------------------------------------------------------------*/
/* Endpoint API
* - open : Configure endpoint's registers
@@ -120,7 +102,6 @@ void dcd_event_xfer_complete (uint8_t rhport, uint8_t ep_addr, uint32_t xferred_ * - busy : Check if endpoint transferring is complete (TODO remove)
* - stall : stall endpoint
* - clear_stall : clear stall
- * - stalled : check if stalled ( TODO remove )
*------------------------------------------------------------------*/
bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc);
bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes);
@@ -128,7 +109,21 @@ bool dcd_edpt_busy (uint8_t rhport, uint8_t ep_addr); void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr);
void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr);
-bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr);
+
+/*------------------------------------------------------------------*/
+/* Event Function
+ * Called by DCD to notify USBD
+ *------------------------------------------------------------------*/
+void dcd_event_handler(dcd_event_t const * event, bool in_isr);
+
+// helper to send bus signal event
+void dcd_event_bus_signal (uint8_t rhport, dcd_eventid_t eid, bool in_isr);
+
+// helper to send setup received
+void dcd_event_setup_received(uint8_t rhport, uint8_t const * setup, bool in_isr);
+
+// helper to send transfer complete event
+void dcd_event_xfer_complete (uint8_t rhport, uint8_t ep_addr, uint32_t xferred_bytes, uint8_t result, bool in_isr);
#ifdef __cplusplus
}
|
