no-OS
Loading...
Searching...
No Matches
no_os_gnss.h File Reference

Header file of GNSS Interface. More...

#include <stdint.h>
#include <stdbool.h>
Include dependency graph for no_os_gnss.h:

Classes

struct  no_os_gnss_pps_config
 GNSS PPS configuration structure for timing synchronization. More...
 
struct  no_os_gnss_precise_time
 API-level precise time information structure. More...
 
struct  no_os_gnss_position_data
 API-level position and fix quality data structure. More...
 
struct  no_os_gnss_init_param
 Structure holding the parameters for GNSS initialization. More...
 
struct  no_os_gnss_desc
 Structure holding the GNSS descriptor. More...
 
struct  no_os_gnss_platform_ops
 Structure holding GNSS function pointers that point to the platform specific function. More...
 

Functions

int32_t no_os_gnss_init (struct no_os_gnss_desc **desc, const struct no_os_gnss_init_param *param)
 Initialize the GNSS communication peripheral.
 
int32_t no_os_gnss_remove (struct no_os_gnss_desc *desc)
 Free the resources allocated by no_os_gnss_init().
 
int32_t no_os_gnss_refresh_timing_data (struct no_os_gnss_desc *desc)
 Refresh timing data from GNSS device.
 
int32_t no_os_gnss_is_timing_valid (struct no_os_gnss_desc *desc, bool *valid)
 Check if timing data is valid.
 
int32_t no_os_gnss_get_unified_timing (struct no_os_gnss_desc *desc, struct no_os_gnss_precise_time *timing)
 Get unified timing information with best available precision.
 
int32_t no_os_gnss_get_unix_epoch_unified (struct no_os_gnss_desc *desc, uint32_t *epoch, uint32_t *fractional_seconds)
 Get Unix epoch timestamp with unified precision.
 
int32_t no_os_gnss_get_position_data (struct no_os_gnss_desc *desc, struct no_os_gnss_position_data *position_data)
 Get GPS position and fix quality data.
 

Variables

const struct no_os_gnss_platform_ops nmea_ubx_gnss_ops
 Platform operations structure for NMEA/UBX GNSS devices.
 

Detailed Description

Header file of GNSS Interface.

Author
Radu Etz (radu..nosp@m.etz@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2025(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ no_os_gnss_get_position_data()

int32_t no_os_gnss_get_position_data ( struct no_os_gnss_desc * desc,
struct no_os_gnss_position_data * position_data )

Get GPS position and fix quality data.

Parameters
desc- The GNSS descriptor.
position_data- Pointer to store position data.
Returns
0 on success, negative error code otherwise.

◆ no_os_gnss_get_unified_timing()

int32_t no_os_gnss_get_unified_timing ( struct no_os_gnss_desc * desc,
struct no_os_gnss_precise_time * timing )

Get unified timing information with best available precision.

Parameters
desc- The GNSS descriptor.
timing- Pointer to structure to store timing information.
Returns
0 in case of success, negative error code otherwise.

◆ no_os_gnss_get_unix_epoch_unified()

int32_t no_os_gnss_get_unix_epoch_unified ( struct no_os_gnss_desc * desc,
uint32_t * epoch,
uint32_t * fractional_seconds )

Get Unix epoch timestamp with unified precision.

Parameters
desc- The GNSS descriptor.
epoch- Pointer to store Unix epoch timestamp in seconds.
fractional_seconds- Pointer to store fractional seconds (microseconds).
Returns
0 in case of success, negative error code otherwise.

◆ no_os_gnss_init()

int32_t no_os_gnss_init ( struct no_os_gnss_desc ** desc,
const struct no_os_gnss_init_param * param )

Initialize the GNSS communication peripheral.

Parameters
desc- The GNSS descriptor.
param- The structure that contains the GNSS parameters.
Returns
0 in case of success, negative error code otherwise.

◆ no_os_gnss_is_timing_valid()

int32_t no_os_gnss_is_timing_valid ( struct no_os_gnss_desc * desc,
bool * valid )

Check if timing data is valid.

Parameters
desc- The GNSS descriptor.
valid- Pointer to store timing validity status.
Returns
0 in case of success, negative error code otherwise.

◆ no_os_gnss_refresh_timing_data()

int32_t no_os_gnss_refresh_timing_data ( struct no_os_gnss_desc * desc)

Refresh timing data from GNSS device.

Parameters
desc- The GNSS descriptor.
Returns
0 in case of success, negative error code otherwise.

◆ no_os_gnss_remove()

int32_t no_os_gnss_remove ( struct no_os_gnss_desc * desc)

Free the resources allocated by no_os_gnss_init().

Parameters
desc- The GNSS descriptor.
Returns
0 in case of success, negative error code otherwise.

Variable Documentation

◆ nmea_ubx_gnss_ops

const struct no_os_gnss_platform_ops nmea_ubx_gnss_ops
extern

Platform operations structure for NMEA/UBX GNSS devices.