14#ifndef ZEPHYR_INCLUDE_USBH_H_
15#define ZEPHYR_INCLUDE_USBH_H_
49#define USBH_CONTROLLER_DEFINE(device_name, uhc_dev) \
50 static STRUCT_SECTION_ITERABLE(usbh_contex, device_name) = { \
51 .name = STRINGIFY(device_name), \
52 .mutex = Z_MUTEX_INITIALIZER(device_name.mutex), \
94#define USBH_DEFINE_CLASS(name) \
95 static STRUCT_SECTION_ITERABLE(usbh_class_data, name)
struct _dnode sys_dlist_t
Doubly-linked list structure.
Definition dlist.h:50
int usbh_shutdown(struct usbh_contex *const uhs_ctx)
Shutdown the USB host support.
int usbh_disable(struct usbh_contex *uhs_ctx)
Disable the USB host support.
int usbh_init(struct usbh_contex *uhs_ctx)
Initialize the USB host support;.
int usbh_enable(struct usbh_contex *uhs_ctx)
Enable the USB host support and class instances.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:411
Mutex Structure.
Definition kernel.h:3004
UHC endpoint buffer info.
Definition uhc.h:49
USB host class data and class instance API.
Definition usbh.h:71
int(* request)(struct usbh_contex *const uhs_ctx, struct uhc_transfer *const xfer, int err)
Initialization of the class implementation.
Definition usbh.h:78
int(* rwup)(struct usbh_contex *const uhs_ctx)
Bus remote wakeup handler
Definition usbh.h:85
struct usbh_code_triple code
Class code supported by this instance.
Definition usbh.h:73
int(* connected)(struct usbh_contex *const uhs_ctx)
Device connected handler
Definition usbh.h:81
int(* resumed)(struct usbh_contex *const uhs_ctx)
Bus resumed handler
Definition usbh.h:89
int(* suspended)(struct usbh_contex *const uhs_ctx)
Bus suspended handler
Definition usbh.h:87
int(* removed)(struct usbh_contex *const uhs_ctx)
Device removed handler
Definition usbh.h:83
USB Class Code triple.
Definition usbh.h:59
uint8_t proto
Class Protocol Code.
Definition usbh.h:65
uint8_t dclass
Device Class Code.
Definition usbh.h:61
uint8_t sub
Class Subclass Code.
Definition usbh.h:63
USB host support runtime context.
Definition usbh.h:38
const struct device * dev
Pointer to UHC device struct.
Definition usbh.h:44
sys_dlist_t peripherals
peripheral list
Definition usbh.h:46
const char * name
Name of the USB device.
Definition usbh.h:40
struct k_mutex mutex
Access mutex.
Definition usbh.h:42
USB host controller (UHC) driver API.