ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_sci_internal.h
Go to the documentation of this file.
1
24
25#pragma once
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include <stdint.h>
32
33#include "ra8_sci.h"
34
53
72typedef struct {
74 void* rx_ctx;
76 void* tx_ctx;
78 /* Async TX state (ra8_sci_write). */
79 const uint8_t* tx_buf;
80 uint32_t tx_len;
81 uint32_t tx_idx;
82 /* Async RX state (ra8_sci_read). */
83 uint8_t* rx_buf;
84 uint32_t rx_len;
85 uint32_t rx_idx;
87
112
113#ifdef __cplusplus
114}
115#endif
ra8_sci_state_t s_sci_state[k_ra8_sci_channel_count_val]
Per-channel allocation + dispatch table.
Definition ra8_sci.c:94
Full-featured Serial Communications Interface driver.
bool(* ra8_sci_tx_fn_t)(void *ctx, uint8_t *byte)
TX-empty interrupt callback signature.
Definition ra8_sci.h:141
void(* ra8_sci_rx_fn_t)(void *ctx, uint8_t byte)
RX interrupt callback signature.
Definition ra8_sci.h:130
ra8_sci_limits_inner_t
File-local bounds and channel-table sizing.
@ k_ra8_sci_channel_count_val
Total channels tracked.
@ k_ra8_sci_channel_max_index
SCI0..SCI9.
Per-channel dispatch state.
uint32_t rx_len
Total bytes requested.
uint8_t * rx_buf
Destination buffer, NULL when idle.
uint32_t tx_len
Total bytes requested.
ra8_sci_rx_fn_t rx_fn
Attached RX handler, NULL if none.
uint32_t rx_idx
Next byte index to write.
void * tx_ctx
TX handler context.
const uint8_t * tx_buf
Source buffer, NULL when idle.
uint32_t tx_idx
Next byte index to push.
ra8_sci_tx_fn_t tx_fn
Attached TX handler, NULL if none.
bool initialized
True after ra8_sci_init.
void * rx_ctx
RX handler context.