38#include "esp_hosted_os_abstraction.h"
110 const int32_t level = (int32_t)
g_h.funcs->_h_read_gpio(gpio_port, (uint32_t)gpio_pin);
115 c6_hosted_puts((level == active) ?
" state=asserted\r\n" :
" state=deasserted\r\n");
120 c6_hosted_puts(
"\r\nc6_hosted_init: EK-RA8D2 <-> ESP32-C6 esp-hosted port bring-up\r\n");
121 c6_hosted_puts(
"c6_hosted_init: port=port/esp-hosted (RA8D2 + ThreadX) "
122 "driver=esp-hosted-mcu\r\n");
Shared contract for the esp-hosted port bring-up application.
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_print_pin(const char *label, ra8_esp_hosted_pin_t pin)
Print one packed board pin as <label>=port<n>.pin<n>.
@ k_c6_hosted_sck_hz
SPI bit rate: the 5 MHz upstream recommends for first light, an order above the probe's 1 MHz.
@ k_c6_hosted_edge_poll_ms
Poll period for a side-band pin with no ICU channel.
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.
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.
uint32_t c6_hosted_event_count(void)
Report how many events c6_hosted_on_event has seen.
static void c6_hosted_print_route(const char *label, ra8_esp_hosted_pin_t pin)
Print the interrupt path the port takes for one side-band pin.
void c6_hosted_print_pin_map(void)
Print the resolved pin map, bus pins and side-band alike.
static volatile uint32_t s_c6_hosted_events
Number of events c6_hosted_on_event has been handed.
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.
static void c6_hosted_read_sideband(const char *label, void *gpio_port, int32_t gpio_pin, int32_t active)
Sample one side-band input through the OS-abstraction vtable.
esp-hosted port header: transport selection, side-band pin map, link polarity.
#define H_GPIO_HANDSHAKE_Pin
Pin index of the HANDSHAKE input, or -1 when it is not wired.
#define H_GPIO_HANDSHAKE_Port
Opaque port handle of the HANDSHAKE input.
#define H_HS_VAL_ACTIVE
Level read back on HANDSHAKE when it is asserted.
#define H_GPIO_PIN_RESET
Pin index of the co-processor reset output, or -1 when unwired.
#define H_GPIO_DATA_READY_Port
Opaque port handle of the DATA_READY input.
#define H_GPIO_PORT_RESET
Opaque port handle of the co-processor reset output.
#define H_DR_VAL_ACTIVE
Level read back on DATA_READY when a frame is waiting.
#define H_GPIO_DATA_READY_Pin
Pin index of the DATA_READY input, or -1 when it is not wired.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
@ k_ra8_board_pmod1_sci_channel
Pmod1 (J26) Simple-SPI is SCI2.
ra8_board_eth_pin_t pin
Pin.
struct hosted_config_t g_h
The handle the vendored core dereferences to reach the vtable.
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.
@ k_ra8_esp_hosted_pin_chip_select
Chip select, RA8 output.
@ k_ra8_esp_hosted_pin_data_ready
DATA_READY, RA8 input, C6 output.
@ k_ra8_esp_hosted_pin_copi
Controller-out peripheral-in data, RA8 output, routed to the SCI channel rather than driven as a GPIO...
@ k_ra8_esp_hosted_pin_cipo
Controller-in peripheral-out data, RA8 input, routed to the SCI channel rather than sampled as a GPIO...
@ k_ra8_esp_hosted_pin_sck
Serial clock, RA8 output, routed to the SCI channel.
@ k_ra8_esp_hosted_pin_handshake
HANDSHAKE, RA8 input, C6 output.
@ k_ra8_esp_hosted_irq_none
No ICU channel routes this pin.
uint8_t ra8_esp_hosted_pin_irq_num(ra8_port_pin_t pin)
Report the ICU external-interrupt channel that serves a pin.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
SPI_B controller driver (RA8D2 Type-B SPI peripheral).
@ k_ra8_spi_mode_3
CPOL=1, CPHA=1.