13#ifndef ZEPHYR_INCLUDE_DRIVERS_CELLULAR_H_
14#define ZEPHYR_INCLUDE_DRIVERS_CELLULAR_H_
115 const void *payload,
void *user_data);
static int cellular_get_signal(const struct device *dev, const enum cellular_signal_type type, int16_t *value)
Get signal for the device.
Definition cellular.h:228
int(* cellular_api_get_modem_info)(const struct device *dev, const enum cellular_modem_info_type type, char *info, size_t size)
API for getting modem information.
Definition cellular.h:132
int(* cellular_api_get_registration_status)(const struct device *dev, enum cellular_access_technology tech, enum cellular_registration_status *status)
API for getting registration status.
Definition cellular.h:137
cellular_access_technology
Cellular access technologies.
Definition cellular.h:32
cellular_event
Events emitted asynchronously by a cellular driver.
Definition cellular.h:89
static int cellular_set_apn(const struct device *dev, const char *apn)
Set the APN used for PDP context.
Definition cellular.h:307
int(* cellular_api_get_supported_networks)(const struct device *dev, const struct cellular_network **networks, uint8_t *size)
API for getting supported networks.
Definition cellular.h:123
static int cellular_get_supported_networks(const struct device *dev, const struct cellular_network **networks, uint8_t *size)
Get supported cellular networks for the device.
Definition cellular.h:203
int(* cellular_api_configure_networks)(const struct device *dev, const struct cellular_network *networks, uint8_t size)
API for configuring networks.
Definition cellular.h:118
cellular_registration_status
Definition cellular.h:79
cellular_signal_type
Cellular signal type.
Definition cellular.h:57
static int cellular_get_modem_info(const struct device *dev, const enum cellular_modem_info_type type, char *info, size_t size)
Get modem info for the device.
Definition cellular.h:253
int(* cellular_api_get_signal)(const struct device *dev, const enum cellular_signal_type type, int16_t *value)
API for getting network signal strength.
Definition cellular.h:128
static int cellular_set_callback(const struct device *dev, cellular_event_mask_t mask, cellular_event_cb_t cb, void *user_data)
Subscribe to asynchronous cellular events.
Definition cellular.h:332
uint32_t cellular_event_mask_t
Definition cellular.h:95
static int cellular_configure_networks(const struct device *dev, const struct cellular_network *networks, uint8_t size)
Configure cellular networks for the device.
Definition cellular.h:180
int(* cellular_api_set_apn)(const struct device *dev, const char *apn)
API for programming APN.
Definition cellular.h:142
void(* cellular_event_cb_t)(const struct device *dev, enum cellular_event event, const void *payload, void *user_data)
Prototype for cellular event callbacks.
Definition cellular.h:114
int(* cellular_api_set_callback)(const struct device *dev, cellular_event_mask_t mask, cellular_event_cb_t cb, void *user_data)
API for registering an asynchronous callback.
Definition cellular.h:145
cellular_modem_info_type
Cellular modem info type.
Definition cellular.h:64
static int cellular_get_registration_status(const struct device *dev, enum cellular_access_technology tech, enum cellular_registration_status *status)
Get network registration status for the device.
Definition cellular.h:278
@ CELLULAR_ACCESS_TECHNOLOGY_LTE
Definition cellular.h:37
@ CELLULAR_ACCESS_TECHNOLOGY_UMTS
Definition cellular.h:35
@ CELLULAR_ACCESS_TECHNOLOGY_NB_IOT
Definition cellular.h:40
@ CELLULAR_ACCESS_TECHNOLOGY_GPRS
Definition cellular.h:34
@ CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M2
Definition cellular.h:39
@ CELLULAR_ACCESS_TECHNOLOGY_GSM
Definition cellular.h:33
@ CELLULAR_ACCESS_TECHNOLOGY_EDGE
Definition cellular.h:36
@ CELLULAR_ACCESS_TECHNOLOGY_LTE_CAT_M1
Definition cellular.h:38
@ CELLULAR_EVENT_MODEM_INFO_CHANGED
One or more modem-info field changed (e.g.
Definition cellular.h:91
@ CELLULAR_REGISTRATION_UNKNOWN
Definition cellular.h:84
@ CELLULAR_REGISTRATION_SEARCHING
Definition cellular.h:82
@ CELLULAR_REGISTRATION_DENIED
Definition cellular.h:83
@ CELLULAR_REGISTRATION_REGISTERED_HOME
Definition cellular.h:81
@ CELLULAR_REGISTRATION_NOT_REGISTERED
Definition cellular.h:80
@ CELLULAR_REGISTRATION_REGISTERED_ROAMING
Definition cellular.h:85
@ CELLULAR_SIGNAL_RSRQ
Definition cellular.h:60
@ CELLULAR_SIGNAL_RSRP
Definition cellular.h:59
@ CELLULAR_SIGNAL_RSSI
Definition cellular.h:58
@ CELLULAR_MODEM_INFO_SIM_IMSI
International Mobile Subscriber Identity.
Definition cellular.h:74
@ CELLULAR_MODEM_INFO_MANUFACTURER
Modem manufacturer.
Definition cellular.h:70
@ CELLULAR_MODEM_INFO_MODEL_ID
Modem model ID.
Definition cellular.h:68
@ CELLULAR_MODEM_INFO_SIM_ICCID
Integrated Circuit Card Identification Number (SIM)
Definition cellular.h:76
@ CELLULAR_MODEM_INFO_FW_VERSION
Modem fw version.
Definition cellular.h:72
@ CELLULAR_MODEM_INFO_IMEI
International Mobile Equipment Identity.
Definition cellular.h:66
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
#define ENOSYS
Function not implemented.
Definition errno.h:82
#define NULL
Definition iar_missing_defs.h:20
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT16_TYPE__ int16_t
Definition stdint.h:73
Cellular driver API.
Definition cellular.h:149
cellular_api_get_supported_networks get_supported_networks
Definition cellular.h:151
cellular_api_set_apn set_apn
Definition cellular.h:155
cellular_api_set_callback set_callback
Definition cellular.h:156
cellular_api_get_registration_status get_registration_status
Definition cellular.h:154
cellular_api_get_signal get_signal
Definition cellular.h:152
cellular_api_get_modem_info get_modem_info
Definition cellular.h:153
cellular_api_configure_networks configure_networks
Definition cellular.h:150
Payload for CELLULAR_EVENT_MODEM_INFO_CHANGED.
Definition cellular.h:98
enum cellular_modem_info_type field
Which field changed.
Definition cellular.h:99
Cellular network structure.
Definition cellular.h:44
uint16_t * bands
List of bands, as defined by the specified cellular access technology, to enables.
Definition cellular.h:51
uint16_t size
Size of bands.
Definition cellular.h:53
enum cellular_access_technology technology
Cellular access technology.
Definition cellular.h:46
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:516