30#include "common/tusb_common.h"
32#include "common/tusb_fifo.h"
44#ifndef CFG_TUH_ENDPOINT_MAX
45 #define CFG_TUH_ENDPOINT_MAX 16
58 HCD_EVENT_DEVICE_ATTACH,
59 HCD_EVENT_DEVICE_REMOVE,
60 HCD_EVENT_XFER_COMPLETE,
113bool hcd_dcache_clean(
void const* addr, uint32_t data_size) TU_ATTR_WEAK;
117bool hcd_dcache_invalidate(
void const* addr, uint32_t data_size) TU_ATTR_WEAK;
121bool hcd_dcache_clean_invalidate(
void const* addr, uint32_t data_size) TU_ATTR_WEAK;
128bool hcd_configure(uint8_t rhport, uint32_t cfg_id,
const void* cfg_param) TU_ATTR_WEAK;
131bool hcd_init(uint8_t rhport);
134void hcd_int_handler(uint8_t rhport);
137void hcd_int_enable (uint8_t rhport);
140void hcd_int_disable(uint8_t rhport);
143uint32_t hcd_frame_number(uint8_t rhport);
150bool hcd_port_connect_status(uint8_t rhport);
153void hcd_port_reset(uint8_t rhport);
156void hcd_port_reset_end(uint8_t rhport);
162void hcd_device_close(uint8_t rhport, uint8_t dev_addr);
172bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t * buffer, uint16_t buflen);
176bool hcd_edpt_abort_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr);
179bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t
const setup_packet[8]);
182bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr);
196extern void hcd_event_handler(
hcd_event_t const* event,
bool in_isr);
199TU_ATTR_ALWAYS_INLINE
static inline
200void hcd_event_device_attach(uint8_t rhport,
bool in_isr)
203 event.rhport = rhport;
204 event.event_id = HCD_EVENT_DEVICE_ATTACH;
205 event.connection.hub_addr = 0;
206 event.connection.hub_port = 0;
208 hcd_event_handler(&event, in_isr);
212TU_ATTR_ALWAYS_INLINE
static inline
213void hcd_event_device_remove(uint8_t rhport,
bool in_isr)
216 event.rhport = rhport;
217 event.event_id = HCD_EVENT_DEVICE_REMOVE;
218 event.connection.hub_addr = 0;
219 event.connection.hub_port = 0;
221 hcd_event_handler(&event, in_isr);
225TU_ATTR_ALWAYS_INLINE
static inline
226void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint32_t xferred_bytes, xfer_result_t result,
bool in_isr)
231 .event_id = HCD_EVENT_XFER_COMPLETE,
232 .dev_addr = dev_addr,
234 event.xfer_complete.ep_addr = ep_addr;
235 event.xfer_complete.result = result;
236 event.xfer_complete.len = xferred_bytes;
238 hcd_event_handler(&event, in_isr);
tusb_speed_t
defined base on EHCI specs value for Endpoint Speed
Definition tusb_types.h:48
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647