25#include "esp_hosted_os_abstraction.h"
34#include "transport_drv.h"
90 struct hosted_transport_context_t xfer = {};
92 xfer.tx_buf_size = (uint32_t)len;
95 const int32_t moved = (int32_t)
g_h.funcs->_h_do_bus_transfer(&xfer);
122 const int32_t level =
148 (void)
g_h.funcs->_h_msleep((
unsigned int)ms);
153 if (out ==
nullptr) {
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.
esp-hosted port header: RTOS handle types, return codes and budgets.
#define RET_OK
Operation completed.
esp-hosted port header: full-duplex SPI transport buffer size.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
The single integration boundary between this firmware and the ESP32-C6.
@ k_ra8_c6link_dma_align
Alignment the transport expects of a transaction buffer.
@ k_ra8_c6link_frame_bytes
Bytes in one transaction; ESP_TRANSPORT_SPI_MAX_BUF_SIZE upstream.
The one seam between ra8_c6link and the wire that reaches the C6.
struct ra8_c6link_transport ra8_c6link_transport_t
Error Code Definitions for ra8-firmware.
@ k_ra8_err_spi_error
SPI transfer failed (bus fault, mode fault, overrun, ...).
@ k_ra8_err_not_initialized
Module not initialized – _init() not yet called successfully.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
@ k_ra8_err_invalid_size
Invalid size parameter (too large, too small, or misaligned).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
static uint8_t s_ra8_esp_hosted_c6link_tx[k_ra8_c6link_frame_bytes]
DMA-aligned staging buffer the transmit frame is clocked from.
static bool internal_ra8_esp_hosted_c6link_handshake(void *ctx)
Sample the HANDSHAKE line through the port's GPIO slice.
static void internal_ra8_esp_hosted_c6link_delay(void *ctx, uint16_t ms)
Yield for approximately the requested number of milliseconds.
ra8_err_t ra8_esp_hosted_c6link_bind(ra8_c6link_transport_t *out)
Fill a ra8_c6link transport seam with this port's implementations.
static ra8_err_t internal_ra8_esp_hosted_c6link_transfer(void *ctx, const uint8_t *tx, uint8_t *rx, uint16_t len)
Clock one full-duplex transaction through the port's SPI slice.
Binds the ra8_c6link transport seam to this port's OS vtable.
struct hosted_config_t g_h
The handle the vendored core dereferences to reach the vtable.
Public entry point of the RA8D2 + ThreadX port of esp-hosted.
bool ra8_esp_hosted_port_is_ready(void)
Report whether the port is currently initialised.
void * memcpy(void *dst, const void *src, size_t n)
Copy memory area between non-overlapping regions.
bool(* handshake_active)(void *ctx)
Report whether the co-processor is armed for a transaction.
void(* delay_ms)(void *ctx, uint16_t ms)
Yield for approximately ms milliseconds.
void * ctx
Opaque backend context, handed back to every row above.
ra8_err_t(* transfer)(void *ctx, const uint8_t *tx, uint8_t *rx, uint16_t len)
Clock one full-duplex transaction of exactly len bytes.