26#include <zephyr/types.h>
27#include <zephyr/kernel.h>
28#include <zephyr/sys/util_macro.h>
29#include <zephyr/toolchain.h>
32#define SLM_AT_CMD_RESPONSE_MAX_LEN 2100
164#define SLM_MONITOR(name, _filter, _handler, ...) \
165 static void _handler(const char *); \
166 static STRUCT_SECTION_ITERABLE(slm_monitor_entry, name) = { \
168 .handler = _handler, \
169 COND_CODE_1(__VA_ARGS__, (.paused = __VA_ARGS__,), ()) \
at_cmd_state
AT command result codes.
Definition modem_slm.h:37
@ AT_CMD_OK
Definition modem_slm.h:38
@ AT_CMD_ERROR_CMS
Definition modem_slm.h:40
@ AT_CMD_ERROR_CME
Definition modem_slm.h:41
@ AT_CMD_ERROR
Definition modem_slm.h:39
@ AT_CMD_PENDING
Definition modem_slm.h:42
int modem_slm_wake_up(void)
Wakeup nRF9160 SiP via MODEM_SLM_WAKEUP_PIN.
void(* slm_ind_handler_t)(void)
Definition modem_slm.h:64
int modem_slm_uninit(void)
Un-initialize Modem SLM library.
int modem_slm_register_ind(slm_ind_handler_t handler, bool wakeup)
Register callback for MODEM_SLM_INDICATE_PIN indication.
int modem_slm_send_data(const uint8_t *const data, size_t datalen)
Function to send raw data in SLM data mode.
void(* slm_monitor_handler_t)(const char *notif)
SLM monitor callback.
Definition modem_slm.h:133
int modem_slm_send_cmd(const char *const command, uint32_t timeout)
Function to send an AT command in SLM command mode.
static void slm_monitor_resume(struct slm_monitor_entry *mon)
Resume monitor.
Definition modem_slm.h:191
int modem_slm_init(slm_data_handler_t handler)
Initialize Modem SLM library.
#define MON_ACTIVE
Definition modem_slm.h:152
void modem_slm_reset_uart(void)
Reset the RX function of the serial interface.
#define MON_PAUSED
Definition modem_slm.h:150
static void slm_monitor_pause(struct slm_monitor_entry *mon)
Pause monitor.
Definition modem_slm.h:179
void(* slm_data_handler_t)(const uint8_t *data, size_t datalen)
Definition modem_slm.h:57
const char * filter
Definition modem_slm.h:140
uint8_t paused
Definition modem_slm.h:144
const slm_monitor_handler_t handler
Definition modem_slm.h:142
SLM monitor entry.
Definition modem_slm.h:138