83typedef enum : uint8_t {
98typedef enum : uint8_t {
327 const uint8_t* config_desc);
403 uint8_t* out_handler_class);
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_err_t(* ra8_usb_composite_init_fn_t)(void *ctx)
Class-layer initialise hook.
ra8_err_t ra8_usb_composite_dispatch_setup(const ra8_usb_setup_t *setup, uint8_t *out_handler_class)
Inject a SETUP packet directly into the dispatch logic.
ra8_err_t ra8_usb_composite_get_class_count(uint8_t *out_count)
Read back the number of currently-registered class layers.
ra8_err_t(* ra8_usb_composite_setup_fn_t)(void *ctx, const ra8_usb_setup_t *setup)
Class-layer SETUP-handler hook.
ra8_err_t ra8_usb_composite_init(ra8_usb_speed_t speed)
Bring up the composite-class driver on a chosen USB controller.
ra8_err_t ra8_usb_composite_step(void)
Drive the composite dispatch state machine forward by one step.
ra8_err_t(* ra8_usb_composite_close_fn_t)(void *ctx)
Class-layer teardown hook.
ra8_usb_composite_limits_t
Static ceilings for the composite registry.
@ k_ra8_usb_composite_max_classes
Registered class ceiling.
@ k_ra8_usb_composite_max_ifs
Highest IF number tracked.
ra8_usb_composite_iad_t
Interface Association Descriptor (IAD) constants.
@ k_ra8_usb_composite_class_misc
Miscellaneous class.
@ k_ra8_usb_composite_descriptor_type_iad
bDescriptorType = IAD.
@ k_ra8_usb_composite_protocol_iad
IAD protocol.
@ k_ra8_usb_composite_subclass_common
Common subclass.
ra8_err_t ra8_usb_composite_get_device_descriptor(const uint8_t **out_desc)
Read back the cached device descriptor pointer.
ra8_err_t ra8_usb_composite_set_descriptors(const uint8_t *device_desc, const uint8_t *config_desc)
Cache caller-owned device + configuration descriptor pointers.
ra8_err_t ra8_usb_composite_get_config_descriptor(const uint8_t **out_desc)
Read back the cached configuration descriptor pointer.
ra8_err_t ra8_usb_composite_close(void)
Tear down the composite-class driver and release the controller.
ra8_err_t ra8_usb_composite_register_class(const ra8_usb_composite_class_t *class_layer)
Register a single class layer with the composite driver.
ra8_usb_speed_t
Selects which controller instance the call targets.
Caller-owned class-layer registration record.
ra8_usb_composite_setup_fn_t handle_setup
setup callback (non-NULL).
uint8_t interface_number_count
IF count (CDC=2, HID=1...).
ra8_usb_composite_init_fn_t init
init callback (non-NULL).
void * ctx
Opaque context.
uint8_t interface_number_first
First IF this class owns.
ra8_usb_composite_close_fn_t close
close callback (non-NULL).
Decoded 8-byte USB SETUP packet.