diff options
| author | Ha Thach <[email protected]> | 2021-08-20 22:21:30 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-20 22:21:30 +0700 |
| commit | 58477b71f2989bc24480cb6e90dfd61506ec0ccd (patch) | |
| tree | d4ae041de9cf357208d8afc39eb91dc3ddeca28e /src/host/usbh_classdriver.h | |
| parent | aab133ac69aaf371b5270850588e5d1cd6fb6de1 (diff) | |
| parent | beb1a5c678dd50c3142d2c74a29e92affa0b06c9 (diff) | |
Merge pull request #1035 from hathach/improve-host-stack
Improve host stack
Diffstat (limited to 'src/host/usbh_classdriver.h')
| -rw-r--r-- | src/host/usbh_classdriver.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/host/usbh_classdriver.h b/src/host/usbh_classdriver.h index 0736fefa1..8bc2622aa 100644 --- a/src/host/usbh_classdriver.h +++ b/src/host/usbh_classdriver.h @@ -43,13 +43,11 @@ typedef struct { char const* name; #endif - uint8_t class_code; - - void (* const init )(void); - uint16_t (* const open )(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const * itf_desc, uint16_t max_len); - bool (* const set_config )(uint8_t dev_addr, uint8_t itf_num); - bool (* const xfer_cb )(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes); - void (* const close )(uint8_t dev_addr); + void (* const init )(void); + bool (* const open )(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const * itf_desc, uint16_t max_len); + bool (* const set_config )(uint8_t dev_addr, uint8_t itf_num); + bool (* const xfer_cb )(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes); + void (* const close )(uint8_t dev_addr); } usbh_class_driver_t; // Call by class driver to tell USBH that it has complete the enumeration @@ -73,6 +71,8 @@ bool usbh_edpt_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_ // If caller does not make any transfer, it must release endpoint for others. bool usbh_edpt_claim(uint8_t dev_addr, uint8_t ep_addr); +bool usbh_edpt_release(uint8_t dev_addr, uint8_t ep_addr); + // Check if endpoint transferring is complete bool usbh_edpt_busy(uint8_t dev_addr, uint8_t ep_addr); |
