adding new hcd api, tested working with control xfer.

- hcd_edpt_open
- hcd_edpt_xfer
- hcd_edpt_xfer
This commit is contained in:
hathach
2018-12-07 17:31:35 +07:00
parent 9b74f0e98f
commit 13d08cd636
3 changed files with 144 additions and 44 deletions

View File

@@ -123,6 +123,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
//--------------------------------------------------------------------+