summaryrefslogtreecommitdiff
path: root/components/drivers/include
diff options
context:
space:
mode:
authorTangyuxin <[email protected]>2022-04-05 19:35:23 +0800
committerGitHub <[email protected]>2022-04-05 19:35:23 +0800
commit59e751eb2ac5a8ec1878f5b8e6fca5dc90f12d9c (patch)
treeda73299e9c42f938f8f48a763b60cf3b438f513b /components/drivers/include
parent6bd22f3e6f454509697f0679a2c80101d657c14b (diff)
[sensor]Add blood pressure sensor type (#5766)
Diffstat (limited to 'components/drivers/include')
-rw-r--r--components/drivers/include/drivers/sensor.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/sensor.h b/components/drivers/include/drivers/sensor.h
index ac57a686b1..ba0afb33a8 100644
--- a/components/drivers/include/drivers/sensor.h
+++ b/components/drivers/include/drivers/sensor.h
@@ -52,6 +52,7 @@ extern "C" {
#define RT_SENSOR_CLASS_SPO2 (18) /* SpO2 sensor */
#define RT_SENSOR_CLASS_IAQ (19) /* IAQ sensor. */
#define RT_SENSOR_CLASS_ETOH (20) /* EtOH sensor. */
+#define RT_SENSOR_CLASS_BP (21) /* Blood Pressure */
/* Sensor vendor types */
@@ -93,6 +94,7 @@ extern "C" {
#define RT_SENSOR_UNIT_DMS (16) /* Coordinates unit: DMS */
#define RT_SENSOR_UNIT_DD (17) /* Coordinates unit: DD */
#define RT_SENSOR_UNIT_MGM3 (18) /* Concentration unit: mg/m3 */
+#define RT_SENSOR_UNIT_MMHG (19) /* Blood Pressure unit: mmHg */
/* Sensor communication interface types */
#define RT_SENSOR_INTF_I2C (1 << 0)
@@ -192,6 +194,13 @@ struct sensor_3_axis
rt_int32_t z;
};
+/* Blood Pressure Data Type */
+struct sensor_bp
+{
+ rt_int32_t sbp; /* SBP : systolic pressure */
+ rt_int32_t dbp; /* DBP : diastolic pressure */
+};
+
struct coordinates
{
double longitude;
@@ -223,6 +232,7 @@ struct rt_sensor_data
rt_uint32_t spo2; /* SpO2 sensor. unit: permillage */
rt_uint32_t iaq; /* IAQ sensor. unit: 1 */
rt_uint32_t etoh; /* EtOH sensor. unit: ppm */
+ struct sensor_bp bp; /* BloodPressure. unit: mmHg */
} data;
};