64typedef enum : uint8_t {
76typedef enum : uint16_t {
90typedef enum : uint8_t {
104typedef enum : uint8_t {
117typedef enum : uint8_t {
132typedef 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.
ra8_usb_hcdc_packet_t
Packet sizing for the attached device's bulk + interrupt endpoints (these are the maxima the host pip...
@ k_ra8_hcdc_intr_max_packet
Notification pipe size.
@ k_ra8_hcdc_bulk_max_packet_hs
Bulk size at high speed.
@ k_ra8_hcdc_bulk_max_packet_fs
Bulk size at full speed.
ra8_err_t ra8_usb_hcdc_set_line_coding(uint32_t baud, ra8_usb_hcdc_parity_t parity, ra8_usb_hcdc_stop_bits_t stop_bits)
Issue SET_LINE_CODING to the attached CDC-ACM device.
ra8_usb_hcdc_parity_t
Parity selector used by ra8_usb_hcdc_set_line_coding.
@ k_ra8_hcdc_parity_odd
Odd parity.
@ k_ra8_hcdc_parity_mark
Mark parity.
@ k_ra8_hcdc_parity_even
Even parity.
@ k_ra8_hcdc_parity_space
Space parity.
@ k_ra8_hcdc_parity_none
No parity.
void(* ra8_usb_hcdc_attach_fn_t)(void *ctx, const ra8_usb_hcdc_device_t *device)
Attach-callback signature.
ra8_usb_hcdc_class_t
Class / subclass / protocol triplets that identify a CDC ACM function within an attached USB device's...
@ k_ra8_hcdc_protocol_at_v25
AT command set (V.25ter).
@ k_ra8_hcdc_class_comms
CDC control interface class.
@ k_ra8_hcdc_subclass_zero
Data subclass = 0.
@ k_ra8_hcdc_class_data
CDC data interface class.
@ k_ra8_hcdc_subclass_acm
Abstract Control Model.
@ k_ra8_hcdc_protocol_zero
Data protocol = 0.
ra8_usb_hcdc_pipe_t
PIPE numbers used by the host-CDC driver for the attached peripheral's endpoints.
@ k_ra8_hcdc_pipe_bulk_in
PIPE1 -> attached EP bulk IN.
@ k_ra8_hcdc_pipe_intr_in
PIPE6 -> attached EP intr IN.
@ k_ra8_hcdc_pipe_bulk_out
PIPE2 -> attached EP bulk OUT.
ra8_err_t ra8_usb_hcdc_attach_callback(ra8_usb_hcdc_attach_fn_t on_attach, void *ctx)
Register (or detach) the attach callback.
ra8_usb_hcdc_stop_bits_t
Stop-bit selector used by ra8_usb_hcdc_set_line_coding.
@ k_ra8_hcdc_stop_1_5
1.5 stop bits.
@ k_ra8_hcdc_stop_2
2 stop bits.
@ k_ra8_hcdc_stop_1
1 stop bit.
ra8_err_t ra8_usb_hcdc_init(ra8_usb_speed_t speed)
Bring up the host-CDC driver on a chosen USB controller.
ra8_err_t ra8_usb_hcdc_step(void)
Drive the enumeration step machine forward by one step.
ra8_err_t ra8_usb_hcdc_send(const uint8_t *data, uint16_t len)
Send a chunk of bytes OUT to the attached CDC-ACM device.
ra8_usb_hcdc_request_t
CDC class-specific request codes the host issues to the attached device.
@ k_ra8_hcdc_req_set_control_line_state
0-byte payload.
@ k_ra8_hcdc_req_get_line_coding
7-byte payload.
@ k_ra8_hcdc_req_set_line_coding
7-byte payload.
ra8_err_t ra8_usb_hcdc_close(void)
Tear down the host-CDC driver and release the controller.
ra8_err_t ra8_usb_hcdc_recv(uint8_t *out_buf, uint16_t max_len, uint16_t *got_len)
Drain a chunk of bytes IN from the attached CDC-ACM device.
Snapshot of the attached CDC-ACM device, passed to the attach callback.
uint8_t device_address
Assigned USB address (1..127).
uint8_t bulk_in_ep
Attached device's bulk IN EP num.
uint8_t intr_in_ep
Attached device's intr IN EP num.
uint8_t bulk_out_ep
Attached device's bulk OUT EP num.
uint16_t vendor_id
idVendor from device descriptor.
uint16_t product_id
idProduct from device descriptor.
uint16_t bulk_out_max_packet
Attached bulk-OUT wMaxPacketSize.
uint16_t bulk_in_max_packet
Attached bulk-IN wMaxPacketSize.