Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
GNSS Driver Backend API

Files

file  gnss_publish.h
 GNSS driver backend helpers for publishing data and satellite information.

Data Structures

struct  gnss_driver_api
  Driver Operations GNSS driver operations More...

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 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.
void gnss_publish_data (const struct device *dev, const struct gnss_data *data)
 Publish GNSS data to registered callbacks.
void gnss_publish_satellites (const struct device *dev, const struct gnss_satellite *satellites, uint16_t size)
 Publish GNSS satellite information to registered callbacks.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a GNSS driver.

Typedef Documentation

◆ gnss_get_enabled_systems_t

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.

◆ gnss_get_fix_rate_t

typedef int(* gnss_get_fix_rate_t) (const struct device *dev, uint32_t *fix_interval_ms)

#include <zephyr/drivers/gnss.h>

API for getting fix rate.

◆ gnss_get_latest_timepulse_t

typedef int(* gnss_get_latest_timepulse_t) (const struct device *dev, k_ticks_t *timestamp)

#include <zephyr/drivers/gnss.h>

API for getting timestamp of last PPS pulse.

◆ gnss_get_navigation_mode_t

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.

◆ gnss_get_supported_systems_t

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.

◆ gnss_set_enabled_systems_t

typedef int(* gnss_set_enabled_systems_t) (const struct device *dev, gnss_systems_t systems)

#include <zephyr/drivers/gnss.h>

API for enabling systems.

◆ gnss_set_fix_rate_t

typedef int(* gnss_set_fix_rate_t) (const struct device *dev, uint32_t fix_interval_ms)

#include <zephyr/drivers/gnss.h>

API for setting fix rate.

◆ gnss_set_navigation_mode_t

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.

Function Documentation

◆ gnss_publish_data()

void gnss_publish_data ( const struct device * dev,
const struct gnss_data * data )

#include <zephyr/drivers/gnss/gnss_publish.h>

Publish GNSS data to registered callbacks.

Invokes all callbacks registered with GNSS_DATA_CALLBACK_DEFINE() and GNSS_DT_DATA_CALLBACK_DEFINE() that match dev.

GNSS drivers should call this function whenever new navigation data is available from the receiver.

Parameters
devGNSS device instance publishing the data.
dataNavigation data, fix information, and UTC time to publish.
See also
GNSS_DATA_CALLBACK_DEFINE()
GNSS_DT_DATA_CALLBACK_DEFINE()

◆ gnss_publish_satellites()

void gnss_publish_satellites ( const struct device * dev,
const struct gnss_satellite * satellites,
uint16_t size )

#include <zephyr/drivers/gnss/gnss_publish.h>

Publish GNSS satellite information to registered callbacks.

Invokes all callbacks registered with GNSS_SATELLITES_CALLBACK_DEFINE() and GNSS_DT_SATELLITES_CALLBACK_DEFINE() that match dev.

GNSS drivers should call this function whenever updated satellite tracking information is available from the receiver.

Attention
Available only when the following Kconfig option is enabled: CONFIG_GNSS_SATELLITES.
Parameters
devGNSS device instance publishing the satellite data.
satellitesArray of satellite tracking data.
sizeNumber of elements in satellites.
See also
GNSS_SATELLITES_CALLBACK_DEFINE()
GNSS_DT_SATELLITES_CALLBACK_DEFINE()