summaryrefslogtreecommitdiff
path: root/src/host/hcd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-12-07 17:31:35 +0700
committerhathach <[email protected]>2018-12-07 17:31:35 +0700
commit13d08cd63681c20d30e07e8fdcb4ac8d863453a5 (patch)
tree3fb10a1f6054f9a6f33a200b907a0245f98f7d19 /src/host/hcd.h
parent9b74f0e98f267c5fe650f501b500c2b8413f4e27 (diff)
adding new hcd api, tested working with control xfer.
- hcd_edpt_open - hcd_edpt_xfer - hcd_edpt_xfer
Diffstat (limited to 'src/host/hcd.h')
-rw-r--r--src/host/hcd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h
index 104c78a36..94ee8d0fa 100644
--- a/src/host/hcd.h
+++ b/src/host/hcd.h
@@ -124,6 +124,15 @@ void hcd_int_disable(uint8_t rhport);
void hcd_event_handler(hcd_event_t const* event, bool in_isr);
//--------------------------------------------------------------------+
+// Endpoints API
+//--------------------------------------------------------------------+
+bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const* ep_desc);
+bool hcd_edpt_close(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr);
+bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen);
+
+bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]);
+
+//--------------------------------------------------------------------+
// PIPE API
//--------------------------------------------------------------------+
// TODO control xfer should be used via usbh layer