|
GPS Device
|
NEO-6M GPS module implementation file. More...
#include <stdint.h>#include "neo6.h"#include "cmd.h"#include "common.h"#include "err.h"#include "init.h"#include "log.h"#include "modules.h"#include "stm32f401re_gpio.h"#include "stm32f401re_usart.h"#include "cbuf.h"#include "configuration.h"
Go to the source code of this file.
Classes | |
| struct | neo6_handle_s |
| Internal structure representing the NEO-6 hardware instance. More... | |
| struct | internal_state_s |
| Internal state of the SysTick driver. More... | |
Functions | |
| static ERR_te | neo6_calc_checksum (char *msg, uint32_t msg_len, uint8_t *checksum_o) |
| Computes the NMEA checksum of a sentence by XORing all bytes between '$' and '*'. | |
| static ERR_te | neo6_process_msg (uint8_t *msg, uint32_t msg_len) |
| Verifies the checksum of a received NMEA sentence and dispatches it to the appropriate parser. | |
| static ERR_te | neo6_process_rmc (char **tokens) |
| Parses an RMC sentence and updates time, date, latitude, and longitude. | |
| static ERR_te | neo6_process_vtg (char **tokens) |
| Parses a VTG sentence and updates movement direction and speed. | |
| static ERR_te | neo6_process_gga (char **tokens) |
| Parses a GGA sentence and updates fix status, satellites used, orthometric height, and geoid separation. | |
| static ERR_te | neo6_process_gsa (char **tokens) |
| Parses a GSA sentence and updates fix type, PDOP, HDOP, and VDOP. | |
| static ERR_te | neo6_process_gsv (char **tokens) |
| Parses a GSV sentence and updates the total satellite count. | |
| static ERR_te | neo6_dumpnmea_handler (uint32_t argc, char **argv) |
| CLI handler for the "dumpnmea" command. Enables or disables raw NMEA logging. | |
| 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. | |
| ERR_te | neo6_get_info (NEO6_INFO_ts **neo6_info_o) |
| Returns a pointer to the internal GPS data structure. | |
| void | usart6_irq_data_recv_callback (uint8_t data) |
| USART RXNE interrupt callback. Writes the received byte into the USART receive buffer. | |
Variables | |
| static uint8_t | usart_data_recv_cbuf_mem [128] |
| Backing memory for the USART receive circular buffer. | |
| static uint8_t | nmea_cbuf_mem [128] |
| Backing memory for the NMEA sentence accumulation buffer. | |
| static struct internal_state_s | internal_state |
| Singleton instance of the NEO-6 subsystem internal state. | |
| static CMD_INFO_ts | neo6_cmds [] |
| Table of CLI commands registered by the NEO-6 subsystem. | |
| static CMD_CLIENT_INFO_ts | neo6_cmd_client_info |
| Registration descriptor passed to the command subsystem. | |
NEO-6M GPS module implementation file.
Definition in file neo6.c.
| #define VTG_TMG_T_DEGREE_POS 1 |
| #define VTG_TMG_M_DEGREE_POS 3 |
| #define GGA_NUM_SATS_POS 7 |
| #define GGA_ORTH_HEIGHT_POS 9 |
| #define GGA_ORTH_HEIGHT_UNIT_POS 10 |
| #define GGA_DATA_REC_AGE_POS 13 |
| #define GSA_FIX_TYPE_POS 2 |
| #define GSV_NUM_OF_MESSAGES_POS 1 |
| #define GSV_NUM_OF_THIS_MESSAGE_POS 2 |
| #define GSV_NUM_SATS_VISIBLE_POS 3 |
| #define GSV_ELEVATION_POS 5 |
| #define GSV_AZIMUTH_POS 6 |
| #define GSV_SNR_POS 7 |
|
static |
|
static |
|
static |
|
static |
Table of CLI commands registered by the NEO-6 subsystem.
Registered with the command subsystem via neo6_cmd_client_info during neo6_init_subsys.
Definition at line 177 of file neo6.c.
|
static |
Registration descriptor passed to the command subsystem.
Bundles the command table, its size, the subsystem name prefix used on the CLI, and a pointer to the runtime log-level variable.
Definition at line 192 of file neo6.c.