Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
GNSS Interface . More...
Data Structures | |
struct | gnss_info |
GNSS info data structure. More... | |
struct | gnss_time |
GNSS time data structure. More... | |
struct | gnss_driver_api |
GNSS API structure. More... | |
struct | gnss_data |
GNSS data structure. More... | |
struct | gnss_data_callback |
GNSS callback structure. More... | |
struct | gnss_satellite |
GNSS satellite structure. More... | |
struct | gnss_satellites_callback |
GNSS callback structure. More... | |
Macros | |
#define | GNSS_DATA_CALLBACK_DEFINE(_dev, _callback) |
Register a callback structure for GNSS data published. | |
#define | GNSS_SATELLITES_CALLBACK_DEFINE(_dev, _callback) |
Register a callback structure for GNSS satellites published. | |
Typedefs | |
typedef int(* | gnss_set_fix_rate_t) (const struct device *dev, uint32_t fix_interval_ms) |
API for setting fix rate. | |
typedef int(* | gnss_get_fix_rate_t) (const struct device *dev, uint32_t *fix_interval_ms) |
API for getting fix rate. | |
typedef int(* | gnss_set_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode mode) |
API for setting navigation mode. | |
typedef int(* | gnss_get_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode *mode) |
API for getting navigation mode. | |
typedef uint32_t | gnss_systems_t |
Type storing bitmask of GNSS systems. | |
typedef int(* | gnss_set_enabled_systems_t) (const struct device *dev, gnss_systems_t systems) |
API for enabling systems. | |
typedef int(* | gnss_get_enabled_systems_t) (const struct device *dev, gnss_systems_t *systems) |
API for getting enabled systems. | |
typedef int(* | gnss_get_supported_systems_t) (const struct device *dev, gnss_systems_t *systems) |
API for getting enabled systems. | |
typedef int(* | gnss_get_latest_timepulse_t) (const struct device *dev, k_ticks_t *timestamp) |
API for getting timestamp of last PPS pulse. | |
typedef void(* | gnss_data_callback_t) (const struct device *dev, const struct gnss_data *data) |
Template for GNSS data callback. | |
typedef void(* | gnss_satellites_callback_t) (const struct device *dev, const struct gnss_satellite *satellites, uint16_t size) |
Template for GNSS satellites callback. | |
Functions | |
int | gnss_set_fix_rate (const struct device *dev, uint32_t fix_interval_ms) |
Set the GNSS fix rate. | |
int | gnss_get_fix_rate (const struct device *dev, uint32_t *fix_interval_ms) |
Get the GNSS fix rate. | |
int | gnss_set_navigation_mode (const struct device *dev, enum gnss_navigation_mode mode) |
Set the GNSS navigation mode. | |
int | gnss_get_navigation_mode (const struct device *dev, enum gnss_navigation_mode *mode) |
Get the GNSS navigation mode. | |
int | gnss_set_enabled_systems (const struct device *dev, gnss_systems_t systems) |
Set enabled GNSS systems. | |
int | gnss_get_enabled_systems (const struct device *dev, gnss_systems_t *systems) |
Get enabled GNSS systems. | |
int | gnss_get_supported_systems (const struct device *dev, gnss_systems_t *systems) |
Get supported GNSS systems. | |
int | gnss_get_latest_timepulse (const struct device *dev, k_ticks_t *timestamp) |
Get the timestamp of the latest PPS timepulse. | |
GNSS Interface .
#define GNSS_DATA_CALLBACK_DEFINE | ( | _dev, | |
_callback ) |
#include <zephyr/drivers/gnss.h>
Register a callback structure for GNSS data published.
_dev | Device pointer |
_callback | The callback function |
#define GNSS_SATELLITES_CALLBACK_DEFINE | ( | _dev, | |
_callback ) |
#include <zephyr/drivers/gnss.h>
Register a callback structure for GNSS satellites published.
_dev | Device pointer |
_callback | The callback function |
#include <zephyr/drivers/gnss.h>
Template for GNSS data callback.
typedef int(* gnss_get_enabled_systems_t) (const struct device *dev, gnss_systems_t *systems) |
#include <zephyr/drivers/gnss.h>
API for getting enabled systems.
#include <zephyr/drivers/gnss.h>
API for getting fix rate.
#include <zephyr/drivers/gnss.h>
API for getting timestamp of last PPS pulse.
typedef int(* gnss_get_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode *mode) |
#include <zephyr/drivers/gnss.h>
API for getting navigation mode.
typedef int(* gnss_get_supported_systems_t) (const struct device *dev, gnss_systems_t *systems) |
#include <zephyr/drivers/gnss.h>
API for getting enabled systems.
typedef void(* gnss_satellites_callback_t) (const struct device *dev, const struct gnss_satellite *satellites, uint16_t size) |
#include <zephyr/drivers/gnss.h>
Template for GNSS satellites callback.
typedef int(* gnss_set_enabled_systems_t) (const struct device *dev, gnss_systems_t systems) |
#include <zephyr/drivers/gnss.h>
API for enabling systems.
#include <zephyr/drivers/gnss.h>
API for setting fix rate.
typedef int(* gnss_set_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode mode) |
#include <zephyr/drivers/gnss.h>
API for setting navigation mode.
typedef uint32_t gnss_systems_t |
#include <zephyr/drivers/gnss.h>
Type storing bitmask of GNSS systems.
enum gnss_fix_quality |
#include <zephyr/drivers/gnss.h>
GNSS fix quality.
enum gnss_fix_status |
#include <zephyr/drivers/gnss.h>
GNSS fix status.
enum gnss_navigation_mode |
#include <zephyr/drivers/gnss.h>
GNSS navigation modes.
enum gnss_pps_mode |
#include <zephyr/drivers/gnss.h>
GNSS PPS modes.
enum gnss_system |
#include <zephyr/drivers/gnss.h>
Systems contained in gnss_systems_t.
int gnss_get_enabled_systems | ( | const struct device * | dev, |
gnss_systems_t * | systems ) |
#include <zephyr/drivers/gnss.h>
Get enabled GNSS systems.
dev | Device instance |
systems | Destination for enabled systems |
#include <zephyr/drivers/gnss.h>
Get the GNSS fix rate.
dev | Device instance |
fix_interval_ms | Destination for fix interval in milliseconds |
#include <zephyr/drivers/gnss.h>
Get the timestamp of the latest PPS timepulse.
dev | Device instance |
timestamp | Kernel tick count at the time of the PPS pulse |
0 | if successful |
-ENOSYS | if driver does not support API |
-ENOTSUP | if driver does not have PPS pin connected |
-EAGAIN | if PPS pulse is not considered valid |
int gnss_get_navigation_mode | ( | const struct device * | dev, |
enum gnss_navigation_mode * | mode ) |
#include <zephyr/drivers/gnss.h>
Get the GNSS navigation mode.
dev | Device instance |
mode | Destination for navigation mode |
int gnss_get_supported_systems | ( | const struct device * | dev, |
gnss_systems_t * | systems ) |
#include <zephyr/drivers/gnss.h>
Get supported GNSS systems.
dev | Device instance |
systems | Destination for supported systems |
int gnss_set_enabled_systems | ( | const struct device * | dev, |
gnss_systems_t | systems ) |
#include <zephyr/drivers/gnss.h>
Set enabled GNSS systems.
dev | Device instance |
systems | Systems to enable |
#include <zephyr/drivers/gnss.h>
Set the GNSS fix rate.
dev | Device instance |
fix_interval_ms | Fix interval to set in milliseconds |
int gnss_set_navigation_mode | ( | const struct device * | dev, |
enum gnss_navigation_mode | mode ) |
#include <zephyr/drivers/gnss.h>
Set the GNSS navigation mode.
dev | Device instance |
mode | Navigation mode to set |