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

Go to the source code of this file.

Macros

#define EV_MODE   (1U << 4) /* sensors_task_set_active() */

Functions

static void to_emmc (void *ctx, uint8_t type, const void *data, uint8_t len)
static void sensors_task (void *argument)
void sensors_task_snapshot (sensors_core_t *out)
bool sensors_task_start (void)
void sensors_task_set_active (bool on)

Variables

static sensors_core_t core
static osMutexId_t snapshot_lock
static osThreadId_t thread
static volatile bool want_active

Macro Definition Documentation

◆ EV_MODE

#define EV_MODE   (1U << 4) /* sensors_task_set_active() */

Definition at line 10 of file sensors_task.c.

Function Documentation

◆ sensors_task()

◆ sensors_task_set_active()

void sensors_task_set_active ( bool on)

Definition at line 88 of file sensors_task.c.

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

Referenced by app_set_state(), and app_start().

◆ sensors_task_snapshot()

void sensors_task_snapshot ( sensors_core_t * out)

Definition at line 69 of file sensors_task.c.

References core, osMutexAcquire(), osMutexRelease(), osWaitForever, and snapshot_lock.

◆ sensors_task_start()

bool sensors_task_start ( void )

◆ to_emmc()

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

Definition at line 17 of file sensors_task.c.

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

Variable Documentation

◆ core

sensors_core_t core
static

Definition at line 12 of file sensors_task.c.

◆ snapshot_lock

osMutexId_t snapshot_lock
static

Definition at line 13 of file sensors_task.c.

Referenced by sensors_task(), sensors_task_snapshot(), and sensors_task_start().

◆ thread

osThreadId_t thread
static

Definition at line 14 of file sensors_task.c.

◆ want_active

volatile bool want_active
static

Definition at line 15 of file sensors_task.c.