STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
sensors_task.h
Go to the documentation of this file.
1#ifndef STAR_SENSORS_TASK_H
2#define STAR_SENSORS_TASK_H
3
4/*
5 * Owns SPI3 (IMU, high-g, baro). Wakes on the IMU and high-g data-ready
6 * interrupts (board_exti) or on sensors_core's next deadline, runs
7 * sensors_core_step, and hands each record to the eMMC log. Highest
8 * priority of the application tasks.
9 */
10
11#include <stdbool.h>
12
13#include "sensors_core.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* Starts stopped: chips stay in power-down until sensors_task_set_active. */
20bool sensors_task_start(void);
21
22/* true: init the three chips and sample; false: power them down (Idle).
23 * Any task; takes effect on the sensors task's next wake. */
24void sensors_task_set_active(bool on);
25
26/* Snapshot of the latest samples and per-sensor counters (any task). */
28
29#ifdef __cplusplus
30}
31#endif
32#endif
void sensors_task_snapshot(sensors_core_t *out)
bool sensors_task_start(void)
void sensors_task_set_active(bool on)