ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_esp_hosted_port.h
Go to the documentation of this file.
1
48
49#pragma once
50
51#include <stddef.h>
52#include <stdint.h>
53
54#include "ra8_err.h"
55
106
142
167typedef void (*ra8_esp_hosted_event_cb_t)(void* ctx,
168 const char* base,
169 int32_t event_id,
170 const void* data,
171 size_t data_len);
172
208
264
301[[nodiscard]] ra8_err_t ra8_esp_hosted_port_deinit(void);
302
333[[nodiscard]] bool ra8_esp_hosted_port_is_ready(void);
334
353[[nodiscard]] bool ra8_esp_hosted_port_rx_pending(void);
354
387void ra8_esp_hosted_mem_dump(const char* label);
388
420void ra8_esp_hosted_alloc_failed(const char* func, size_t bytes);
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
bool ra8_esp_hosted_port_is_ready(void)
Report whether the port is currently initialised.
struct ra8_esp_hosted_port_cfg ra8_esp_hosted_port_cfg_t
ra8_err_t ra8_esp_hosted_port_set_event_cb(ra8_esp_hosted_event_cb_t cb, void *ctx)
Register the handler the port calls when the core posts an event.
ra8_esp_hosted_limits_t
Fixed budgets the port allocates out of static storage.
@ k_ra8_esp_hosted_max_threads
Threads the port can start: the SPI transaction pump, the receive dispatcher, and headroom for the RP...
@ k_ra8_esp_hosted_max_mutexes
Mutexes the port can hand out, covering the bus lock and the mempool lock with headroom for the RPC l...
@ k_ra8_esp_hosted_queue_pool_bytes
Bytes reserved for queue message storage, shared across all queues; one esp-hosted buffer handle is 2...
@ k_ra8_esp_hosted_max_semaphores
Counting semaphores the port can hand out before refusing.
@ k_ra8_esp_hosted_max_queues
Message queues the port can hand out before refusing.
@ k_ra8_esp_hosted_pool_bytes
Bytes reserved for the transport buffer pool: enough for the receive ring, a transmit frame,...
@ k_ra8_esp_hosted_max_timers
Software timers the port can arm concurrently.
ra8_err_t ra8_esp_hosted_port_init(const ra8_esp_hosted_port_cfg_t *cfg)
Bring the esp-hosted port up and publish the OS-abstraction vtable.
void ra8_esp_hosted_mem_dump(const char *label)
Report transport pool occupancy at a named point.
void(* ra8_esp_hosted_event_cb_t)(void *ctx, const char *base, int32_t event_id, const void *data, size_t data_len)
Application handler for an event the vendored core posts.
bool ra8_esp_hosted_port_rx_pending(void)
Report whether the co-processor has queued receive data.
void ra8_esp_hosted_alloc_failed(const char *func, size_t bytes)
Record that an allocation through the vtable could not be served.
ra8_err_t ra8_esp_hosted_port_deinit(void)
Tear the port down, releasing every pin, interrupt and pool.
Everything the port needs that is not fixed by the board.
uint16_t edge_poll_ms
Sampling period for pins with no ICU channel.
uint32_t pclk_hz
PCLKA rate in hertz; the SCI baud clock source.
uint32_t sck_hz
Requested SPI bit rate in hertz.
uint8_t sci_channel
SCI channel carrying Simple-SPI; 0..9.