|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Define device instances that use the cellular modem driver. More...
Data Structures | |
| struct | modem_cellular_board_init |
| Descriptor binding a board-supplied init script to a modem instance. More... | |
Macros | |
| #define | MODEM_CELLULAR_INST_NAME(name, inst) |
| Generate a unique C identifier for a modem instance object. | |
| #define | MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES(inst, ...) |
| Define additional CMUX user pipes for a modem instance. | |
| #define | MODEM_CELLULAR_COMMON_CHAT_MATCHES() |
| Define common chat matches used by cellular modem scripts. | |
| #define | MODEM_CELLULAR_COMMON_UNSOL_MATCHES |
| Expand to the common unsolicited response matches. | |
| #define | MODEM_CELLULAR_DEFINE_INSTANCE(inst, vendor_config) |
| Define a cellular modem device instance. | |
| #define | MODEM_CELLULAR_BOARD_INIT_DEFINE(node_id, _script) |
| Register a board-specific init script for a modem instance. | |
Define device instances that use the cellular modem driver.
See the cellular modem documentation for a complete out-of-tree driver example.
| #define MODEM_CELLULAR_BOARD_INIT_DEFINE | ( | node_id, | |
| _script ) |
#include <zephyr/drivers/modem/modem_cellular.h>
Register a board-specific init script for a modem instance.
The script runs over the AT control channel after CMUX is established and before APN and network configuration. The driver supplies the completion callback that advances the connect sequence, so the script's own callback is unused.
| node_id | Devicetree node identifier of the modem instance. |
| _script | Pointer to a modem_chat_script defined with MODEM_CHAT_SCRIPT_DEFINE. |
| #define MODEM_CELLULAR_COMMON_CHAT_MATCHES | ( | ) |
#include <zephyr/drivers/modem/modem_cellular.h>
Define common chat matches used by cellular modem scripts.
Invoke this macro once at file scope. It defines matches for successful commands, common command failures, modem identity and signal queries, and PPP dial responses. The generated identifiers are intended for use in the modem's modem_cellular_config_scripts.
| #define MODEM_CELLULAR_COMMON_UNSOL_MATCHES |
#include <zephyr/drivers/modem/modem_cellular.h>
Expand to the common unsolicited response matches.
Use this macro in the entry list passed to MODEM_CHAT_MATCHES_DEFINE(). Vendor drivers may add additional entries after this expansion.
| #define MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES | ( | inst, | |
| ... ) |
#include <zephyr/drivers/modem/modem_cellular.h>
Define additional CMUX user pipes for a modem instance.
Each variadic argument is a parenthesized (name, dlci_address) pair. The macro defines the receive buffers, pipe links, and user-pipe array consumed by MODEM_CELLULAR_DEFINE_INSTANCE. Invoke it once for each modem instance before invoking MODEM_CELLULAR_DEFINE_INSTANCE.
| inst | Devicetree instance number. |
| ... | One or more (name, dlci_address) pairs. |
| #define MODEM_CELLULAR_DEFINE_INSTANCE | ( | inst, | |
| vendor_config ) |
#include <zephyr/drivers/modem/modem_cellular.h>
Define a cellular modem device instance.
This macro creates the immutable device configuration, power-management object, and Zephyr device for a devicetree instance. Before invoking it, define the instance's PPP object, initialize a modem_cellular_data object, and invoke MODEM_CELLULAR_DEFINE_AND_INIT_USER_PIPES().
| inst | Devicetree instance number. |
| vendor_config | Pointer to a constant modem_cellular_vendor_config object. Must not be NULL and must remain valid for the lifetime of the device. |
| #define MODEM_CELLULAR_INST_NAME | ( | name, | |
| inst ) |
#include <zephyr/drivers/modem/modem_cellular.h>
Generate a unique C identifier for a modem instance object.
| name | Base object name. |
| inst | Devicetree instance number. |