STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
gnss_task.c File Reference
#include "gnss_task.h"
#include "board_time.h"
#include "board_uart9.h"
#include "cmsis_os2.h"
#include "emmc_stm32.h"
#include "main.h"
Include dependency graph for gnss_task.c:

Go to the source code of this file.

Macros

#define EV_RX   (1U << 0)
#define EV_MODE   (1U << 1) /* gnss_task_set_active() */

Functions

static void gps_power (bool on)
static void send (void *ctx, const uint8_t *bytes, uint16_t len)
static void set_baud (void *ctx, uint32_t baud)
static void to_emmc (void *ctx, uint8_t type, const void *data, uint8_t len)
static void gnss_task (void *argument)
bool gnss_task_start (void)
void gnss_task_set_active (bool on)
void gnss_task_poll_status (bool on)
const gnss_core_t * gnss_task_core (void)

Variables

static gnss_core_t core
static osThreadId_t thread
static volatile bool want_active
static volatile bool want_status

Macro Definition Documentation

◆ EV_MODE

#define EV_MODE   (1U << 1) /* gnss_task_set_active() */

◆ EV_RX

#define EV_RX   (1U << 0)

Definition at line 9 of file gnss_task.c.

Referenced by gnss_task().

Function Documentation

◆ gnss_task()

◆ gnss_task_core()

const gnss_core_t * gnss_task_core ( void )

Definition at line 110 of file gnss_task.c.

References core.

◆ gnss_task_poll_status()

void gnss_task_poll_status ( bool on)

Definition at line 106 of file gnss_task.c.

References want_status.

◆ gnss_task_set_active()

void gnss_task_set_active ( bool on)

Definition at line 99 of file gnss_task.c.

References EV_MODE, osThreadFlagsSet(), thread, and want_active.

Referenced by app_set_state(), and app_start().

◆ gnss_task_start()

bool gnss_task_start ( void )

Definition at line 89 of file gnss_task.c.

References gnss_task(), NULL, osPriorityNormal, osThreadNew(), and thread.

Referenced by app_start().

◆ gps_power()

void gps_power ( bool on)
static

◆ send()

◆ set_baud()

void set_baud ( void * ctx,
uint32_t baud )
static

Definition at line 32 of file gnss_task.c.

References board_uart9_set_baud().

Referenced by fake_gnss_io(), and gnss_task().

◆ to_emmc()

void to_emmc ( void * ctx,
uint8_t type,
const void * data,
uint8_t len )
static

Definition at line 37 of file gnss_task.c.

References emmc_log_append(), emmc_stm32_log(), and osKernelGetTickCount().

Referenced by gnss_task(), and sensors_task().

Variable Documentation

◆ core

gnss_core_t core
static

Definition at line 12 of file gnss_task.c.

Referenced by gnss_task(), gnss_task_core(), sensors_task(), and sensors_task_snapshot().

◆ thread

◆ want_active

volatile bool want_active
static

◆ want_status

volatile bool want_status
static

Definition at line 15 of file gnss_task.c.

Referenced by gnss_task(), and gnss_task_poll_status().