diff options
| author | hathach <[email protected]> | 2022-03-01 23:55:53 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-03-01 23:55:53 +0700 |
| commit | 1d29817139c473971ce239bbc2cb5924de4a644e (patch) | |
| tree | 70eb6f360fe993c0305e048dd2e2caf55ce325ab /src/host/hcd.h | |
| parent | c9b0fbc907495b393d0d76281ce6ed4ecf46c27c (diff) | |
start to add pio usb (host) support
run as proof of concept
Diffstat (limited to 'src/host/hcd.h')
| -rw-r--r-- | src/host/hcd.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h index 80500f048..9d10104f3 100644 --- a/src/host/hcd.h +++ b/src/host/hcd.h @@ -143,9 +143,20 @@ void hcd_device_close(uint8_t rhport, uint8_t dev_addr); // Endpoints API //--------------------------------------------------------------------+ -bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]); +// Open an endpoint bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc); + +// Submit a transfer, when complete hcd_event_xfer_complete() must be invoked bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen); + +// Submit a special transfer to send 8-byte Setup Packet, when complete hcd_event_xfer_complete() must be invoked +bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8]); + +// Optional: some controllers are capable of carry out the whole Control Transfer (setup, data, status) +// without help of USBH. +bool hcd_edpt_control_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet[8], uint8_t* data) TU_ATTR_WEAK; + +// clear stall, data toggle is also reset to DATA0 bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr); //--------------------------------------------------------------------+ |
