ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
47
48#include <stdint.h>
49#include <string.h>
50
51#include "ra8_board_ek_ra8d2.h"
52#include "ra8_boot_entry.h"
53#include "ra8_cgc.h"
54#include "ra8_err.h"
55#include "ra8_gpio_constants.h"
56#include "ra8_isr.h"
57#include "ra8_port_constants.h"
58#include "ra8_port_utils.h"
59#include "ra8_time.h"
60#include "ra8_usb.h"
61#include "ra8_usb_hmsc.h"
63
64#ifndef RA8_OFF_TARGET
65#include "tx_api.h"
66#include "ux_api.h"
67#include "ux_dcd_ra8_usb.h"
68#include "ux_device_class_storage.h"
69#include "ux_device_stack.h"
70
71/* Strong SysTick override: route the tick into BOTH the ra8_time millisecond
72 * counter (for ra8_delay_ms and the polled host stack's timeouts) AND
73 * ThreadX's timer; the 1 ms pulse also recovers the DCD's storm-guard mask. */
74
75extern void _tx_timer_interrupt(void);
76
86static volatile bool s_tx_kernel_up = false;
87
88void SysTick_Handler(void);
97#endif
98
99/* -------------------------------------------------------------------------- */
100/* Pinout (FSP-aligned, EK-RA8D2 v1 User's Manual) */
101/* -------------------------------------------------------------------------- */
102
105
108
111
114
117
120
121/* -------------------------------------------------------------------------- */
122/* Tunables */
123/* -------------------------------------------------------------------------- */
124
125/* The compile-time tunables (::wlun_config_t), hex/decimal formatter sizing
126 * (::wlun_hex_t), text-formatter masks (::wlun_mask_t), LUN geometry
127 * (::wlun_geom_t), and host-ladder phase markers (::wlun_phase_t) live in the
128 * shared seam usb_selftest_wlun_steps.h alongside the helpers that consume
129 * them. */
130
142
151
152#ifndef RA8_OFF_TARGET
153
154/* -------------------------------------------------------------------------- */
155/* ThreadX workers + USBX pool storage */
156/* -------------------------------------------------------------------------- */
157
165
172
180
187
194
195/* SCSI INQUIRY strings -- 8 / 16 / 4 byte fields per SBC-3. */
196static UCHAR s_msc_vendor_id[] = "RA8D2 ";
197static UCHAR s_msc_product_id[] = "WRITABLE-RAM RW ";
198static UCHAR s_msc_product_rev[] = "0001";
200static UCHAR s_msc_class_name[] = "ux_slave_class_storage";
201static CHAR s_device_thread_name[] = "wlun_device";
202static CHAR s_host_thread_name[] = "wlun_host";
203
204/* -------------------------------------------------------------------------- */
205/* J-Link probes */
206/* -------------------------------------------------------------------------- */
207
208/* The host-ladder probes (s_dbg_phase / s_dbg_luns_ok / s_dbg_max_lun /
209 * s_dbg_mismatch / s_dbg_pass_count) live with the host worker in
210 * usb_selftest_wlun_host.c. */
211
213static volatile uint32_t s_dbg_read_calls;
215static volatile uint32_t s_dbg_write_calls;
217static volatile uint32_t s_dbg_write_blocks;
219static volatile uint32_t s_dbg_dev_step;
221static volatile uint32_t s_dbg_dev_err;
222
224static UCHAR s_disk[(size_t)k_wlun_sectors * (size_t)k_wlun_block_size];
225
226/* -------------------------------------------------------------------------- */
227/* USB descriptors (single-interface MSC; one writable logical unit) */
228/* -------------------------------------------------------------------------- */
229
230/* MSC config: bulk-only transport, SCSI command set, EP1 IN + EP2 OUT,
231 * 64-byte MPS. The number of LUNs is a class-registration parameter, not
232 * a descriptor field, so this framework is the standard single-interface
233 * MSC blob. PID 0x0014 marks the writable-LUN self-test identity. */
234static UCHAR s_device_framework_fs[] = {
235 /* Device descriptor (USB 2.0 sec 9.6.1) -- 18 bytes. */
236 0x12U,
237 0x01U,
238 0x00U,
239 0x02U,
240 0x00U,
241 0x00U,
242 0x00U,
243 0x40U,
244 0x09U,
245 0x12U,
246 0x14U, /* PID = 0x0014 (pid.codes test). */
247 0x00U,
248 0x00U,
249 0x01U,
250 0x01U,
251 0x02U,
252 0x03U,
253 0x01U,
254 /* Configuration descriptor (32 bytes total). */
255 0x09U,
256 0x02U,
257 0x20U,
258 0x00U,
259 0x01U,
260 0x01U,
261 0x00U,
262 0x80U,
263 0x32U,
264 /* Interface descriptor -- MSC, SCSI, BBB. */
265 0x09U,
266 0x04U,
267 0x00U,
268 0x00U,
269 0x02U,
270 0x08U,
271 0x06U,
272 0x50U,
273 0x00U,
274 /* Bulk-IN endpoint (EP1 IN, 64-byte MPS). */
275 0x07U,
276 0x05U,
277 0x81U,
278 0x02U,
279 0x40U,
280 0x00U,
281 0x00U,
282 /* Bulk-OUT endpoint (EP2 OUT, 64-byte MPS). */
283 0x07U,
284 0x05U,
285 0x02U,
286 0x02U,
287 0x40U,
288 0x00U,
289 0x00U,
290};
291
299static UCHAR s_string_framework[] = {
300 /* idx 1: "Brighton Sikarskie". */
301 0x09U,
302 0x04U,
303 0x01U,
304 0x12U,
305 'B',
306 'r',
307 'i',
308 'g',
309 'h',
310 't',
311 'o',
312 'n',
313 ' ',
314 'S',
315 'i',
316 'k',
317 'a',
318 'r',
319 's',
320 'k',
321 'i',
322 'e',
323 /* idx 2: "RA8D2 MULTILUN". */
324 0x09U,
325 0x04U,
326 0x02U,
327 0x0EU,
328 'R',
329 'A',
330 '8',
331 'D',
332 '2',
333 ' ',
334 'M',
335 'U',
336 'L',
337 'T',
338 'I',
339 'L',
340 'U',
341 'N',
342 /* idx 3: serial. */
343 0x09U,
344 0x04U,
345 0x03U,
346 0x08U,
347 '0',
348 '0',
349 '0',
350 '0',
351 '0',
352 '0',
353 '1',
354 '3',
355};
356
357/* USBX LANGID descriptor 0x0409 (English-US), little-endian byte pair. */
358typedef enum : uint8_t {
362
369
370/* The shared per-(LUN,LBA) pattern generator ::wlun_pattern_fill lives in
371 * usb_selftest_wlun_console.c (shared with the host verifier). */
372
373/* -------------------------------------------------------------------------- */
374/* Storage class media callbacks (single writable RAM-disk LUN) */
375/* -------------------------------------------------------------------------- */
376
404static UINT wlun_msc_read(VOID* storage,
405 ULONG lun,
406 UCHAR* data_pointer,
407 ULONG number_blocks,
408 ULONG lba,
409 ULONG* media_status)
410{
411 (void)storage;
412 (void)lun;
414 if ((lba + number_blocks) > (ULONG)k_wlun_sectors) {
415 *media_status = UX_DEVICE_CLASS_STORAGE_SENSE_STATUS(k_scsi_sense_illegal_request,
418 return UX_ERROR;
419 }
420 (void)memcpy(data_pointer,
422 (size_t)(number_blocks * (ULONG)k_wlun_block_size));
423 *media_status = 0UL;
425 return UX_SUCCESS;
426}
427
456/* cppcheck-suppress-begin [constParameterCallback] -- USBX's
457 * ux_slave_class_storage_media_write function-pointer signature takes
458 * non-const UCHAR*; we cannot const-qualify the parameter. */
459static UINT wlun_msc_write(VOID* storage,
460 ULONG lun,
461 UCHAR* data_pointer,
462 ULONG number_blocks,
463 ULONG lba,
464 ULONG* media_status)
465{
466 (void)storage;
467 (void)lun;
469 if ((lba + number_blocks) > (ULONG)k_wlun_sectors) {
470 *media_status = UX_DEVICE_CLASS_STORAGE_SENSE_STATUS(k_scsi_sense_illegal_request,
473 return UX_ERROR;
474 }
475 (void)memcpy(&s_disk[lba * (ULONG)k_wlun_block_size],
476 data_pointer,
477 (size_t)(number_blocks * (ULONG)k_wlun_block_size));
478 s_dbg_write_blocks += (uint32_t)number_blocks;
479 *media_status = 0UL;
481 return UX_SUCCESS;
482}
483/* cppcheck-suppress-end [constParameterCallback] */
484
506static UINT wlun_msc_status(VOID* storage, ULONG lun, ULONG media_id, ULONG* media_status)
507{
508 (void)storage;
509 (void)lun;
510 (void)media_id;
511 *media_status = 0UL;
512 return UX_SUCCESS;
513}
514
515/* The SCI8 polled console helpers (wlun_nibble_to_hex / wlun_str_len /
516 * wlun_sci_write / wlun_print / wlun_print_dec / wlun_print_hex /
517 * wlun_print_fail) live in usb_selftest_wlun_console.c. */
518
519/* -------------------------------------------------------------------------- */
520/* Device side: USBX MSC with two LUNs */
521/* -------------------------------------------------------------------------- */
522
540{
541 if (_ux_system_initialize(s_usbx_pool, k_wlun_usbx_pool_bytes, UX_NULL, 0) != UX_SUCCESS) {
542 return UX_ERROR;
543 }
544 return _ux_device_stack_initialize((UCHAR*)UX_NULL,
545 0,
547 sizeof(s_device_framework_fs),
549 sizeof(s_string_framework),
552 UX_NULL);
553}
554
573static void wlun_fill_lun(UX_SLAVE_CLASS_STORAGE_PARAMETER* p, uint32_t idx)
574{
575 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_last_lba =
576 (ULONG)k_wlun_sectors - 1UL;
577 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_block_length =
579 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_type =
580 UX_SLAVE_CLASS_STORAGE_MEDIA_FAT_DISK;
581 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_removable_flag =
582 UX_SLAVE_CLASS_STORAGE_MEDIA_IS_REMOVABLE;
583 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_read_only_flag =
584 UX_FALSE;
585 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_read = wlun_msc_read;
586 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_write = wlun_msc_write;
587 p->ux_slave_class_storage_parameter_lun[idx].ux_slave_class_storage_media_status =
589}
590
610{
611 UX_SLAVE_CLASS_STORAGE_PARAMETER msc_params;
612 (void)memset(&msc_params, 0, sizeof(msc_params));
613 msc_params.ux_slave_class_storage_parameter_number_lun = (ULONG)k_wlun_count;
614 msc_params.ux_slave_class_storage_parameter_vendor_id = s_msc_vendor_id;
615 msc_params.ux_slave_class_storage_parameter_product_id = s_msc_product_id;
616 msc_params.ux_slave_class_storage_parameter_product_rev = s_msc_product_rev;
617 for (uint32_t idx = 0U; idx < (uint32_t)k_wlun_count; idx++) {
618 wlun_fill_lun(&msc_params, idx);
619 }
620 return _ux_device_stack_class_register(s_msc_class_name,
621 _ux_device_class_storage_entry,
622 1,
623 0,
624 &msc_params);
625}
626
644static VOID wlun_device_worker(ULONG arg)
645{
646 (void)arg;
647
649 if (ux != UX_SUCCESS) {
650 s_dbg_dev_err = (uint32_t)ux;
651 return;
652 }
654 ux = wlun_class_register();
655 if (ux != UX_SUCCESS) {
656 s_dbg_dev_err = (uint32_t)ux;
657 return;
658 }
661 if (e != k_ra8_ok) {
662 s_dbg_dev_err = (uint32_t)e;
663 return;
664 }
667 if (e != k_ra8_ok) {
668 s_dbg_dev_err = (uint32_t)e;
669 return;
670 }
672
673 while (1) {
676 }
677}
678
679/* The host-side MSC ladder (wlun_write_disk / wlun_verify_one /
680 * wlun_print_lun_ok / wlun_host_enumerate / wlun_host_pass) and the
681 * wlun_host_worker entry point live in usb_selftest_wlun_host.c. */
682
725#endif /* !RA8_OFF_TARGET */
726
727/* -------------------------------------------------------------------------- */
728/* Startup */
729/* -------------------------------------------------------------------------- */
730
744static void wlun_panic_halt(void)
745{
746 while (1) {
747 __asm__ volatile("wfi");
748 }
749}
750
791
806static void wlun_setup_or_halt(void)
807{
808 uint32_t cpuclk0_hz = 0U;
809 if (ra8_cgc_init() != k_ra8_ok) {
811 }
814 }
817 }
820 }
821 if (ra8_time_init(cpuclk0_hz) != k_ra8_ok) {
823 }
826 }
829 }
832 }
834}
835
850void main(void)
851{
853
855
856#ifndef RA8_OFF_TARGET
857 tx_kernel_enter();
858#endif
859
861}
void main(void)
Secure fallback main entry point.
Definition main.c:37
void tx_application_define(void *first_unused_memory)
ThreadX system-define hook: build worker thread + byte pool.
Definition main.c:942
void _tx_timer_interrupt(void)
void SysTick_Handler(void)
SysTick exception handler – tail-calls the ThreadX timer.
Definition main.c:146
static uint8_t s_disk[(size_t) k_demo_disk_blocks *(size_t) k_ra8_io_block_size_bytes]
256 KiB RAM-disk backing buffer (in SRAM .bss) for the "ram" mount.
Definition main.c:75
static void wlun_fill_lun(UX_SLAVE_CLASS_STORAGE_PARAMETER *p, uint32_t idx)
Populate the writable LUN parameter slot with geometry + callbacks.
Definition main.c:573
static void wlun_route_usb_or_halt(void)
Route both ports' pins: FS as device, HS as host.
Definition main.c:767
static UINT wlun_class_register(void)
Register the Mass-Storage class with one writable LUN.
Definition main.c:609
static volatile bool s_tx_kernel_up
Set in tx_application_define; gates ThreadX tick delivery.
Definition main.c:86
static const ra8_port_pin_t k_wlun_pin_fs_dp
USBFS D+ (P8_14).
Definition main.c:110
static UCHAR s_msc_product_id[]
Definition main.c:197
static const ra8_port_pin_t k_wlun_pin_fs_vbus
USBFS VBUS sense pin (P4_07, PSEL = 0x13).
Definition main.c:104
static UCHAR s_host_stack[k_wlun_host_stack]
Stack backing storage for s_host_thread.
Definition main.c:186
static TX_THREAD s_device_thread
ThreadX TCB for the USBX device-side worker thread.
Definition main.c:164
static VOID wlun_device_worker(ULONG arg)
Device-side worker: bring the writable RAM-LUN device up, then park.
Definition main.c:644
static UCHAR s_string_framework[]
USBX string descriptor table (vendor / product / serial).
Definition main.c:299
scsi_sense_code_t
SCSI sense triple for an unsupported / out-of-range request.
Definition main.c:144
@ k_scsi_ascq_none
ASCQ: none.
Definition main.c:147
@ k_scsi_asc_write_protected
ASC: WRITE PROTECTED.
Definition main.c:149
@ k_scsi_sense_illegal_request
Sense key: ILLEGAL REQUEST.
Definition main.c:145
@ k_scsi_sense_data_protect
Sense key: DATA PROTECT.
Definition main.c:148
@ k_scsi_asc_lba_out_of_range
ASC: LBA out of range.
Definition main.c:146
static const ra8_port_pin_t k_wlun_pin_fs_dm
USBFS D- (P8_15).
Definition main.c:113
static volatile uint32_t s_dbg_write_blocks
Total 512-B blocks the device media_write callback stored.
Definition main.c:217
static const ra8_port_pin_t k_wlun_pin_hs_pwr
J7 host-power switch (PD07): HIGH = U18 supplies VBUS (UM 6.2).
Definition main.c:119
static volatile uint32_t s_dbg_write_calls
Device-side media_write invocations (WRITE(10) data received).
Definition main.c:215
static UINT wlun_msc_write(VOID *storage, ULONG lun, UCHAR *data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status)
Storage media-write callback: store host data into the RAM disk.
Definition main.c:459
static void wlun_panic_halt(void)
Halt forever in WFI – panic stop on init failure.
Definition main.c:744
static const ra8_port_pin_t k_wlun_pin_fs_vbusen
USBFS VBUSEN (P5_00) – GPIO LOW for the device role.
Definition main.c:107
static UCHAR s_usbx_pool[k_wlun_usbx_pool_bytes]
USBX memory pool (USBX uses tx_byte_pool internally).
Definition main.c:193
usb_langid_byte_t
Definition main.c:358
@ k_usb_langid_en_us_lo
LANGID 0x0409 low byte.
Definition main.c:359
@ k_usb_langid_en_us_hi
LANGID 0x0409 high byte.
Definition main.c:360
static UCHAR s_msc_class_name[]
Persistent mutable names retained by USBX and ThreadX.
Definition main.c:200
static CHAR s_host_thread_name[]
Definition main.c:202
static TX_THREAD s_host_thread
ThreadX TCB for the host-side worker thread.
Definition main.c:179
static UCHAR s_device_framework_fs[]
Definition main.c:234
static UCHAR s_msc_product_rev[]
Definition main.c:198
static UCHAR s_language_id_framework[]
USBX language-id table – US English.
Definition main.c:368
static UCHAR s_device_stack[k_wlun_thread_stack]
Stack backing storage for s_device_thread.
Definition main.c:171
static volatile uint32_t s_dbg_read_calls
Device-side media_read invocations.
Definition main.c:213
static volatile uint32_t s_dbg_dev_step
Device worker progress: 1 stack, 2 class, 3 dcd, 4 attach, 5 parked.
Definition main.c:219
static volatile uint32_t s_dbg_dev_err
Device worker first failing return code (0 = none).
Definition main.c:221
static UINT wlun_msc_read(VOID *storage, ULONG lun, UCHAR *data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status)
Storage media-read callback: synthesize the per-LUN pattern.
Definition main.c:404
static UINT wlun_usbx_stack_up(void)
Bring USBX system + device stack up with the MSC framework.
Definition main.c:539
static UINT wlun_msc_status(VOID *storage, ULONG lun, ULONG media_id, ULONG *media_status)
Storage media-status callback.
Definition main.c:506
static CHAR s_device_thread_name[]
Definition main.c:201
static const ra8_port_pin_t k_wlun_pin_hs_vbus
USBHS_VBUS sense pin (P4_08, PSEL = 0x14).
Definition main.c:116
static void wlun_setup_or_halt(void)
Bring CGC + both USB clocks + SysTick + SCI8 + LEDs + pins up.
Definition main.c:806
wlun_dev_step_t
J-Link probe values marking device-worker bring-up progress.
Definition main.c:135
@ k_wlun_dev_step_dcd
DCD bridge initialized.
Definition main.c:138
@ k_wlun_dev_step_class
MSC class registered.
Definition main.c:137
@ k_wlun_dev_step_attach
Device attached (DPRPU).
Definition main.c:139
@ k_wlun_dev_step_stack
USBX system + device stack up.
Definition main.c:136
@ k_wlun_dev_step_parked
Bring-up done; worker parked.
Definition main.c:140
static UCHAR s_msc_vendor_id[]
Definition main.c:196
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led2
LED2, GREEN, P303 (jumper E26).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
ra8_err_t ra8_board_io_expander_set_usbhs_host_mode(void)
Drive the U15 I/O expander to select USB-HS HOST mode.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
@ k_ra8_board_usbhs_pin_pwr
PD07 J7 host-power switch (HIGH = U18 drives 5 V VBUS).
@ k_ra8_board_usbhs_pin_vbus
P4_08 USBHS_VBUS sense.
@ k_ra8_board_usbfs_pin_dm
P8_15 D-.
@ k_ra8_board_usbfs_pin_vbusen
P5_00 VBUSEN GPIO.
@ k_ra8_board_usbfs_pin_vbus
P4_07 VBUS sense.
@ k_ra8_board_usbfs_pin_dp
P8_14 D+.
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
Definition ra8_cgc.c:132
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
Definition ra8_cgc.h:70
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Definition ra8_cgc.c:727
ra8_err_t ra8_cgc_usbfs_clock_enable(void)
Bring up the USB-FS module clock (USBCKCR / USBCKDIVCR).
ra8_err_t ra8_cgc_usbhs_pll_enable(void)
Bring up the USBHS PHY reference clock + module clock.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
void * memset(void *dst, int value, size_t n)
Fill memory with a constant byte value.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
PSEL codes for peripheral pin routing on the RA8D2.
@ k_ra8_psel_usb_fs
10011b: USB Full-Speed.
@ k_ra8_psel_usb_hs
10100b: USB High-Speed (e.g.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Definition ra8_isr.c:439
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
@ k_ra8_level_high
Drive or read 1.
@ k_ra8_level_low
Drive or read 0.
High-level GPIO helpers on top of the PORT + PFS register layer.
ra8_err_t ra8_gpio_output_init(ra8_port_pin_t pin, ra8_level_t init_level)
Configure a pin as a digital output and drive it to an initial level.
Definition gpio.c:88
ra8_err_t ra8_pfs_route_peripheral(ra8_port_pin_t pin, ra8_psel_t psel, const char *owner)
Route a pin to a non-IRQ peripheral function via PFS.PSEL.
Definition gpio.c:238
void ux_dcd_ra8_usb_irq_reenable(void)
Storm-guard recovery: zero the run counter and re-enable the USB IRQ.
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
Definition ra8_time.c:59
void ra8_time_on_tick(void)
SysTick IRQ handler – called from the vector table.
Definition ra8_time.c:170
Native USB controller driver public API (device + host modes).
ra8_err_t ra8_usb_device_attach(ra8_usb_speed_t speed, bool attached)
Raise / drop the D+ pull-up to advertise the device to the host.
@ k_ra8_usb_speed_fs
Full-Speed controller (USBFS @ 0x40250000).
Native USB host-side MSC (Mass Storage Class) class layer.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
#define tx_thread_create
#define tx_thread_sleep
#define TX_NO_TIME_SLICE
char CHAR
ThreadX-compatible CHAR (host stub).
#define TX_AUTO_START
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
Opaque thread stand-in for the host build.
examples/ek_ra8d2/hil_needs_revalidation/usb_selftest_wlun/inc/usb_selftest_wlun_steps....
@ k_wlun_block_size
SCSI logical block size.
@ k_wlun_sectors
512-byte sectors (RAM disk = 32 KiB).
@ k_wlun_count
Logical units exposed (single writable).
VOID wlun_host_worker(ULONG arg)
Host-side worker: retry the full pass until it succeeds.
@ k_wlun_usbx_pool_bytes
USBX memory pool (bytes).
@ k_wlun_thread_stack
Device worker stack (bytes).
@ 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_host_stack
Host worker stack (bytes).
@ k_wlun_dev_priority
Device bring-up worker priority.
USBX device-controller-driver (DCD) bridge to ra8_usb.
ra8_err_t ux_dcd_ra8_usb_initialize(ra8_usb_speed_t speed)
Register the ra8_usb bridge as the active USBX DCD.