53typedef enum : uint32_t {
70typedef enum : uint8_t {
82typedef enum : uint32_t {
91typedef enum : uint32_t {
110typedef enum : uint32_t {
118#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.
Native USB host-side MSC (Mass Storage Class) class layer.
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
void wlun_pattern_fill(uint32_t lun, uint32_t lba, UCHAR *out)
Fill one 512-byte sector with this LUN/LBA's deterministic bytes.
ra8_err_t wlun_print_hex(uint32_t value, uint8_t digits)
Print a value as fixed-width uppercase hex.
wlun_geom_t
LUN geometry + verification constants.
@ k_wlun_pat_lba_mul
Per-LBA pattern multiplier.
@ k_wlun_pat_bias
Pattern constant bias.
@ k_wlun_target_lun0
First LUN index.
@ k_wlun_block_size
SCSI logical block size.
@ k_wlun_burst_blocks
Blocks per READ(10) burst.
@ k_wlun_mismatch_lun_shift
s_dbg_mismatch: LUN in bits 31:24.
@ k_wlun_pat_lun_mul
Per-LUN pattern multiplier.
@ k_wlun_byte_mask
Byte mask.
@ k_wlun_sectors
512-byte sectors (RAM disk = 32 KiB).
@ k_wlun_no_mismatch
Probe: no mismatch.
@ k_wlun_burst_bytes
8 x 512 B burst buffer.
@ k_wlun_count
Logical units exposed (single writable).
ra8_err_t wlun_print(const char *text)
Print a NUL-terminated ASCII string over the console.
wlun_hex_t
Hex/decimal text-formatter sizing constants.
@ k_wlun_hex_chars_u16
16-bit value -> "ABCD".
@ k_wlun_hex_digit_split
Threshold between '0-9'/'A-F'.
@ k_wlun_dec_chars_u32
Max digits for a 32-bit count.
@ k_wlun_nibble_bits
Bits per hex nibble.
@ k_wlun_hex_chars_u32
32-bit value -> "ABCDEF01".
uint8_t wlun_nibble_to_hex(uint32_t nibble)
Format one nibble (0..15) into an uppercase hex character.
VOID wlun_host_worker(ULONG arg)
Host-side worker: retry the full pass until it succeeds.
wlun_config_t
Compile-time settings: threads, pool, console, cadence.
@ k_wlun_usbx_pool_bytes
USBX memory pool (bytes).
@ k_wlun_thread_stack
Device worker stack (bytes).
@ k_wlun_print_cap
Bound for console-string scans.
@ k_wlun_baud
J-Link OB CDC log baud.
@ k_wlun_idle_ticks
Parked-loop back-off (ticks).
@ k_wlun_host_priority
Host worker priority (below USBX).
@ k_wlun_retry_ticks
Pause between ladder retries.
@ k_wlun_boot_wait_ticks
Host start delay (1 ms ticks).
@ k_wlun_host_stack
Host worker stack (bytes).
@ k_wlun_dev_priority
Device bring-up worker priority.
ra8_err_t wlun_print_fail(const char *what, ra8_err_t err)
Print "FAIL <what> err=0xNNNNNNNN" on its own line.
ra8_err_t wlun_print_dec(uint32_t value)
Print a uint32_t as ASCII decimal.
uint32_t wlun_str_len(const char *text)
Bounded ASCII string length (cap k_wlun_print_cap).
wlun_mask_t
Bit-mask constants used by the text formatters.
@ k_wlun_nibble_mask
4-bit nibble mask.
@ k_wlun_dec_radix
Base for decimal conversion.
ra8_err_t wlun_sci_write(const uint8_t *data, uint32_t len)
Push a literal block over SCI8 polled.
wlun_phase_t
J-Link probe values marking host-ladder progress.
@ k_wlun_phase_enum
Enumerating.
@ k_wlun_phase_init
ra8_usb_hmsc_init issued.
@ k_wlun_phase_pass
All LUNs verified.
@ k_wlun_phase_boot
Host thread not started.
@ k_wlun_phase_verify
Reading + checking LUNs.