24#define NX_UART_EVENT_PARITY 1u
25#define NX_UART_EVENT_FRAMING 2u
26#define NX_UART_EVENT_OVERRUN 4u
27#define NX_UART_EVENT_NOISE 8u
28#define NX_UART_EVENT_LOSS 16u
29#define NX_UART_EVENT_NO_BYTE 32u
68 size_t capacity,
size_t* count);
73 uint8_t syscall_ceiling);
103 const uint8_t* data,
size_t length,
181 size_t capacity,
size_t* count);
197 size_t capacity,
size_t* count);
231 uint8_t syscall_ceiling);
Caller-owned admission, borrow, settlement and stable cancellation.
nx_result_t
Operation result; success at submission means admission only.
Bounded caller-owned blocks with explicit producer/consumer loans.
Optional immutable wake target borrowed by an IRQ provider.
Caller-owned request metadata, without payload or callbacks.
Caller-owned stream control, initialized before publication.
Shared read-only methods using one provider state.
void(* service)(void *context)
nx_result_t(* stop)(void *context)
nx_result_t(* rx_stop)(void *context)
nx_result_t(* attach_wake)(void *context, const nx_irq_wake_t *wake, uint8_t syscall_ceiling)
nx_result_t(* read_bytes)(void *context, uint8_t *bytes, size_t capacity, size_t *count)
nx_result_t(* read_events)(void *context, nx_uart_rx_event_t *events, size_t capacity, size_t *count)
nx_result_t(* cancel)(void *context, nx_uart_tx_request_t *request)
nx_result_t(* submit)(void *context, nx_uart_tx_request_t *request)
nx_result_t(* start_admitted)(void *context, nx_uart_tx_request_t *request)
nx_result_t(* rx_start)(void *context, nx_stream_t *stream)
Immutable interface pointing to caller-owned state.
const nx_uart_ops_t * ops
Timestamp belongs to provider clock; precision is hardware-specific.
nx_time_us_t timestamp_us
Caller-owned TX descriptor; initialize base before first prepare.
uint64_t nx_time_us_t
Microseconds in one boot/clock domain; no wall-clock semantics.
nx_result_t nx_uart_port_start_admitted(const nx_uart_port_t *port, nx_uart_tx_request_t *request)
Start an adapter-admitted QUEUED request without readmission.
struct nx_uart_port nx_uart_port_t
void nx_uart_port_service(const nx_uart_port_t *port)
Observe time/hardware completion and drain one active request.
nx_result_t nx_uart_port_submit(const nx_uart_port_t *port, nx_uart_tx_request_t *request)
Submit one direct request to a single-executor UART.
nx_result_t nx_uart_port_read_bytes(const nx_uart_port_t *port, uint8_t *bytes, size_t capacity, size_t *count)
Read buffered bytes from the selected byte profile.
nx_result_t nx_uart_port_cancel(const nx_uart_port_t *port, nx_uart_tx_request_t *request)
Request cancellation; acceptance does not mean settlement.
nx_result_t nx_uart_tx_prepare(nx_uart_tx_request_t *request, const uint8_t *data, size_t length, nx_time_us_t deadline)
Prepare an unborrowed IRQ TX descriptor without copying data.
nx_result_t nx_uart_port_rx_start(const nx_uart_port_t *port, nx_stream_t *stream)
Start the selected RX block mode using exact caller storage.
nx_result_t nx_uart_port_read_events(const nx_uart_port_t *port, nx_uart_rx_event_t *events, size_t capacity, size_t *count)
Read buffered RX events from the selected event profile.
nx_result_t nx_uart_port_attach_wake(const nx_uart_port_t *port, const nx_irq_wake_t *wake, uint8_t syscall_ceiling)
Attach or detach one explicit IRQ wake target.
nx_result_t nx_uart_port_stop(const nx_uart_port_t *port)
Close admission and drain TX before releasing hardware.
nx_result_t nx_uart_port_rx_stop(const nx_uart_port_t *port)
Stop RX block production without revoking consumer loans.
Explicit borrowed IRQ wake target and syscall-ceiling check.