ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
c6_hosted.h
Go to the documentation of this file.
1
30
31#pragma once
32
33#include <stddef.h>
34#include <stdint.h>
35
36#include "esp_hosted_header.h"
38#include "ra8_esp_hosted_pins.h"
39
71
98
118typedef enum : uint16_t {
122
144typedef union c6_hosted_frame {
147 struct esp_payload_header header;
150
165void c6_hosted_puts(const char* text);
166
179void c6_hosted_put_u32(uint32_t value);
180
194void c6_hosted_put_i32(int32_t value);
195
211void c6_hosted_put_hex(uint32_t value, uint8_t digits);
212
229void c6_hosted_print_gpio(const char* label, const void* gpio_port, int32_t gpio_pin);
230
246void c6_hosted_print_pin(const char* label, ra8_esp_hosted_pin_t pin);
247
263void c6_hosted_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz);
264
279void c6_hosted_print_pin_map(void);
280
296
314void c6_hosted_on_event(void* ctx,
315 const char* base,
316 int32_t event_id,
317 const void* data,
318 size_t data_len);
319
332uint32_t c6_hosted_event_count(void);
333
void c6_hosted_print_banner(uint32_t cpuclk_hz, uint32_t pclka_hz)
Print the port identity, the clocks and the SPI parameters.
void c6_hosted_report_sideband(void)
Sample both side-band lines through the vtable and report them.
void c6_hosted_run_transaction(void)
Clock one full-duplex transaction and report the verdict.
union c6_hosted_frame c6_hosted_frame_t
uint32_t c6_hosted_event_count(void)
Report how many events c6_hosted_on_event has seen.
c6_hosted_link_t
Frame geometry both ends of the link must agree on.
Definition c6_hosted.h:118
@ k_c6_hosted_frame_bytes
Bytes clocked in one full-duplex transaction.
Definition c6_hosted.h:119
void c6_hosted_puts(const char *text)
Write a NUL-terminated string to the board console.
void c6_hosted_put_i32(int32_t value)
Emit a signed 32-bit value in decimal.
void c6_hosted_put_u32(uint32_t value)
Emit an unsigned 32-bit value in decimal.
void c6_hosted_put_hex(uint32_t value, uint8_t digits)
Emit a value as a fixed-width lower-case hexadecimal field.
void c6_hosted_print_pin_map(void)
Print the resolved pin map, bus pins and side-band alike.
void c6_hosted_print_pin(const char *label, ra8_esp_hosted_pin_t pin)
Print one packed board pin as <label>=port<n>.pin<n>.
c6_hosted_cfg_t
Link and storage parameters this application chooses.
Definition c6_hosted.h:59
@ k_c6_hosted_worker_stack
Worker-thread stack, in bytes.
Definition c6_hosted.h:68
@ k_c6_hosted_worker_prio
Worker priority and preemption threshold.
Definition c6_hosted.h:69
@ k_c6_hosted_sck_hz
SPI bit rate: the 5 MHz upstream recommends for first light, an order above the probe's 1 MHz.
Definition c6_hosted.h:61
@ k_c6_hosted_dma_align
Transaction-buffer alignment, in bytes.
Definition c6_hosted.h:67
@ k_c6_hosted_uart_baud
Console rate, 8N1, over the J-Link OB VCOM.
Definition c6_hosted.h:60
@ k_c6_hosted_edge_poll_ms
Poll period for a side-band pin with no ICU channel.
Definition c6_hosted.h:63
@ k_c6_hosted_boot_wait_ms
Settling delay before the first vtable read.
Definition c6_hosted.h:66
@ k_c6_hosted_heartbeat_ms
Heartbeat gap; the ThreadX tick is 1 ms, so this is also the sleep expressed in ticks.
Definition c6_hosted.h:64
void c6_hosted_on_event(void *ctx, const char *base, int32_t event_id, const void *data, size_t data_len)
Report an event the port delivered from the vendored core.
c6_hosted_fmt_t
Bounds for the console formatters in src/c6_hosted_console.c.
Definition c6_hosted.h:87
@ k_c6_hosted_hex_alpha
First nibble value spelled with a letter.
Definition c6_hosted.h:94
@ k_c6_hosted_str_max
Longest string the console helper emits.
Definition c6_hosted.h:88
@ k_c6_hosted_hex_byte
Hex digits printed for a byte-wide field.
Definition c6_hosted.h:95
@ k_c6_hosted_dec_digits
Digits in the widest 32-bit decimal value.
Definition c6_hosted.h:90
@ k_c6_hosted_hex_bits
Bits per hexadecimal digit.
Definition c6_hosted.h:92
@ k_c6_hosted_hex_digits
Digits in the widest 32-bit hex value.
Definition c6_hosted.h:91
@ k_c6_hosted_hex_csum
Hex digits printed for a 16-bit checksum.
Definition c6_hosted.h:96
@ k_c6_hosted_hex_mask
Nibble mask.
Definition c6_hosted.h:93
@ k_c6_hosted_dec_radix
Decimal radix.
Definition c6_hosted.h:89
void c6_hosted_print_gpio(const char *label, const void *gpio_port, int32_t gpio_pin)
Print an H_GPIO_*_Port / H_GPIO_*_Pin pair as one field.
#define MAX_TRANSPORT_BUFFER_SIZE
Bytes moved in one SDIO block transfer.
esp-hosted port header: full-duplex SPI transport buffer size.
ra8_board_eth_pin_t pin
Pin.
THE single point of change for the RA8 <-> ESP32-C6 harness map.
ra8_esp_hosted_pin_t
RA8-side pin assignment for every esp-hosted link signal.
One esp-hosted transaction buffer, addressable either way.
Definition c6_hosted.h:144
uint8_t bytes[k_c6_hosted_frame_bytes]
The transaction as the transport sees it: flat bytes.
Definition c6_hosted.h:145
struct esp_payload_header header
The same storage as the protocol sees it: a payload header.
Definition c6_hosted.h:147