diff options
| author | hathach <[email protected]> | 2021-08-23 17:00:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-08-23 17:00:41 +0700 |
| commit | 75cd593b609340b3101d0b002ac765c5595fa2eb (patch) | |
| tree | da79de4b89c6dce4e45097f6c3ddc4e81f753901 /src/host/hcd.h | |
| parent | a490a3fe616205115ed351ddbc0bd202bcbdc3db (diff) | |
add hcd_devtree_get_info()
remove usbh_hcd.h
Diffstat (limited to 'src/host/hcd.h')
| -rw-r--r-- | src/host/hcd.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h index e1d21bf45..eb53d2e80 100644 --- a/src/host/hcd.h +++ b/src/host/hcd.h @@ -92,6 +92,14 @@ enum { //#define HCD_MAX_ENDPOINT 16 //#define HCD_MAX_XFER 16 + +typedef struct { + uint8_t rhport; + uint8_t hub_addr; + uint8_t hub_port; + uint8_t speed; +} hcd_devtree_info_t; + #endif //--------------------------------------------------------------------+ @@ -145,6 +153,13 @@ bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr); // USBH implemented API //--------------------------------------------------------------------+ +// Get device tree information of a device +// USB device tree can be complicated and manged by USBH, this help HCD to retrieve +// needed topology info to carry out its work +extern void hcd_devtree_get_info(uint8_t dev_addr, hcd_devtree_info_t* devtree_info); + +//------------- Event API -------------// + // Called by HCD to notify stack extern void hcd_event_handler(hcd_event_t const* event, bool in_isr); |
