Loading...
Searching...
No Matches
serial_tx.c
Go to the documentation of this file.
int serial_tx_start(int descriptor)
Attach an already-open non-blocking UART descriptor.
Definition serial_tx.c:71
int serial_tx_send(uint8_t message, const uint8_t *payload, size_t length)
Queue and opportunistically flush one complete USHER frame.
Definition serial_tx.c:156
static int send_frame(uint8_t message, const uint8_t *payload, size_t length, bool idle_only)
Construct, enqueue, and opportunistically transmit one framed message.
Definition serial_tx.c:109
void serial_tx_stop(void)
Discard pending output and detach the UART during shutdown/restart.
Definition serial_tx.c:92
int serial_tx_flush(void)
Continue writing queued bytes after POLLOUT reports readiness.
Definition serial_tx.c:166
static int flush_locked(void)
Flush as much queued output as the descriptor currently accepts.
Definition serial_tx.c:47
int serial_tx_send_if_idle(uint8_t message, const uint8_t *payload, size_t length)
Send only when no earlier frame is queued, for low-priority probes.
Definition serial_tx.c:161
bool serial_tx_pending(void)
Report queued data or a latched output error needing event-loop handling.
Definition serial_tx.c:174
Thread-safe, non-blocking framed UART transmission for USHER.
Shared FC/MORA byte-stream UART framing, messages and payload layouts.