|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Shared SCI8 console + text formatters for the soak self-test. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | selftest_print (const char *text) |
| Print a NUL-terminated ASCII string over the console. | |
| ra8_err_t | selftest_print_dec (uint32_t value) |
| Print an unsigned 32-bit value in decimal. | |
| ra8_err_t | selftest_print_hex (uint32_t value, uint8_t digits) |
Print the low digits hex nibbles of value (upper-case). | |
| ra8_err_t | selftest_print_fail (const char *what, ra8_err_t err) |
| Print a "FAIL <what> err=0x..." diagnostic line. | |
Shared SCI8 console + text formatters for the soak self-test.
The host worker prints all its verdicts through these helpers, which wrap polled SCI8 (the J-Link OB CDC bridge) with heap-free decimal / hex / fail formatters. Defined in usb_selftest_console.c.
Definition in file usb_selftest_console.h.
|
nodiscard |
Print a NUL-terminated ASCII string over the console.
| [in] | text | NUL-terminated ASCII (bounded by k_selftest_print_cap). |
Length-bounded by the bounded string-length scan.
| [in] | text | String to print (CR/LF included by the caller). |
| k_ra8_ok | All bytes queued. |
text is non-NULL. text is NUL-terminated within k_selftest_print_cap bytes. Length-bounded by selftest_str_len.
| [in] | text | String to print (CR/LF included by the caller). |
| k_ra8_ok | All bytes queued. |
text is non-NULL. text is NUL-terminated within k_selftest_print_cap bytes. Definition at line 423 of file usb_selftest_ospi_format.c.
References selftest_sci_write(), and selftest_str_len().
Referenced by selftest_print_fail().
|
nodiscard |
Print an unsigned 32-bit value in decimal.
| [in] | value | Value to print (no leading zeros; "0" for zero). |
Print an unsigned 32-bit value in decimal.
Digit-reversal into a bounded scratch buffer.
| [in] | value | Value to print. |
| k_ra8_ok | All bytes queued. |
Definition at line 428 of file usb_selftest_ospi_format.c.
References k_selftest_dec_chars_u32, k_selftest_dec_radix, and selftest_sci_write().
Print a "FAIL <what> err=0x..." diagnostic line.
| [in] | what | Short ASCII label for the failing step. |
| [in] | err | Error code to render in hex. |
Print a "FAIL <what> err=0x..." diagnostic line.
One-line diagnostic; print errors inside are not recoverable anyway, so the first failing chunk's code is returned.
| [in] | what | Short description of the failed step. |
| [in] | err | Error code returned by the step. |
| k_ra8_ok | The diagnostic line is queued. |
what is NUL-terminated within the print cap. Definition at line 466 of file usb_selftest_ospi_format.c.
References k_ra8_ok, k_selftest_hex_chars_u32, selftest_print(), and selftest_print_hex().
|
nodiscard |
Print the low digits hex nibbles of value (upper-case).
| [in] | value | Value to print. |
| [in] | digits | Number of hex digits to emit (e.g. 4 or 8). |
Print the low digits hex nibbles of value (upper-case).
Width is clamped to 8 hex digits.
| [in] | value | Value to print. |
| [in] | digits | Hex digit count (4 for u16, 8 for u32). |
| k_ra8_ok | All bytes queued. |
digits is at most k_selftest_hex_chars_u32. Definition at line 452 of file usb_selftest_ospi_format.c.
References k_selftest_hex_chars_u32, k_selftest_nibble_bits, k_selftest_nibble_mask, selftest_nibble_to_hex(), and selftest_sci_write().
Referenced by selftest_print_fail().