Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
Modem Ubx . More...
Data Structures | |
struct | modem_ubx_match |
struct | modem_ubx_script |
struct | modem_ubx |
struct | modem_ubx_config |
Macros | |
#define | MODEM_UBX_MATCH_ARRAY_DEFINE(_name, ...) |
#define | MODEM_UBX_MATCH_DEFINE(_class_id, _msg_id, _handler) |
Typedefs | |
typedef void(* | modem_ubx_match_callback) (struct modem_ubx *ubx, const struct ubx_frame *frame, size_t len, void *user_data) |
Functions | |
int | modem_ubx_attach (struct modem_ubx *ubx, struct modem_pipe *pipe) |
Attach pipe to Modem Ubx. | |
void | modem_ubx_release (struct modem_ubx *ubx) |
Release pipe from Modem Ubx instance. | |
int | modem_ubx_init (struct modem_ubx *ubx, const struct modem_ubx_config *config) |
Initialize Modem Ubx instance. | |
int | modem_ubx_run_script (struct modem_ubx *ubx, struct modem_ubx_script *script) |
Writes the ubx frame in script.request and reads back its response (if available) | |
int | modem_ubx_run_script_for_each (struct modem_ubx *ubx, struct modem_ubx_script *script, struct ubx_frame *array, size_t array_size) |
Modem Ubx .
#define MODEM_UBX_MATCH_ARRAY_DEFINE | ( | _name, | |
... ) |
#include <zephyr/modem/ubx.h>
#define MODEM_UBX_MATCH_DEFINE | ( | _class_id, | |
_msg_id, | |||
_handler ) |
#include <zephyr/modem/ubx.h>
typedef void(* modem_ubx_match_callback) (struct modem_ubx *ubx, const struct ubx_frame *frame, size_t len, void *user_data) |
#include <zephyr/modem/ubx.h>
int modem_ubx_attach | ( | struct modem_ubx * | ubx, |
struct modem_pipe * | pipe ) |
#include <zephyr/modem/ubx.h>
Attach pipe to Modem Ubx.
ubx | Modem Ubx instance |
pipe | Pipe instance to attach Modem Ubx instance to |
int modem_ubx_init | ( | struct modem_ubx * | ubx, |
const struct modem_ubx_config * | config ) |
#include <zephyr/modem/ubx.h>
Initialize Modem Ubx instance.
ubx | Modem Ubx instance |
config | Configuration which shall be applied to the Modem Ubx instance |
void modem_ubx_release | ( | struct modem_ubx * | ubx | ) |
#include <zephyr/modem/ubx.h>
Release pipe from Modem Ubx instance.
ubx | Modem Ubx instance |
int modem_ubx_run_script | ( | struct modem_ubx * | ubx, |
struct modem_ubx_script * | script ) |
#include <zephyr/modem/ubx.h>
Writes the ubx frame in script.request and reads back its response (if available)
For each ubx frame sent, the device responds in 0, 1 or both of the following ways:
This function writes the ubx frame in script.request then reads back it's response. If script.match is not NULL, then every ubx frame received from the device is compared with script.match to check if a match occurred. This could be used to match UBX-ACK frame sent from the device by populating script.match with UBX-ACK that the script expects to receive.
The script terminates when either of the following happens:
ubx | Modem Ubx instance |
script | Script to be executed |
int modem_ubx_run_script_for_each | ( | struct modem_ubx * | ubx, |
struct modem_ubx_script * | script, | ||
struct ubx_frame * | array, | ||
size_t | array_size ) |
#include <zephyr/modem/ubx.h>