STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
sensors_core.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "dev_bus.h"
#include "dev_ms5611.h"
#include "records.h"
Include dependency graph for sensors_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sensors_device_t
struct  sensors_core_t

Macros

#define SENSORS_EV_IMU   (1U << 0)
#define SENSORS_EV_HIGHG   (1U << 1)
#define SENSORS_IMU_PERIOD_US   1200U /* 833 Hz (ISM330DHCX ODR) */
#define SENSORS_HIGHG_PERIOD_US   2500U /* 400 Hz (H3LIS100DL ODR) */
#define SENSORS_BARO_STEP_US   (MS5611_CONVERSION_MS * 1000U)
#define SENSORS_RETRY_US   1000000U
#define SENSORS_MAX_ERRORS   3U

Typedefs

typedef record_sink_t sensors_sink_t

Functions

void sensors_core_init (sensors_core_t *core, uint32_t now_us)
void sensors_core_stop (sensors_core_t *core)
void sensors_core_step (sensors_core_t *core, uint32_t events, uint32_t imu_edge_us, uint32_t highg_edge_us, uint32_t now_us)
uint32_t sensors_core_wait_us (const sensors_core_t *core, uint32_t now_us)

Macro Definition Documentation

◆ SENSORS_BARO_STEP_US

#define SENSORS_BARO_STEP_US   (MS5611_CONVERSION_MS * 1000U)

◆ SENSORS_EV_HIGHG

#define SENSORS_EV_HIGHG   (1U << 1)

Definition at line 30 of file sensors_core.h.

Referenced by fly(), run(), sensors_core_step(), and sensors_task().

◆ SENSORS_EV_IMU

#define SENSORS_EV_IMU   (1U << 0)

Definition at line 29 of file sensors_core.h.

Referenced by fly(), run(), sensors_core_step(), and sensors_task().

◆ SENSORS_HIGHG_PERIOD_US

#define SENSORS_HIGHG_PERIOD_US   2500U /* 400 Hz (H3LIS100DL ODR) */

◆ SENSORS_IMU_PERIOD_US

◆ SENSORS_MAX_ERRORS

#define SENSORS_MAX_ERRORS   3U

Definition at line 36 of file sensors_core.h.

Referenced by failed(), and test_failing_imu_is_dropped_and_recovered().

◆ SENSORS_RETRY_US

Typedef Documentation

◆ sensors_sink_t

Definition at line 38 of file sensors_core.h.

Function Documentation

◆ sensors_core_init()

void sensors_core_init ( sensors_core_t * core,
uint32_t now_us )

◆ sensors_core_step()

◆ sensors_core_stop()

◆ sensors_core_wait_us()