|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Bounded console formatters for the ESP32-C6 SPI probe. More...
Go to the source code of this file.
Functions | |
| void | c6_probe_puts (const char *text) |
| Emit a bounded, NUL-terminated ASCII literal on the console. | |
| void | c6_probe_put_u32 (uint32_t value) |
| Implementation of c6_probe_put_u32() – reversed division loop. | |
| void | c6_probe_put_hex (uint32_t value, uint8_t digits) |
| Emit a value as fixed-width lowercase hexadecimal. | |
Bounded console formatters for the ESP32-C6 SPI probe.
Three tiny serialisers – string, decimal and hexadecimal – so the probe can narrate itself without dragging newlib's printf (and its heap and reentrancy machinery) into a bare-metal image. Every loop here is bounded by a constant from c6_probe.h.
Definition in file c6_console.c.
| void c6_probe_put_hex | ( | uint32_t | value, |
| uint8_t | digits ) |
Emit a value as fixed-width lowercase hexadecimal.
| [in] | value | Value to print. |
| [in] | digits | Number of nibbles to emit (1..8). |
Definition at line 56 of file c6_console.c.
References k_c6_fmt_hex_alpha, k_c6_fmt_hex_bits, k_c6_fmt_hex_mask, k_c6_fmt_hex_max, and ra8_board_uart_console_write().
Referenced by c6_probe_dump_payload(), and c6_probe_print_header().
| void c6_probe_put_u32 | ( | uint32_t | value | ) |
Implementation of c6_probe_put_u32() – reversed division loop.
Emit an unsigned integer in decimal.
Definition at line 38 of file c6_console.c.
References k_c6_fmt_dec_digits, k_c6_fmt_dec_radix, and ra8_board_uart_console_write().
Referenced by c6_probe_print_header(), c6_probe_print_map(), c6_probe_print_sideband(), c6_probe_print_verdict(), c6_probe_pull_contest(), c6_probe_sweep_mode(), c6_probe_wire_test(), and internal_one_xfer().
| void c6_probe_puts | ( | const char * | text | ) |
Emit a bounded, NUL-terminated ASCII literal on the console.
Measures the literal with a statically bounded scan (k_c6_probe_str_max) rather than calling strlen, keeping NASA Power of 10 Rule 2 provable without linking newlib string code.
| [in] | text | NUL-terminated ASCII string; ignored when NULL. |
Definition at line 25 of file c6_console.c.
References k_c6_probe_str_max, and ra8_board_uart_console_write().
Referenced by c6_probe_cs_hunt(), c6_probe_dump_payload(), c6_probe_print_header(), c6_probe_print_map(), c6_probe_print_sideband(), c6_probe_print_verdict(), c6_probe_pull_contest(), c6_probe_run(), c6_probe_setup_or_halt(), c6_probe_sweep_mode(), c6_probe_wire_test(), internal_cs_try(), internal_one_xfer(), internal_report_frame(), and main().