396 case 0: *value_o = neo6_info->
lat;
break;
397 case 1: *value_o = neo6_info->
lon;
break;
398 case 2: *value_o = neo6_info->
ort_height;
break;
399 case 3: *value_o = neo6_info->
geoid_sep;
break;
417 case 0: *value_o = neo6_info->
date;
break;
418 case 1: *value_o = neo6_info->
time;
break;
436 case 0: *value_o = neo6_info->
mov_speed;
break;
437 case 1: *value_o = neo6_info->
mov_dir;
break;
455 case 0: *value_o = neo6_info->
fix_status;
break;
456 case 1: *value_o = neo6_info->
fix_type;
break;
457 case 2: *value_o = neo6_info->
pdop;
break;
458 case 3: *value_o = neo6_info->
hdop;
break;
459 case 4: *value_o = neo6_info->
vdop;
break;
Arm Cortex-M4 SysTick driver public API.
Common utility module public API.
Console subsystem public API.
Data log module public API.
System-wide error code definitions.
bool str_cmp(const char *str1, const char *str2)
Compares two null-terminated strings for equality.
int str_cpy(char *str_to, const char *str_from, uint32_t len)
Copies a null-terminated string into a destination buffer.
uint32_t get_str_len(char const *str)
Returns the length of a string, excluding the null terminator.
int txt_cpy(char *txt_to, const char *txt_from, uint32_t len)
Copies a fixed-length block of text into a destination buffer.
#define DELAY(ms)
Blocking delay using the system tick counter.
ERR_te console_init(CONSOLE_HANDLE_ts *console_handle)
Initializes the console subsystem.
ERR_te console_run(void)
Runs the console state machine. Must be called periodically.
uint32_t systick_get_ms(void)
Returns the number of milliseconds elapsed since SysTick was initialized.
ERR_te datalog_init_handle(DATALOG_CFG_ts const *datalog_cfg, DATALOG_HANDLE_ts **datalog_handle_o)
Initializes and registers a data log handle.
ERR_te datalog_run_handle(DATALOG_HANDLE_ts *datalog_handle)
Writes a GPS data entry to the log file if the logging interval has elapsed.
ERR_te datalog_start_subsys(void)
Starts the data log subsystem.
ERR_te datalog_init_subsys(void)
Initializes the data log subsystem.
struct datalog_handle_s DATALOG_HANDLE_ts
Opaque handle representing a data log instance.
ERR_te
Standard return type used by all public API functions.
ERR_te io_init_handle(IO_CFG_ts *io_cfg, IO_HANDLE_ts **io_handle_o)
Initializes and registers an IO handle.
ERR_te io_start_subsys(void)
Starts the IO subsystem.
ERR_te io_init_subsys(void)
Initializes the IO subsystem.
struct io_handle_s IO_HANDLE_ts
Opaque handle representing an IO instance.
ERR_te neo6_run(void)
Processes received NMEA data. Must be called periodically.
ERR_te neo6_start_subsys(void)
Starts 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_init_subsys(void)
Initializes the NEO-6 subsystem.
ERR_te neo6_get_info(NEO6_INFO_ts **neo6_info_o)
Returns a pointer to the internal GPS data structure.
struct neo6_handle_s NEO6_HANDLE_ts
Opaque handle representing the NEO-6 hardware instance.
ERR_te ssd1309_init_handle(SSD1309_CFG_ts *ssd1309_cfg, SSD1309_HANDLE_ts **ssd1309_handle_o)
Initializes the SSD1309 display and sends the full configuration sequence over I2C.
ERR_te ssd1309_init_subsys(void)
Initializes the SSD1309 subsystem.
ERR_te ssd1309_start_subsys(void)
Starts the SSD1309 subsystem.
ERR_te ssd1309_get_def_cfg(SSD1309_CFG_ts *ssd1309_cfg_o)
Populates a configuration structure with sensible default values.
#define SSD1309_MAX_CHARS_IN_LINE
struct ssd1309_handle_s SSD1309_HANDLE_ts
Opaque handle representing an SSD1309 display instance.
void gpio_init(GPIO_CFG_ts *gpio_cfg)
Initializes a GPIO pin according to the given configuration.
@ GPIO_ALTERNATE_FUNCTION_AF7
@ GPIO_ALTERNATE_FUNCTION_AF4
@ GPIO_ALTERNATE_FUNCTION_AF8
Digital IO module public API.
MENU_HANDLE_ts * datetime_menu
MENU_HANDLE_ts * satellites_menu
static ERR_te acquire_neo6_location(uint8_t index, char **value_o)
Data-view callback for the location menu.
char selected_option[SSD1309_MAX_CHARS_IN_LINE]
static void run_all(void)
Runs all subsystems for one iteration of the main loop.
MENU_HANDLE_ts * movement_menu
MENU_HANDLE_ts * main_menu
static void init_all(void)
Initializes all subsystems and hardware peripherals.
static ERR_te acquire_satellites(uint8_t index, char **value_o)
Data-view callback for the satellites menu.
DATALOG_HANDLE_ts * datalog_handle
static ERR_te acquire_accuracy(uint8_t index, char **value_o)
Data-view callback for the accuracy menu.
MENU_HANDLE_ts * accuracy_menu
MENU_HANDLE_ts * location_menu
NEO6_HANDLE_ts * neo6_handle
SSD1309_HANDLE_ts * ssd1309_handle
static ERR_te acquire_movement(uint8_t index, char **value_o)
Data-view callback for the movement menu.
MENU_HANDLE_ts * current_menu
static ERR_te acquire_datetime(uint8_t index, char **value_o)
Data-view callback for the date/time menu.
NEO-6M GPS module public API.
SSD1309 OLED display driver public API.
STM32F401RE MCU-specific peripheral register definitions and bit position enumerations.
STM32F401RE GPIO driver public API.
Configuration handle for initializing the console subsystem.
USART_BAUD_RATE_te usart_baud_rate
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function
GPIO_REGDEF_ts * gpio_port
USART_REGDEF_ts * usart_instance
Configuration structure for initializing a data log handle.
char name[CONFIG_SD_MAX_NAME_LEN]
DATALOG_TIME_te datalog_time
Configuration structure for initializing a GPIO pin.
Configuration structure for initializing an IO handle.
char name[CONFIG_IO_MAX_NAME_LEN]
GPIO_CFG_ts * gpio_handle
Configuration structure for initializing a NEO-6 handle.
USART_REGDEF_ts * usart_instance
GPIO_REGDEF_ts * rx_gpio_port
GPIO_REGDEF_ts * tx_gpio_port
USART_BAUD_RATE_te usart_baud_rate
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function
Holds all GPS data fields parsed from incoming NMEA sentences.
Full configuration structure for initializing an SSD1309 display handle.
GPIO_ALTERNATE_FUNCTION_te gpio_alternate_function
I2C_REGDEF_ts * i2c_instance
GPIO_REGDEF_ts * scl_gpio_port
GPIO_REGDEF_ts * sda_gpio_port