Add new sensor type and vendor type.

sensor type: force sensor
  vendor type: MiraMEMS
This commit is contained in:
Zhou DingHua
2019-04-17 16:09:06 +08:00
parent adc6dd5dbe
commit fdc9683150
3 changed files with 8 additions and 0 deletions

4
components/drivers/sensors/sensor.h Normal file → Executable file
View File

@@ -44,6 +44,7 @@ extern "C" {
#define RT_SENSOR_CLASS_TVOC (10) /* TVOC Level */
#define RT_SENSOR_CLASS_NOISE (11) /* Noise Loudness */
#define RT_SENSOR_CLASS_STEP (12) /* Step sensor */
#define RT_SENSOR_CLASS_FORCE (13) /* Force sensor */
/* Sensor vendor types */
@@ -53,6 +54,7 @@ extern "C" {
#define RT_SENSOR_VENDOR_INVENSENSE (3) /* Invensense */
#define RT_SENSOR_VENDOR_SEMTECH (4) /* Semtech */
#define RT_SENSOR_VENDOR_GOERTEK (5) /* Goertek */
#define RT_SENSOR_VENDOR_MIRAMEMS (6) /* MiraMEMS */
/* Sensor unit types */
@@ -69,6 +71,7 @@ extern "C" {
#define RT_SENSOR_UNIT_ONE (10) /* Dimensionless quantity unit: 1 */
#define RT_SENSOR_UNIT_BPM (11) /* Heart rate unit: bpm */
#define RT_SENSOR_UNIT_MM (12) /* Distance unit: mm */
#define RT_SENSOR_UNIT_MN (13) /* Force unit: mN */
/* Sensor communication interface types */
@@ -185,6 +188,7 @@ struct rt_sensor_data
rt_int32_t tvoc; /* TVOC. unit: permillage */
rt_int32_t noise; /* Noise Loudness. unit: HZ */
rt_uint32_t step; /* Step sensor. unit: 1 */
rt_int32_t force; /* Force sensor. unit: mN */
} data;
};