GPS Device
Loading...
Searching...
No Matches
neo6.h File Reference

NEO-6M GPS module public API. More...

#include "stm32f401re.h"
#include "stm32f401re_gpio.h"
#include "stm32f401re_usart.h"
#include "err.h"
Include dependency graph for neo6.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NEO6_INFO_ts
 Holds all GPS data fields parsed from incoming NMEA sentences. More...
struct  NEO6_CFG_ts
 Configuration structure for initializing a NEO-6 handle. More...

Typedefs

typedef struct neo6_handle_s NEO6_HANDLE_ts
 Opaque handle representing the NEO-6 hardware instance.

Enumerations

enum  NEO6_MESSAGES_te {
  GPS_MESSAGE_GGA , GPS_MESSAGE_GLL , GPS_MESSAGE_GSA , GPS_MESSAGE_GSV ,
  GPS_MESSAGE_RMC , GPS_MESSAGE_VTG , GPS_MESSAGE_TXT
}
 NMEA sentence type identifiers. More...

Functions

ERR_te neo6_init_subsys (void)
 Initializes the NEO-6 subsystem.
ERR_te neo6_deinit_subsys (void)
 Deinitializes the NEO-6 subsystem.
ERR_te neo6_start_subsys (void)
 Starts the NEO-6 subsystem.
ERR_te neo6_stop_subsys (void)
 Stops the NEO-6 subsystem.
ERR_te neo6_init_handle (NEO6_CFG_ts *neo6_cfg, NEO6_HANDLE_ts **neo6_handle_o)
 Initializes the NEO-6 hardware handle.
ERR_te neo6_run (void)
 Processes received NMEA data. Must be called periodically.
ERR_te neo6_get_info (NEO6_INFO_ts **neo6_info_o)
 Returns a pointer to the internal GPS data structure.

Detailed Description

NEO-6M GPS module public API.

Author
github.com/Baksi675

This module provides NMEA sentence parsing for the u-blox NEO-6M GPS receiver over USART with interrupt-driven reception. Received bytes are accumulated in a circular buffer and processed sentence-by-sentence by neo6_run.

The following NMEA sentence types are parsed:

  • GGA — fix quality, satellites used, orthometric height, geoid separation
  • GSA — fix type, PDOP, HDOP, VDOP
  • GSV — total satellites in view
  • RMC — latitude, longitude, UTC time, date
  • VTG — movement speed (kph), movement direction (degrees true north)

Parsed fields are stored in a single NEO6_INFO_ts structure accessible via neo6_get_info. All fields are null-terminated strings; unavailable or invalid data is indicated by the string "No data".

Typical usage:

Version
0.1
Date
2026-02-03

Definition in file neo6.h.