71typedef enum : uint8_t {
84typedef enum : uint16_t {
99typedef enum : uint8_t {
116typedef enum : uint8_t {
132typedef enum : uint8_t {
145typedef enum : uint8_t {
154typedef enum : uint8_t {
170typedef enum : uint16_t {
341 uint8_t target_report_id,
378 uint8_t target_report_id,
379 const uint8_t* in_buf,
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.
ra8_usb_hhid_report_type_t
HID report-type selector encoded in wValue's high byte for GET_REPORT / SET_REPORT.
@ k_ra8_hhid_report_type_input
Input report.
@ k_ra8_hhid_report_type_feature
Feature report.
@ k_ra8_hhid_report_type_output
Output report.
ra8_err_t ra8_usb_hhid_close(void)
Tear down the host-HID driver and release the controller.
ra8_err_t ra8_usb_hhid_set_report(ra8_usb_hhid_report_type_t target_report_type, uint8_t target_report_id, const uint8_t *in_buf, uint16_t len)
Issue SET_REPORT (USB HID 1.11 sec 7.2.2) over the DCP.
ra8_err_t ra8_usb_hhid_set_protocol(ra8_usb_hhid_protocol_select_t boot_or_report)
Issue SET_PROTOCOL (USB HID 1.11 sec 7.2.6) over the DCP.
void(* ra8_usb_hhid_attach_fn_t)(void *ctx, const ra8_usb_hhid_device_t *device)
Attach-callback signature.
ra8_usb_hhid_class_t
Class / subclass / protocol triplet that identifies an HID function within an attached USB device's d...
@ k_ra8_hhid_protocol_keyboard
Boot keyboard.
@ k_ra8_hhid_class_hid
HID interface class.
@ k_ra8_hhid_subclass_boot
Boot Interface Subclass.
@ k_ra8_hhid_protocol_mouse
Boot mouse.
@ k_ra8_hhid_subclass_none
No subclass.
@ k_ra8_hhid_protocol_other
Non keyboard / mouse.
ra8_usb_hhid_desc_t
HID-specific descriptor types (USB HID 1.11 sec 7.1).
@ k_ra8_hhid_desc_report
HID Report descriptor.
@ k_ra8_hhid_desc_hid
HID class descriptor.
@ k_ra8_hhid_desc_physical
HID Physical descriptor.
ra8_usb_hhid_packet_t
Packet sizing for the attached device's interrupt endpoints.
@ k_ra8_hhid_intr_max_packet_default
Boot-protocol default.
@ k_ra8_hhid_intr_max_packet_hs
HS ceiling.
@ k_ra8_hhid_intr_max_packet_fs
FS ceiling.
ra8_err_t ra8_usb_hhid_init(ra8_usb_speed_t speed)
Bring up the host-HID driver on a chosen USB controller.
ra8_err_t ra8_usb_hhid_set_idle(uint8_t duration, uint8_t report_id)
Issue SET_IDLE (USB HID 1.11 sec 7.2.4) over the DCP.
ra8_usb_hhid_report_buf_t
Compile-time ceiling on the cached HID Report descriptor.
@ k_ra8_hhid_report_desc_max
Cached Report desc max len.
ra8_err_t ra8_usb_hhid_get_input_report(uint8_t *out_buf, uint16_t max_len, uint16_t *got_len)
Drain the next input report from the interrupt-IN pipe.
ra8_err_t ra8_usb_hhid_get_report(ra8_usb_hhid_report_type_t target_report_type, uint8_t target_report_id, uint8_t *out_buf, uint16_t max_len, uint16_t *got_len)
Issue GET_REPORT (USB HID 1.11 sec 7.2.1) over the DCP.
ra8_usb_hhid_request_t
HID class-specific request codes the host issues to the attached device.
@ k_ra8_hhid_req_get_idle
GET_IDLE.
@ k_ra8_hhid_req_set_report
SET_REPORT.
@ k_ra8_hhid_req_get_protocol
GET_PROTOCOL.
@ k_ra8_hhid_req_get_report
GET_REPORT.
@ k_ra8_hhid_req_set_protocol
SET_PROTOCOL.
@ k_ra8_hhid_req_set_idle
SET_IDLE.
ra8_usb_hhid_protocol_select_t
wValue payload for SET_PROTOCOL.
@ k_ra8_hhid_proto_boot
Boot protocol.
@ k_ra8_hhid_proto_report
Report protocol.
ra8_err_t ra8_usb_hhid_step(void)
Drive the enumeration step machine forward by one step.
ra8_err_t ra8_usb_hhid_attach_callback(ra8_usb_hhid_attach_fn_t on_attach, void *ctx)
Register (or detach) the attach callback.
ra8_usb_hhid_pipe_t
PIPE numbers used by the host-HID driver for the attached peripheral's interrupt endpoints.
@ k_ra8_hhid_pipe_intr_out
PIPE7 -> attached EP intr OUT.
@ k_ra8_hhid_pipe_intr_in
PIPE6 -> attached EP intr IN.
Snapshot of the attached HID device, passed to the attach callback.
uint8_t intr_in_ep
Attached device's intr IN EP num.
uint8_t protocol
bInterfaceProtocol (kb=1, ms=2).
const uint8_t * hid_descriptor
Pointer to cached HID class desc.
uint8_t interface_number
HID bInterfaceNumber.
uint16_t report_descriptor_len
Cached Report desc length.
uint8_t subclass
bInterfaceSubClass (boot=1).
uint16_t product_id
idProduct from device descriptor.
uint8_t device_address
Assigned USB address (1..127).
const uint8_t * report_descriptor
Pointer to cached HID Report desc.
uint8_t intr_out_ep
Attached device's intr OUT EP num (0 if absent).
uint16_t vendor_id
idVendor from device descriptor.
uint16_t intr_in_max_packet
Attached intr-IN wMaxPacketSize.
uint16_t intr_out_max_packet
Attached intr-OUT wMaxPacketSize.