61typedef enum : uint8_t {
69typedef enum : uint8_t {
77typedef enum : uint8_t {
91typedef enum : uint16_t {
112typedef enum : uint8_t {
130typedef enum : uint8_t {
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Native USB controller driver public API (device + host modes).
ra8_usb_speed_t
Selects which controller instance the call targets.
void(* ra8_usb_hhub_attach_fn_t)(void *ctx, const ra8_usb_hhub_device_t *device)
Attach-callback signature.
ra8_usb_hhub_port_status_bits_t
Bit positions in the 32-bit port status word (USB 2.0 Table 11-21).
@ k_ra8_hhub_status_bit_high_speed
High-speed device.
@ k_ra8_hhub_status_bit_enable
Port enabled.
@ k_ra8_hhub_status_bit_connection
Current connect status.
@ k_ra8_hhub_status_bit_suspend
Suspend state.
@ k_ra8_hhub_status_bit_low_speed
Low-speed device.
@ k_ra8_hhub_status_bit_reset
Reset in progress.
@ k_ra8_hhub_status_bit_power
Port power on.
@ k_ra8_hhub_status_bit_overcurrent
Over-current latch.
ra8_usb_hhub_feature_t
HUB port feature selectors (USB 2.0 Table 11-17).
@ k_ra8_hhub_feature_port_connection
C_PORT_CONNECTION cleared.
@ k_ra8_hhub_feature_port_reset
PORT_RESET.
@ k_ra8_hhub_feature_port_low_speed
PORT_LOW_SPEED.
@ k_ra8_hhub_feature_c_port_reset
C_PORT_RESET (change).
@ k_ra8_hhub_feature_port_enable
PORT_ENABLE.
@ k_ra8_hhub_feature_port_suspend
PORT_SUSPEND.
@ k_ra8_hhub_feature_c_port_overcurr
C_PORT_OVER_CURRENT (change).
@ k_ra8_hhub_feature_port_overcurrent
PORT_OVER_CURRENT.
@ k_ra8_hhub_feature_c_port_enable
C_PORT_ENABLE (change).
@ k_ra8_hhub_feature_c_port_connection
C_PORT_CONNECTION (change).
@ k_ra8_hhub_feature_c_port_suspend
C_PORT_SUSPEND (change).
@ k_ra8_hhub_feature_port_power
PORT_POWER.
ra8_err_t ra8_usb_hhub_set_port_feature(uint8_t port, ra8_usb_hhub_feature_t feature)
Issue SET_PORT_FEATURE (USB 2.0 sec 11.24.2.13) over the DCP.
ra8_err_t ra8_usb_hhub_step(void)
Drive the enumeration step machine forward by one step.
ra8_err_t ra8_usb_hhub_close(void)
Tear down the host-HUB driver and release the controller.
ra8_usb_hhub_request_t
HUB class-specific request codes (USB 2.0 sec 11.24.2).
@ k_ra8_hhub_req_clear_feature
CLEAR_FEATURE.
@ k_ra8_hhub_req_set_feature
SET_FEATURE.
@ k_ra8_hhub_req_get_descriptor
GET_DESCRIPTOR.
@ k_ra8_hhub_req_get_status
GET_STATUS.
@ k_ra8_hhub_req_reset_tt
RESET_TT.
@ k_ra8_hhub_req_set_descriptor
SET_DESCRIPTOR.
@ k_ra8_hhub_req_clear_tt_buffer
CLEAR_TT_BUFFER.
ra8_usb_hhub_class_t
HUB class code per USB 2.0 sec 11.24.1.
@ k_ra8_hhub_class_hub
bDeviceClass / bInterfaceClass = HUB.
ra8_err_t ra8_usb_hhub_attach_callback(ra8_usb_hhub_attach_fn_t on_attach, void *ctx)
Register (or detach) the HUB attach callback.
ra8_err_t ra8_usb_hhub_init(ra8_usb_speed_t speed)
Bring up the host-HUB driver on a chosen USB controller.
ra8_err_t ra8_usb_hhub_clear_port_feature(uint8_t port, ra8_usb_hhub_feature_t feature)
Issue CLEAR_PORT_FEATURE (USB 2.0 sec 11.24.2.2) over the DCP.
ra8_err_t ra8_usb_hhub_get_port_status(uint8_t port, uint32_t *status)
Issue GET_PORT_STATUS (USB 2.0 sec 11.24.2.7) over the DCP.
ra8_err_t ra8_usb_hhub_get_port_count(uint8_t *count)
Read the cached downstream port count from the HUB descriptor.
ra8_usb_hhub_desc_t
HUB descriptor types (USB 2.0 sec 11.23.2).
@ k_ra8_hhub_desc_hub
HUB class descriptor type.
ra8_usb_hhub_limits_t
Hard ceilings on hub topology this driver tracks.
@ k_ra8_hhub_first_port
Port numbering starts at 1.
@ k_ra8_hhub_max_ports
FSP-aligned downstream port ceiling.
Snapshot of the attached HUB device, passed to the attach callback.
uint8_t device_address
Assigned USB address (1..127).
uint16_t product_id
idProduct.
uint16_t vendor_id
idVendor.
uint8_t port_count
bNbrPorts from HUB descriptor.