53typedef enum : uint32_t {
70typedef enum : uint8_t {
82typedef enum : uint32_t {
91typedef enum : uint32_t {
113typedef enum : uint8_t {
124#ifndef RA8_OFF_TARGET
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
void usb_host_keyboard_device_thread_create(void)
Create + auto-start the USBX HID device worker thread.
VOID hid_device_worker(ULONG arg)
Device-side worker: bring the HID device up, then send reports.
ra8_err_t hid_print(const char *text)
Print a NUL-terminated ASCII string over the console.
ra8_err_t hid_print_fail(const char *what, ra8_err_t err)
Print "FAIL <what> err=0xNNNNNNNN" on its own line.
ra8_err_t hid_print_hex(uint32_t value, uint8_t digits)
Print a value as fixed-width uppercase hex.
uint8_t hid_nibble_to_hex(uint32_t nibble)
Format one nibble (0..15) into an uppercase hex character.
hid_hex_t
Hex/decimal text-formatter sizing constants.
@ k_hid_dec_chars_u32
Max digits for a 32-bit count.
@ k_hid_hex_chars_u32
32-bit value -> "ABCDEF01".
@ k_hid_nibble_bits
Bits per hex nibble.
@ k_hid_hex_chars_u16
16-bit value -> "ABCD".
@ k_hid_hex_digit_split
Threshold between '0-9'/'A-F'.
void hid_fill_report_body(uint8_t *out, uint32_t len)
Fill the fixed body of a HID report (bytes 1..len-1).
ra8_err_t hid_print_dec(uint32_t value)
Print a uint32_t as ASCII decimal.
hid_geom_t
HID report + interrupt-pipe + pattern constants.
@ k_hid_report_len
Vendor input report width (bytes).
@ k_hid_ep_in_num
Device interrupt-IN endpoint num.
@ k_hid_rounds
Reports the host reads + checks.
@ k_hid_pat_bias
Pattern constant bias.
@ k_hid_pipe_in
Host pipe for the device IN.
@ k_hid_nkeys
Keycodes typed ("RA8D2").
@ k_hid_pat_idx_mul
Per-index pattern multiplier.
@ k_hid_mps
Interrupt endpoint wMaxPacketSize.
@ k_hid_no_mismatch
Probe: no mismatch.
@ k_hid_read_buf
One-MPS receive buffer (bytes).
@ k_hid_dev_addr
Address the host assigns.
@ k_hid_key0_idx
Boot-keyboard first-keycode byte.
@ k_hid_body_idx
Report body starts at byte 1.
@ k_hid_byte_mask
Byte mask.
@ k_hid_seq_idx
Report byte 0: modifier / rolling seq.
uint32_t hid_str_len(const char *text)
Bounded ASCII string length (cap k_hid_print_cap).
hid_keycode_t
HID Usage-Table keycode ranges for decoding keycodes back to ASCII.
@ k_hid_kc_a
Keycode for 'a' / 'A'.
@ k_hid_kc_d
Keycode for 'd' / 'D'.
@ k_hid_kc_r
Keycode for 'r' / 'R'.
@ k_hid_kc_z
Keycode for 'z' / 'Z'.
@ k_hid_kc_1
Keycode for '1'.
@ k_hid_kc_0
Keycode for '0' (top of digits).
@ k_hid_kc_8
Keycode for '8'.
@ k_hid_kc_2
Keycode for '2'.
TX_SEMAPHORE s_usb_host_keyboard_hid_active_sem
Activation semaphore shared by the device worker and main.c.
ra8_err_t hid_sci_write(const uint8_t *data, uint32_t len)
Push a literal block over SCI8 polled.
hid_mask_t
Bit-mask constants used by the text formatters.
@ k_hid_dec_radix
Base for decimal conversion.
@ k_hid_nibble_mask
4-bit nibble mask.
hid_config_t
Compile-time settings: threads, pool, console, cadence.
@ k_hid_print_cap
Bound for console-string scans.
@ k_hid_thread_stack
Device worker stack (bytes).
@ k_hid_idle_ticks
Parked-loop back-off (ticks).
@ k_hid_usbx_pool_bytes
USBX memory pool (bytes).
@ k_hid_host_stack
Host worker stack (bytes).
@ k_hid_host_priority
Host worker priority (below USBX).
@ k_hid_retry_ticks
Pause between ladder retries.
@ k_hid_baud
J-Link OB CDC log baud.
@ k_hid_boot_wait_ticks
Host start delay (1 ms ticks).
@ k_hid_dev_priority
Device bring-up worker priority.