81typedef enum : uint8_t {
90typedef enum : uint16_t {
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_modem_at_poll(void)
Pump the RX path without sending a command.
ra8_err_t ra8_modem_at_send_cmd_capture(const char *cmd, char *out_buf, size_t buf_len, uint16_t timeout_ms)
Send an AT command and capture the response payload.
ra8_err_t ra8_modem_at_register_unsolicited_handler(const char *prefix, ra8_modem_at_urc_fn_t fn, void *ctx)
Register a URC (unsolicited result code) handler.
ra8_err_t ra8_modem_at_send_cmd(const char *cmd, const char *expected_response, uint16_t timeout_ms)
Send an AT command and wait for OK/ERROR/expected.
void(* ra8_modem_at_urc_fn_t)(const char *line, void *ctx)
Unsolicited result-code (URC) handler signature.
ra8_modem_at_timeouts_t
Default per-command timeout when caller passes 0 ms.
@ k_ra8_modem_at_default_timeout_ms
RA8 modem at default timeout ms.
ra8_modem_at_limits_t
Compile-time tunables.
@ k_ra8_modem_at_max_prefix_len
Maximum bytes of a URC prefix (including + and :).
@ k_ra8_modem_at_max_unsolicited
Maximum number of registered URC handlers.
ra8_err_t ra8_modem_at_init(const ra8_modem_at_cfg_t *cfg)
Bind transport, buffer and timeout policy.
Configuration handed to ra8_modem_at_init.
uint16_t line_buf_len
Bytes in line_buf (>= 16).
uint8_t * line_buf
Caller-owned line accumulator buffer.
uint16_t default_timeout_ms
0 means use compiled default.
ra8_modem_at_io_t io
Byte transport (must be fully populated).
Byte-level transport injected into the AT driver (DIP).
uint32_t(* now_ms)(void *ctx)
Return monotonic time in milliseconds.
ra8_err_t(* rx_byte)(void *ctx, uint8_t *out_byte)
Try to receive a single byte without blocking.
ra8_err_t(* tx_byte)(void *ctx, uint8_t byte)
Transmit a single byte (blocking).
void * ctx
Opaque context passed to tx_byte/rx_byte/now_ms.