46typedef enum : uint8_t {
54 if (text ==
nullptr) {
69 uint32_t rest = value;
77 for (uint32_t i = 0U; i < count; i++) {
78 out[i] = digits[count - 1U - i];
86 uint32_t magnitude = (uint32_t)value;
89 magnitude = ~(uint32_t)value + 1U;
100 for (uint8_t i = 0U; i < digits; i++) {
104 ? (uint8_t)(
'0' + nibble)
113 if ((text ==
nullptr) || (len == 0U)) {
118 for (
size_t i = 0U; i < take; i++) {
119 const uint8_t
byte = (uint8_t)text[i];
120 const bool printable =
129 if (mac ==
nullptr) {
142 c6_wifi_puts(
"c6_wifi: EK-RA8D2 <-> ESP32-C6 station bring-up through ra8_c6link\r\n");
161 if ((label ==
nullptr) || (stats ==
nullptr)) {
Shared contract for the ra8_c6link facade bring-up application.
@ k_c6_wifi_str_max
Longest string the console helper emits.
@ k_c6_wifi_hex_mask
Nibble mask.
@ k_c6_wifi_hex_byte
Hex digits printed for a byte-wide field.
@ k_c6_wifi_dec_digits
Digits in the widest 32-bit decimal value.
@ k_c6_wifi_hex_alpha
First nibble value spelled with a letter.
@ k_c6_wifi_text_max
Longest co-processor-supplied string echoed to the console; anything longer is truncated rather than ...
@ k_c6_wifi_hex_digits
Digits in the widest 32-bit hex value.
@ k_c6_wifi_dec_radix
Decimal radix.
@ k_c6_wifi_hex_bits
Bits per hexadecimal digit.
@ k_c6_wifi_sck_hz
SPI bit rate; the rate the RPC round-trip ran at on silicon.
void c6_wifi_put_u32(uint32_t value)
Implementation of c6_wifi_put_u32() – reversed division loop.
void c6_wifi_print_stats(const char *label, const ra8_c6link_stats_t *stats)
Print what one facade poll did, as one console line.
void c6_wifi_put_i32(int32_t value)
Implementation of c6_wifi_put_i32() – two's-complement magnitude.
void c6_wifi_put_hex(uint32_t value, uint8_t digits)
Emit a value as a fixed-width lower-case hexadecimal field.
void c6_wifi_puts(const char *text)
Write a NUL-terminated string to the board console.
void c6_wifi_put_text(const char *text, size_t len)
Implementation of c6_wifi_put_text() – truncate, then sanitise.
void c6_wifi_put_mac(const ra8_c6link_mac_t *mac)
Emit an IEEE 802 address as six colon-separated hexadecimal octets.
c6_wifi_ascii_t
Printable-ASCII window used to sanitise co-processor text.
@ k_c6_wifi_ascii_high
Tilde: highest printable code point.
@ k_c6_wifi_ascii_low
Space: lowest printable code point.
@ k_c6_wifi_ascii_sub
Substitute for anything else.
void c6_wifi_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz)
Print the banner: identity, clocks and link parameters.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
@ k_ra8_board_pmod1_sci_channel
Pmod1 (J26) Simple-SPI is SCI2.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
The single integration boundary between this firmware and the ESP32-C6.
struct ra8_c6link_mac ra8_c6link_mac_t
@ k_ra8_c6link_mac_bytes
Octets in an IEEE 802 address.
@ k_ra8_c6link_max_payload
Largest payload one frame can carry.
@ k_ra8_c6link_frame_bytes
Bytes in one transaction; ESP_TRANSPORT_SPI_MAX_BUF_SIZE upstream.
struct ra8_c6link_stats ra8_c6link_stats_t
uint8_t octet[k_ra8_c6link_mac_bytes]
Address octets, first on the wire first.
uint16_t transfers
Full-duplex transactions clocked.
uint16_t rpc_in
Control-plane frames decoded as Rpc.
uint16_t malformed
Frames whose offset or length was not credible.
uint16_t idle
Filler frames the co-processor returned.
uint16_t hs_timeouts
Transactions abandoned waiting for HANDSHAKE.
uint16_t eth_in
802.3 frames delivered to the receive callback.
uint16_t data
Well-formed frames carrying a payload.
uint16_t bad_checksum
Frames whose recomputed checksum disagreed.
uint16_t unrouted
Frames on an interface this link does not use.
uint16_t events
Announcements delivered to the event callback.
uint16_t undecodable
Control-plane frames the codec would not parse.