nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
sensors ext_sensors

Module that manages external sensors. More...

Data Structures

struct  ext_sensor_evt
 Structure containing external sensor data. More...
 

Macros

#define ACCELEROMETER_CHANNELS   3
 

Typedefs

typedef void(* ext_sensor_handler_t) (const struct ext_sensor_evt *const evt)
 External sensors library asynchronous event handler.
 

Enumerations

enum  ext_sensor_evt_type {
  EXT_SENSOR_EVT_ACCELEROMETER_ACT_TRIGGER , EXT_SENSOR_EVT_ACCELEROMETER_INACT_TRIGGER , EXT_SENSOR_EVT_ACCELEROMETER_IMPACT_TRIGGER , EXT_SENSOR_EVT_ACCELEROMETER_ERROR ,
  EXT_SENSOR_EVT_TEMPERATURE_ERROR , EXT_SENSOR_EVT_HUMIDITY_ERROR , EXT_SENSOR_EVT_PRESSURE_ERROR , EXT_SENSOR_EVT_AIR_QUALITY_ERROR
}
 Enum containing callback events from library. More...
 

Functions

int ext_sensors_init (ext_sensor_handler_t handler)
 Initializes the library, sets callback handler.
 
int ext_sensors_temperature_get (double *temp)
 Get temperature from library.
 
int ext_sensors_humidity_get (double *humid)
 Get humidity from library.
 
int ext_sensors_pressure_get (double *press)
 Get pressure from library.
 
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.
 
int ext_sensors_accelerometer_threshold_set (double threshold, bool upper)
 Set the threshold that triggers callback on accelerometer data.
 
int ext_sensors_inactivity_timeout_set (double inact_time)
 Set the timeout for the inactivity detection of the accelerometer.
 
int ext_sensors_accelerometer_trigger_callback_set (bool enable)
 Enable or disable accelerometer trigger handler.
 

Detailed Description

Module that manages external sensors.