29#include "esp_hosted_transport.h"
47typedef enum : uint8_t {
55 if (text ==
nullptr) {
70 uint32_t rest = value;
78 for (uint32_t i = 0U; i < count; i++) {
79 out[i] = digits[count - 1U - i];
87 uint32_t magnitude = (uint32_t)value;
90 magnitude = ~(uint32_t)value + 1U;
101 for (uint8_t i = 0U; i < digits; i++) {
105 ? (uint8_t)(
'0' + nibble)
114 if ((text ==
nullptr) || (len == 0U)) {
119 for (
size_t i = 0U; i < take; i++) {
120 const uint8_t
byte = text[i];
121 const bool printable =
130 c6_fwver_puts(
"c6_fwver: EK-RA8D2 <-> ESP32-C6 esp-hosted RPC round-trip\r\n");
149 if ((label ==
nullptr) || (stats ==
nullptr)) {
Shared contract for the esp-hosted RPC round-trip application.
@ k_c6_fwver_sck_hz
SPI bit rate; the rate the port ran at on silicon in the c6_hosted_init bring-up.
@ k_c6_fwver_frame_bytes
Bytes clocked in one full-duplex transaction.
struct c6_fwver_pump_stats c6_fwver_pump_stats_t
@ k_c6_fwver_hex_alpha
First nibble value spelled with a letter.
@ k_c6_fwver_str_max
Longest string the console helper emits.
@ k_c6_fwver_dec_digits
Digits in the widest 32-bit decimal value.
@ k_c6_fwver_dec_radix
Decimal radix.
@ k_c6_fwver_hex_mask
Nibble mask.
@ k_c6_fwver_hex_digits
Digits in the widest 32-bit hex value.
@ k_c6_fwver_text_max
Longest co-processor-supplied string echoed to the console; anything longer is truncated rather than ...
@ k_c6_fwver_hex_bits
Bits per hexadecimal digit.
void c6_fwver_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz)
Print the banner: identity, clocks and SPI parameters.
void c6_fwver_put_i32(int32_t value)
Implementation of c6_fwver_put_i32() – two's-complement magnitude.
void c6_fwver_print_pump(const char *label, const c6_fwver_pump_stats_t *stats)
Print what one pump did, as one console line.
void c6_fwver_put_hex(uint32_t value, uint8_t digits)
Emit a value as a fixed-width lower-case hexadecimal field.
c6_fwver_ascii_t
Printable-ASCII window used to sanitise co-processor text.
@ k_c6_fwver_ascii_low
Space: lowest printable code point.
@ k_c6_fwver_ascii_sub
Substitute for anything else.
@ k_c6_fwver_ascii_high
Tilde: highest printable code point.
void c6_fwver_put_text(const uint8_t *text, size_t len)
Implementation of c6_fwver_put_text() – truncate, then sanitise.
void c6_fwver_put_u32(uint32_t value)
Implementation of c6_fwver_put_u32() – reversed division loop.
void c6_fwver_puts(const char *text)
Write a NUL-terminated string to the board console.
esp-hosted port header: RTOS handle types, return codes and budgets.
#define MAX_PAYLOAD_SIZE
Largest payload one transport frame can carry, in bytes.
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.
uint16_t malformed
Frames whose offset or length could not be believed.
uint16_t idle
Filler frames the co-processor returned (len zero).
bool bus_error
A bus transfer did not return RET_OK.
uint16_t transfers
Full-duplex transactions clocked.
bool sink_stopped
The sink asked the pump to stop early.
uint16_t bad_checksum
Frames whose recomputed checksum disagreed.
uint16_t frames
Well-formed payload frames handed to the sink.
uint16_t ifnum_defect
Bad-checksum frames explained by the co-processor's if_num accounting; see the app README.
uint16_t hs_timeouts
Transactions abandoned waiting for HANDSHAKE.