nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
modem_slm.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include <zephyr/types.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util_macro.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Data Structures

struct  slm_monitor_entry
 SLM monitor entry. More...
 

Macros

#define SLM_AT_CMD_RESPONSE_MAX_LEN   2100
 
#define MON_ANY   NULL
 
#define MON_PAUSED   1
 
#define MON_ACTIVE   0
 
#define SLM_MONITOR(name, _filter, _handler, ...)
 Define an SLM monitor to receive notifications in the system workqueue thread.
 

Typedefs

typedef void(* slm_data_handler_t) (const uint8_t *data, size_t datalen)
 
typedef void(* slm_ind_handler_t) (void)
 
typedef void(* slm_monitor_handler_t) (const char *notif)
 SLM monitor callback.
 

Enumerations

enum  at_cmd_state {
  AT_CMD_OK , AT_CMD_ERROR , AT_CMD_ERROR_CMS , AT_CMD_ERROR_CME ,
  AT_CMD_PENDING
}
 AT command result codes. More...
 

Functions

int modem_slm_init (slm_data_handler_t handler)
 Initialize Modem SLM library.
 
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_wake_up (void)
 Wakeup nRF9160 SiP via MODEM_SLM_WAKEUP_PIN.
 
void modem_slm_reset_uart (void)
 Reset the RX function of the serial interface.
 
int modem_slm_send_cmd (const char *const command, uint32_t timeout)
 Function to send an AT command in SLM command mode.
 
int modem_slm_send_data (const uint8_t *const data, size_t datalen)
 Function to send raw data in SLM data mode.
 
static void slm_monitor_pause (struct slm_monitor_entry *mon)
 Pause monitor.
 
static void slm_monitor_resume (struct slm_monitor_entry *mon)
 Resume monitor.