Skip to content
Permalink
Browse files

include: sensor: Allow sensor private attr/chan/trig

Add some flexibility to the sensor API.

Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
  • Loading branch information...
pdunaj authored and MaureenHelm committed May 28, 2019
1 parent 9367161 commit 938a8e14bdcc3665d82f47d58506592f00052cf0
Showing with 48 additions and 0 deletions.
  1. +48 −0 include/sensor.h
@@ -134,6 +134,22 @@ enum sensor_channel {

/** All channels. */
SENSOR_CHAN_ALL,

/**
* Number of all common sensor channels.
*/
SENSOR_CHAN_COMMON_COUNT,

/**
* This and higher values are sensor specific.
* Refer to the sensor header file.
*/
SENSOR_CHAN_PRIV_START = SENSOR_CHAN_COMMON_COUNT,

/**
* Maximum value describing a sensor channel type.
*/
SENSOR_CHAN_MAX = INT16_MAX,
};

/**
@@ -171,6 +187,22 @@ enum sensor_trigger_type {

/** Trigger fires when a double tap is detected. */
SENSOR_TRIG_DOUBLE_TAP,

/**
* Number of all common sensor triggers.
*/
SENSOR_TRIG_COMMON_COUNT,

/**
* This and higher values are sensor specific.
* Refer to the sensor header file.
*/
SENSOR_TRIG_PRIV_START = SENSOR_TRIG_COMMON_COUNT,

/**
* Maximum value describing a sensor trigger type.
*/
SENSOR_TRIG_MAX = INT16_MAX,
};

/**
@@ -217,6 +249,22 @@ enum sensor_attribute {
* algorithms to calibrate itself on a certain axis, or all of them.
*/
SENSOR_ATTR_CALIB_TARGET,

/**
* Number of all common sensor attributes.
*/
SENSOR_ATTR_COMMON_COUNT,

/**
* This and higher values are sensor specific.
* Refer to the sensor header file.
*/
SENSOR_ATTR_PRIV_START = SENSOR_ATTR_COMMON_COUNT,

/**
* Maximum value describing a sensor attribute type.
*/
SENSOR_ATTR_MAX = INT16_MAX,
};

/**

0 comments on commit 938a8e1

Please sign in to comment.
You can’t perform that action at this time.