11#ifndef EXT_SENSORS_H__
12#define EXT_SENSORS_H__
25#define ACCELEROMETER_CHANNELS 3
int ext_sensors_init(ext_sensor_handler_t handler)
Initializes the library, sets callback handler.
int ext_sensors_accelerometer_trigger_callback_set(bool enable)
Enable or disable accelerometer trigger handler.
int ext_sensors_air_quality_get(uint16_t *bsec_air_quality)
Get air quality. Air quality calculations are only available when enabling the Bosch BSEC library.
void(* ext_sensor_handler_t)(const struct ext_sensor_evt *const evt)
External sensors library asynchronous event handler.
Definition ext_sensors.h:65
int ext_sensors_inactivity_timeout_set(double inact_time)
Set the timeout for the inactivity detection of the accelerometer.
#define ACCELEROMETER_CHANNELS
Definition ext_sensors.h:25
int ext_sensors_humidity_get(double *humid)
Get humidity from library.
ext_sensor_evt_type
Enum containing callback events from library.
Definition ext_sensors.h:28
@ EXT_SENSOR_EVT_ACCELEROMETER_ERROR
Definition ext_sensors.h:37
@ EXT_SENSOR_EVT_ACCELEROMETER_IMPACT_TRIGGER
Definition ext_sensors.h:34
@ EXT_SENSOR_EVT_ACCELEROMETER_INACT_TRIGGER
Definition ext_sensors.h:32
@ EXT_SENSOR_EVT_HUMIDITY_ERROR
Definition ext_sensors.h:41
@ EXT_SENSOR_EVT_ACCELEROMETER_ACT_TRIGGER
Definition ext_sensors.h:30
@ EXT_SENSOR_EVT_TEMPERATURE_ERROR
Definition ext_sensors.h:39
@ EXT_SENSOR_EVT_PRESSURE_ERROR
Definition ext_sensors.h:43
@ EXT_SENSOR_EVT_AIR_QUALITY_ERROR
Definition ext_sensors.h:45
int ext_sensors_accelerometer_threshold_set(double threshold, bool upper)
Set the threshold that triggers callback on accelerometer data.
int ext_sensors_temperature_get(double *temp)
Get temperature from library.
int ext_sensors_pressure_get(double *press)
Get pressure from library.
double value_array[3]
Definition ext_sensors.h:55
double value
Definition ext_sensors.h:57
enum ext_sensor_evt_type type
Definition ext_sensors.h:51
Structure containing external sensor data.
Definition ext_sensors.h:49