RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
sensor_v2.h 文件参考
#include <rtthread.h>
#include "dev_pin.h"
+ sensor_v2.h 的引用(Include)关系图:

浏览该文件的源代码.

结构体

struct  rt_sensor_accuracy
 
struct  rt_sensor_scale
 
struct  rt_sensor_info
 
struct  rt_sensor_intf
 
struct  rt_sensor_config
 
struct  rt_sensor_device
 
struct  rt_sensor_module
 
struct  sensor_3_axis
 
struct  sensor_bp
 
struct  coordinates
 
struct  rt_sensor_data
 
struct  rt_sensor_ops
 

宏定义

#define rt_sensor_get_ts()
 
#define RT_DEVICE_FLAG_FIFO_RX   0x200 /* Flag to use when the sensor is open by fifo mode */
 
#define RT_SENSOR_MODULE_MAX   (3) /* The maximum number of members of a sensor module */
 
#define RT_SENSOR_MACRO_GET_NAME(macro)
 
#define RT_SENSOR_TYPE_NONE   (0)
 
#define RT_SENSOR_TYPE_NONE_STR   "None"
 
#define RT_SENSOR_TYPE_ACCE   (1)
 
#define RT_SENSOR_TYPE_ACCE_STR   "Accelerometer"
 
#define RT_SENSOR_TYPE_GYRO   (2)
 
#define RT_SENSOR_TYPE_GYRO_STR   "Gyroscope"
 
#define RT_SENSOR_TYPE_MAG   (3)
 
#define RT_SENSOR_TYPE_MAG_STR   "Magnetometer"
 
#define RT_SENSOR_TYPE_TEMP   (4)
 
#define RT_SENSOR_TYPE_TEMP_STR   "Temperature"
 
#define RT_SENSOR_TYPE_HUMI   (5)
 
#define RT_SENSOR_TYPE_HUMI_STR   "Relative Humidity"
 
#define RT_SENSOR_TYPE_BARO   (6)
 
#define RT_SENSOR_TYPE_BARO_STR   "Barometer"
 
#define RT_SENSOR_TYPE_LIGHT   (7)
 
#define RT_SENSOR_TYPE_LIGHT_STR   "Ambient Light"
 
#define RT_SENSOR_TYPE_PROXIMITY   (8)
 
#define RT_SENSOR_TYPE_PROXIMITY_STR   "Proximity"
 
#define RT_SENSOR_TYPE_HR   (9)
 
#define RT_SENSOR_TYPE_HR_STR   "Heart Rate"
 
#define RT_SENSOR_TYPE_TVOC   (10)
 
#define RT_SENSOR_TYPE_TVOC_STR   "TVOC Level"
 
#define RT_SENSOR_TYPE_NOISE   (11)
 
#define RT_SENSOR_TYPE_NOISE_STR   "Noise Loudness"
 
#define RT_SENSOR_TYPE_STEP   (12)
 
#define RT_SENSOR_TYPE_STEP_STR   "Step"
 
#define RT_SENSOR_TYPE_FORCE   (13)
 
#define RT_SENSOR_TYPE_FORCE_STR   "Force"
 
#define RT_SENSOR_TYPE_DUST   (14)
 
#define RT_SENSOR_TYPE_DUST_STR   "Dust"
 
#define RT_SENSOR_TYPE_ECO2   (15)
 
#define RT_SENSOR_TYPE_ECO2_STR   "eCO2"
 
#define RT_SENSOR_TYPE_GNSS   (16)
 
#define RT_SENSOR_TYPE_GNSS_STR   "GNSS"
 
#define RT_SENSOR_TYPE_TOF   (17)
 
#define RT_SENSOR_TYPE_TOF_STR   "ToF"
 
#define RT_SENSOR_TYPE_SPO2   (18)
 
#define RT_SENSOR_TYPE_SPO2_STR   "SpO2"
 
#define RT_SENSOR_TYPE_IAQ   (19)
 
#define RT_SENSOR_TYPE_IAQ_STR   "IAQ"
 
#define RT_SENSOR_TYPE_ETOH   (20)
 
#define RT_SENSOR_TYPE_ETOH_STR   "EtOH"
 
#define RT_SENSOR_TYPE_BP   (21)
 
#define RT_SENSOR_TYPE_BP_STR   "Blood Pressure"
 
#define RT_SENSOR_TYPE_VOLTAGE   (22)
 
#define RT_SENSOR_TYPE_VOLTAGE_STR   "Voltage"
 
#define RT_SENSOR_TYPE_CURRENT   (23)
 
#define RT_SENSOR_TYPE_CURRENT_STR   "Current"
 
#define RT_SENSOR_VENDOR_UNKNOWN   (0)
 
#define RT_SENSOR_VENDOR_UNKNOWN_STR   "Unknown"
 
#define RT_SENSOR_VENDOR_VIRTUAL   (1)
 
#define RT_SENSOR_VENDOR_VIRTUAL_STR   "Virtual Sensor"
 
#define RT_SENSOR_VENDOR_ONCHIP   (2)
 
#define RT_SENSOR_VENDOR_ONCHIP_STR   "OnChip"
 
#define RT_SENSOR_VENDOR_STM   (3)
 
#define RT_SENSOR_VENDOR_STM_STR   "STMicroelectronics"
 
#define RT_SENSOR_VENDOR_BOSCH   (4)
 
#define RT_SENSOR_VENDOR_BOSCH_STR   "Bosch"
 
#define RT_SENSOR_VENDOR_INVENSENSE   (5)
 
#define RT_SENSOR_VENDOR_INVENSENSE_STR   "Invensense"
 
#define RT_SENSOR_VENDOR_SEMTECH   (6)
 
#define RT_SENSOR_VENDOR_SEMTECH_STR   "Semtech"
 
#define RT_SENSOR_VENDOR_GOERTEK   (7)
 
#define RT_SENSOR_VENDOR_GOERTEK_STR   "Goertek"
 
#define RT_SENSOR_VENDOR_MIRAMEMS   (8)
 
#define RT_SENSOR_VENDOR_MIRAMEMS_STR   "MiraMEMS"
 
#define RT_SENSOR_VENDOR_DALLAS   (9)
 
#define RT_SENSOR_VENDOR_DALLAS_STR   "Dallas"
 
#define RT_SENSOR_VENDOR_ASAIR   (10)
 
#define RT_SENSOR_VENDOR_ASAIR_STR   "Aosong"
 
#define RT_SENSOR_VENDOR_SHARP   (11)
 
#define RT_SENSOR_VENDOR_SHARP_STR   "Sharp"
 
#define RT_SENSOR_VENDOR_SENSIRION   (12)
 
#define RT_SENSOR_VENDOR_SENSIRION_STR   "Sensirion"
 
#define RT_SENSOR_VENDOR_TI   (13)
 
#define RT_SENSOR_VENDOR_TI_STR   "Texas Instruments"
 
#define RT_SENSOR_VENDOR_PLANTOWER   (14)
 
#define RT_SENSOR_VENDOR_PLANTOWER_STR   "Plantower"
 
#define RT_SENSOR_VENDOR_AMS   (15)
 
#define RT_SENSOR_VENDOR_AMS_STR   "ams-OSRAM AG"
 
#define RT_SENSOR_VENDOR_MAXIM   (16)
 
#define RT_SENSOR_VENDOR_MAXIM_STR   "Maxim Integrated"
 
#define RT_SENSOR_VENDOR_MELEXIS   (17)
 
#define RT_SENSOR_VENDOR_MELEXIS_STR   "Melexis"
 
#define RT_SENSOR_VENDOR_LSC   (18)
 
#define RT_SENSOR_VENDOR_LSC_STR   "Lite On"
 
#define RT_SENSOR_UNIT_NONE   (0) /* Dimensionless quantity */
 
#define RT_SENSOR_UNIT_NONE_STR   ""
 
#define RT_SENSOR_UNIT_MG   (1) /* Accelerometer unit: mG */
 
#define RT_SENSOR_UNIT_MG_STR   "mG"
 
#define RT_SENSOR_UNIT_MDPS   (2) /* Gyroscope unit: mdps */
 
#define RT_SENSOR_UNIT_MDPS_STR   "mdps"
 
#define RT_SENSOR_UNIT_MGAUSS   (3) /* Magnetometer unit: mGauss */
 
#define RT_SENSOR_UNIT_MGAUSS_STR   "mGauss"
 
#define RT_SENSOR_UNIT_LUX   (4) /* Ambient light unit: lux */
 
#define RT_SENSOR_UNIT_LUX_STR   "lux"
 
#define RT_SENSOR_UNIT_M   (5) /* Distance unit: m */
 
#define RT_SENSOR_UNIT_M_STR   "m"
 
#define RT_SENSOR_UNIT_CM   (6) /* Distance unit: cm */
 
#define RT_SENSOR_UNIT_CM_STR   "cm"
 
#define RT_SENSOR_UNIT_MM   (7) /* Distance unit: mm */
 
#define RT_SENSOR_UNIT_MM_STR   "mm"
 
#define RT_SENSOR_UNIT_PA   (8) /* Barometer unit: Pa */
 
#define RT_SENSOR_UNIT_PA_STR   "Pa"
 
#define RT_SENSOR_UNIT_MMHG   (9) /* Blood Pressure unit: mmHg */
 
#define RT_SENSOR_UNIT_MMHG_STR   "mmHg"
 
#define RT_SENSOR_UNIT_PERCENTAGE   (10) /* Relative Humidity unit: percentage */
 
#define RT_SENSOR_UNIT_PERCENTAGE_STR   "%"
 
#define RT_SENSOR_UNIT_PERMILLAGE   (11) /* Relative Humidity unit: permillage */
 
#define RT_SENSOR_UNIT_PERMILLAGE_STR   "‰"
 
#define RT_SENSOR_UNIT_CELSIUS   (12) /* Temperature unit: Celsius ℃ */
 
#define RT_SENSOR_UNIT_CELSIUS_STR   "℃"
 
#define RT_SENSOR_UNIT_FAHRENHEIT   (13) /* Temperature unit: Fahrenheit ℉ */
 
#define RT_SENSOR_UNIT_FAHRENHEIT_STR   "℉"
 
#define RT_SENSOR_UNIT_KELVIN   (14) /* Temperature unit: Kelvin K */
 
#define RT_SENSOR_UNIT_KELVIN_STR   "K"
 
#define RT_SENSOR_UNIT_HZ   (15) /* Frequency unit: Hz */
 
#define RT_SENSOR_UNIT_HZ_STR   "Hz"
 
#define RT_SENSOR_UNIT_V   (16) /* Voltage unit: V */
 
#define RT_SENSOR_UNIT_V_STR   "V"
 
#define RT_SENSOR_UNIT_MV   (17) /* Voltage unit: mV */
 
#define RT_SENSOR_UNIT_MV_STR   "mV"
 
#define RT_SENSOR_UNIT_A   (18) /* Current unit: A */
 
#define RT_SENSOR_UNIT_A_STR   "A"
 
#define RT_SENSOR_UNIT_MA   (19) /* Current unit: mA */
 
#define RT_SENSOR_UNIT_MA_STR   "mA"
 
#define RT_SENSOR_UNIT_N   (20) /* Force unit: N */
 
#define RT_SENSOR_UNIT_N_STR   "N"
 
#define RT_SENSOR_UNIT_MN   (21) /* Force unit: mN */
 
#define RT_SENSOR_UNIT_MN_STR   "mN"
 
#define RT_SENSOR_UNIT_BPM   (22) /* Heart rate unit: bpm */
 
#define RT_SENSOR_UNIT_BPM_STR   "bpm"
 
#define RT_SENSOR_UNIT_PPM   (23) /* Concentration unit: ppm */
 
#define RT_SENSOR_UNIT_PPM_STR   "ppm"
 
#define RT_SENSOR_UNIT_PPB   (24) /* Concentration unit: ppb */
 
#define RT_SENSOR_UNIT_PPB_STR   "ppb"
 
#define RT_SENSOR_UNIT_DMS   (25) /* Coordinates unit: DMS */
 
#define RT_SENSOR_UNIT_DMS_STR   "DMS"
 
#define RT_SENSOR_UNIT_DD   (26) /* Coordinates unit: DD */
 
#define RT_SENSOR_UNIT_DD_STR   "DD"
 
#define RT_SENSOR_UNIT_MGM3   (27) /* Concentration unit: mg/m3 */
 
#define RT_SENSOR_UNIT_MGM3_STR   "mg/m3"
 
#define RT_SENSOR_INTF_I2C   (1 << 0)
 
#define RT_SENSOR_INTF_I2C_STR   "I2C"
 
#define RT_SENSOR_INTF_SPI   (1 << 1)
 
#define RT_SENSOR_INTF_SPI_STR   "SPI"
 
#define RT_SENSOR_INTF_UART   (1 << 2)
 
#define RT_SENSOR_INTF_UART_STR   "UART"
 
#define RT_SENSOR_INTF_ONEWIRE   (1 << 3)
 
#define RT_SENSOR_INTF_ONEWIRE_STR   "1-Wire"
 
#define RT_SENSOR_INTF_CAN   (1 << 4)
 
#define RT_SENSOR_INTF_CAN_STR   "CAN"
 
#define RT_SENSOR_INTF_MODBUS   (1 << 5)
 
#define RT_SENSOR_INTF_MODBUS_STR   "Modbus"
 
#define RT_SENSOR_MODE_ACCURACY_BIT_OFFSET   (8)
 
#define RT_SENSOR_MODE_POWER_BIT_OFFSET   (4)
 
#define RT_SENSOR_MODE_FETCH_BIT_OFFSET   (0)
 
#define RT_SENSOR_MODE_GET_ACCURACY(mode)
 
#define RT_SENSOR_MODE_GET_POWER(mode)
 
#define RT_SENSOR_MODE_GET_FETCH(mode)
 
#define RT_SENSOR_MODE_CLEAR_ACCURACY(mode)
 
#define RT_SENSOR_MODE_CLEAR_POWER(mode)
 
#define RT_SENSOR_MODE_CLEAR_FETCH(mode)
 
#define RT_SENSOR_MODE_SET_ACCURACY(mode, accuracy_mode)
 
#define RT_SENSOR_MODE_SET_POWER(mode, power_mode)
 
#define RT_SENSOR_MODE_SET_FETCH(mode, fetch_mode)
 
#define RT_SENSOR_MODE_ACCURACY_HIGHEST   (0)
 
#define RT_SENSOR_MODE_ACCURACY_HIGHEST_STR   "Accuracy Highest"
 
#define RT_SENSOR_MODE_ACCURACY_HIGH   (1)
 
#define RT_SENSOR_MODE_ACCURACY_HIGH_STR   "Accuracy High"
 
#define RT_SENSOR_MODE_ACCURACY_MEDIUM   (2)
 
#define RT_SENSOR_MODE_ACCURACY_MEDIUM_STR   "Accuracy Medium"
 
#define RT_SENSOR_MODE_ACCURACY_LOW   (3)
 
#define RT_SENSOR_MODE_ACCURACY_LOW_STR   "Accuracy Low"
 
#define RT_SENSOR_MODE_ACCURACY_LOWEST   (4)
 
#define RT_SENSOR_MODE_ACCURACY_LOWEST_STR   "Accuracy Lowest"
 
#define RT_SENSOR_MODE_ACCURACY_NOTRUST   (5)
 
#define RT_SENSOR_MODE_ACCURACY_NOTRUST_STR   "Accuracy No Trust"
 
#define RT_SENSOR_MODE_POWER_HIGHEST   (0)
 
#define RT_SENSOR_MODE_POWER_HIGHEST_STR   "Power Highest"
 
#define RT_SENSOR_MODE_POWER_HIGH   (1)
 
#define RT_SENSOR_MODE_POWER_HIGH_STR   "Power High"
 
#define RT_SENSOR_MODE_POWER_MEDIUM   (2)
 
#define RT_SENSOR_MODE_POWER_MEDIUM_STR   "Power Medium"
 
#define RT_SENSOR_MODE_POWER_LOW   (3)
 
#define RT_SENSOR_MODE_POWER_LOW_STR   "Power Low"
 
#define RT_SENSOR_MODE_POWER_LOWEST   (4)
 
#define RT_SENSOR_MODE_POWER_LOWEST_STR   "Power Lowest"
 
#define RT_SENSOR_MODE_POWER_DOWN   (5)
 
#define RT_SENSOR_MODE_POWER_DOWN_STR   "Power Down"
 
#define RT_SENSOR_MODE_FETCH_POLLING   (0) /* One shot only read a data */
 
#define RT_SENSOR_MODE_FETCH_POLLING_STR   "Polling Mode"
 
#define RT_SENSOR_MODE_FETCH_INT   (1) /* TODO: One shot interrupt only read a data */
 
#define RT_SENSOR_MODE_FETCH_INT_STR   "Interrupt Mode"
 
#define RT_SENSOR_MODE_FETCH_FIFO   (2) /* TODO: One shot interrupt read all fifo data */
 
#define RT_SENSOR_MODE_FETCH_FIFO_STR   "FIFO Mode"
 
#define RT_SENSOR_CTRL_GET_ID   (RT_DEVICE_CTRL_BASE(Sensor) + 0) /* Get device id */
 
#define RT_SENSOR_CTRL_SELF_TEST   (RT_DEVICE_CTRL_BASE(Sensor) + 1) /* Take a self test */
 
#define RT_SENSOR_CTRL_SOFT_RESET   (RT_DEVICE_CTRL_BASE(Sensor) + 2) /* soft reset sensor */
 
#define RT_SENSOR_CTRL_SET_FETCH_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 3) /* set fetch data mode */
 
#define RT_SENSOR_CTRL_SET_POWER_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 4) /* set power mode */
 
#define RT_SENSOR_CTRL_SET_ACCURACY_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 5) /* set accuracy mode */
 
#define RT_SENSOR_CTRL_USER_CMD_START   0x100 /* User commands should be greater than 0x100 */
 

类型定义

typedef float rt_sensor_float_t
 
typedef struct rt_sensor_devicert_sensor_t
 
typedef struct rt_sensor_datart_sensor_data_t
 
typedef struct rt_sensor_infort_sensor_info_t
 
typedef struct rt_sensor_accuracyrt_sensor_accuracy_t
 
typedef struct rt_sensor_scalert_sensor_scale_t
 

函数

int rt_hw_sensor_register (rt_sensor_t sensor, const char *name, rt_uint32_t flag, void *data)
 
rt_sensor_t rt_sensor_device_find (const char *name)
 

宏定义说明

◆ rt_sensor_get_ts

#define rt_sensor_get_ts ( )
值:
rt_tick_get() /* API for the sensor to get the timestamp */
rt_tick_t rt_tick_get(void)
This function will return current tick from operating system startup.
定义 clock.c:69

在文件 sensor_v2.h25 行定义.

◆ RT_DEVICE_FLAG_FIFO_RX

#define RT_DEVICE_FLAG_FIFO_RX   0x200 /* Flag to use when the sensor is open by fifo mode */

在文件 sensor_v2.h28 行定义.

◆ RT_SENSOR_MODULE_MAX

#define RT_SENSOR_MODULE_MAX   (3) /* The maximum number of members of a sensor module */

在文件 sensor_v2.h30 行定义.

◆ RT_SENSOR_MACRO_GET_NAME

#define RT_SENSOR_MACRO_GET_NAME ( macro)
值:
(macro##_STR)

在文件 sensor_v2.h32 行定义.

◆ RT_SENSOR_TYPE_NONE

#define RT_SENSOR_TYPE_NONE   (0)

在文件 sensor_v2.h35 行定义.

◆ RT_SENSOR_TYPE_NONE_STR

#define RT_SENSOR_TYPE_NONE_STR   "None"

在文件 sensor_v2.h36 行定义.

◆ RT_SENSOR_TYPE_ACCE

#define RT_SENSOR_TYPE_ACCE   (1)

在文件 sensor_v2.h37 行定义.

◆ RT_SENSOR_TYPE_ACCE_STR

#define RT_SENSOR_TYPE_ACCE_STR   "Accelerometer"

在文件 sensor_v2.h38 行定义.

◆ RT_SENSOR_TYPE_GYRO

#define RT_SENSOR_TYPE_GYRO   (2)

在文件 sensor_v2.h39 行定义.

◆ RT_SENSOR_TYPE_GYRO_STR

#define RT_SENSOR_TYPE_GYRO_STR   "Gyroscope"

在文件 sensor_v2.h40 行定义.

◆ RT_SENSOR_TYPE_MAG

#define RT_SENSOR_TYPE_MAG   (3)

在文件 sensor_v2.h41 行定义.

◆ RT_SENSOR_TYPE_MAG_STR

#define RT_SENSOR_TYPE_MAG_STR   "Magnetometer"

在文件 sensor_v2.h42 行定义.

◆ RT_SENSOR_TYPE_TEMP

#define RT_SENSOR_TYPE_TEMP   (4)

在文件 sensor_v2.h43 行定义.

◆ RT_SENSOR_TYPE_TEMP_STR

#define RT_SENSOR_TYPE_TEMP_STR   "Temperature"

在文件 sensor_v2.h44 行定义.

◆ RT_SENSOR_TYPE_HUMI

#define RT_SENSOR_TYPE_HUMI   (5)

在文件 sensor_v2.h45 行定义.

◆ RT_SENSOR_TYPE_HUMI_STR

#define RT_SENSOR_TYPE_HUMI_STR   "Relative Humidity"

在文件 sensor_v2.h46 行定义.

◆ RT_SENSOR_TYPE_BARO

#define RT_SENSOR_TYPE_BARO   (6)

在文件 sensor_v2.h47 行定义.

◆ RT_SENSOR_TYPE_BARO_STR

#define RT_SENSOR_TYPE_BARO_STR   "Barometer"

在文件 sensor_v2.h48 行定义.

◆ RT_SENSOR_TYPE_LIGHT

#define RT_SENSOR_TYPE_LIGHT   (7)

在文件 sensor_v2.h49 行定义.

◆ RT_SENSOR_TYPE_LIGHT_STR

#define RT_SENSOR_TYPE_LIGHT_STR   "Ambient Light"

在文件 sensor_v2.h50 行定义.

◆ RT_SENSOR_TYPE_PROXIMITY

#define RT_SENSOR_TYPE_PROXIMITY   (8)

在文件 sensor_v2.h51 行定义.

◆ RT_SENSOR_TYPE_PROXIMITY_STR

#define RT_SENSOR_TYPE_PROXIMITY_STR   "Proximity"

在文件 sensor_v2.h52 行定义.

◆ RT_SENSOR_TYPE_HR

#define RT_SENSOR_TYPE_HR   (9)

在文件 sensor_v2.h53 行定义.

◆ RT_SENSOR_TYPE_HR_STR

#define RT_SENSOR_TYPE_HR_STR   "Heart Rate"

在文件 sensor_v2.h54 行定义.

◆ RT_SENSOR_TYPE_TVOC

#define RT_SENSOR_TYPE_TVOC   (10)

在文件 sensor_v2.h55 行定义.

◆ RT_SENSOR_TYPE_TVOC_STR

#define RT_SENSOR_TYPE_TVOC_STR   "TVOC Level"

在文件 sensor_v2.h56 行定义.

◆ RT_SENSOR_TYPE_NOISE

#define RT_SENSOR_TYPE_NOISE   (11)

在文件 sensor_v2.h57 行定义.

◆ RT_SENSOR_TYPE_NOISE_STR

#define RT_SENSOR_TYPE_NOISE_STR   "Noise Loudness"

在文件 sensor_v2.h58 行定义.

◆ RT_SENSOR_TYPE_STEP

#define RT_SENSOR_TYPE_STEP   (12)

在文件 sensor_v2.h59 行定义.

◆ RT_SENSOR_TYPE_STEP_STR

#define RT_SENSOR_TYPE_STEP_STR   "Step"

在文件 sensor_v2.h60 行定义.

◆ RT_SENSOR_TYPE_FORCE

#define RT_SENSOR_TYPE_FORCE   (13)

在文件 sensor_v2.h61 行定义.

◆ RT_SENSOR_TYPE_FORCE_STR

#define RT_SENSOR_TYPE_FORCE_STR   "Force"

在文件 sensor_v2.h62 行定义.

◆ RT_SENSOR_TYPE_DUST

#define RT_SENSOR_TYPE_DUST   (14)

在文件 sensor_v2.h63 行定义.

◆ RT_SENSOR_TYPE_DUST_STR

#define RT_SENSOR_TYPE_DUST_STR   "Dust"

在文件 sensor_v2.h64 行定义.

◆ RT_SENSOR_TYPE_ECO2

#define RT_SENSOR_TYPE_ECO2   (15)

在文件 sensor_v2.h65 行定义.

◆ RT_SENSOR_TYPE_ECO2_STR

#define RT_SENSOR_TYPE_ECO2_STR   "eCO2"

在文件 sensor_v2.h66 行定义.

◆ RT_SENSOR_TYPE_GNSS

#define RT_SENSOR_TYPE_GNSS   (16)

在文件 sensor_v2.h67 行定义.

◆ RT_SENSOR_TYPE_GNSS_STR

#define RT_SENSOR_TYPE_GNSS_STR   "GNSS"

在文件 sensor_v2.h68 行定义.

◆ RT_SENSOR_TYPE_TOF

#define RT_SENSOR_TYPE_TOF   (17)

在文件 sensor_v2.h69 行定义.

◆ RT_SENSOR_TYPE_TOF_STR

#define RT_SENSOR_TYPE_TOF_STR   "ToF"

在文件 sensor_v2.h70 行定义.

◆ RT_SENSOR_TYPE_SPO2

#define RT_SENSOR_TYPE_SPO2   (18)

在文件 sensor_v2.h71 行定义.

◆ RT_SENSOR_TYPE_SPO2_STR

#define RT_SENSOR_TYPE_SPO2_STR   "SpO2"

在文件 sensor_v2.h72 行定义.

◆ RT_SENSOR_TYPE_IAQ

#define RT_SENSOR_TYPE_IAQ   (19)

在文件 sensor_v2.h73 行定义.

◆ RT_SENSOR_TYPE_IAQ_STR

#define RT_SENSOR_TYPE_IAQ_STR   "IAQ"

在文件 sensor_v2.h74 行定义.

◆ RT_SENSOR_TYPE_ETOH

#define RT_SENSOR_TYPE_ETOH   (20)

在文件 sensor_v2.h75 行定义.

◆ RT_SENSOR_TYPE_ETOH_STR

#define RT_SENSOR_TYPE_ETOH_STR   "EtOH"

在文件 sensor_v2.h76 行定义.

◆ RT_SENSOR_TYPE_BP

#define RT_SENSOR_TYPE_BP   (21)

在文件 sensor_v2.h77 行定义.

◆ RT_SENSOR_TYPE_BP_STR

#define RT_SENSOR_TYPE_BP_STR   "Blood Pressure"

在文件 sensor_v2.h78 行定义.

◆ RT_SENSOR_TYPE_VOLTAGE

#define RT_SENSOR_TYPE_VOLTAGE   (22)

在文件 sensor_v2.h79 行定义.

◆ RT_SENSOR_TYPE_VOLTAGE_STR

#define RT_SENSOR_TYPE_VOLTAGE_STR   "Voltage"

在文件 sensor_v2.h80 行定义.

◆ RT_SENSOR_TYPE_CURRENT

#define RT_SENSOR_TYPE_CURRENT   (23)

在文件 sensor_v2.h81 行定义.

◆ RT_SENSOR_TYPE_CURRENT_STR

#define RT_SENSOR_TYPE_CURRENT_STR   "Current"

在文件 sensor_v2.h82 行定义.

◆ RT_SENSOR_VENDOR_UNKNOWN

#define RT_SENSOR_VENDOR_UNKNOWN   (0)

在文件 sensor_v2.h85 行定义.

◆ RT_SENSOR_VENDOR_UNKNOWN_STR

#define RT_SENSOR_VENDOR_UNKNOWN_STR   "Unknown"

在文件 sensor_v2.h86 行定义.

◆ RT_SENSOR_VENDOR_VIRTUAL

#define RT_SENSOR_VENDOR_VIRTUAL   (1)

在文件 sensor_v2.h87 行定义.

◆ RT_SENSOR_VENDOR_VIRTUAL_STR

#define RT_SENSOR_VENDOR_VIRTUAL_STR   "Virtual Sensor"

在文件 sensor_v2.h88 行定义.

◆ RT_SENSOR_VENDOR_ONCHIP

#define RT_SENSOR_VENDOR_ONCHIP   (2)

在文件 sensor_v2.h89 行定义.

◆ RT_SENSOR_VENDOR_ONCHIP_STR

#define RT_SENSOR_VENDOR_ONCHIP_STR   "OnChip"

在文件 sensor_v2.h90 行定义.

◆ RT_SENSOR_VENDOR_STM

#define RT_SENSOR_VENDOR_STM   (3)

在文件 sensor_v2.h91 行定义.

◆ RT_SENSOR_VENDOR_STM_STR

#define RT_SENSOR_VENDOR_STM_STR   "STMicroelectronics"

在文件 sensor_v2.h92 行定义.

◆ RT_SENSOR_VENDOR_BOSCH

#define RT_SENSOR_VENDOR_BOSCH   (4)

在文件 sensor_v2.h93 行定义.

◆ RT_SENSOR_VENDOR_BOSCH_STR

#define RT_SENSOR_VENDOR_BOSCH_STR   "Bosch"

在文件 sensor_v2.h94 行定义.

◆ RT_SENSOR_VENDOR_INVENSENSE

#define RT_SENSOR_VENDOR_INVENSENSE   (5)

在文件 sensor_v2.h95 行定义.

◆ RT_SENSOR_VENDOR_INVENSENSE_STR

#define RT_SENSOR_VENDOR_INVENSENSE_STR   "Invensense"

在文件 sensor_v2.h96 行定义.

◆ RT_SENSOR_VENDOR_SEMTECH

#define RT_SENSOR_VENDOR_SEMTECH   (6)

在文件 sensor_v2.h97 行定义.

◆ RT_SENSOR_VENDOR_SEMTECH_STR

#define RT_SENSOR_VENDOR_SEMTECH_STR   "Semtech"

在文件 sensor_v2.h98 行定义.

◆ RT_SENSOR_VENDOR_GOERTEK

#define RT_SENSOR_VENDOR_GOERTEK   (7)

在文件 sensor_v2.h99 行定义.

◆ RT_SENSOR_VENDOR_GOERTEK_STR

#define RT_SENSOR_VENDOR_GOERTEK_STR   "Goertek"

在文件 sensor_v2.h100 行定义.

◆ RT_SENSOR_VENDOR_MIRAMEMS

#define RT_SENSOR_VENDOR_MIRAMEMS   (8)

在文件 sensor_v2.h101 行定义.

◆ RT_SENSOR_VENDOR_MIRAMEMS_STR

#define RT_SENSOR_VENDOR_MIRAMEMS_STR   "MiraMEMS"

在文件 sensor_v2.h102 行定义.

◆ RT_SENSOR_VENDOR_DALLAS

#define RT_SENSOR_VENDOR_DALLAS   (9)

在文件 sensor_v2.h103 行定义.

◆ RT_SENSOR_VENDOR_DALLAS_STR

#define RT_SENSOR_VENDOR_DALLAS_STR   "Dallas"

在文件 sensor_v2.h104 行定义.

◆ RT_SENSOR_VENDOR_ASAIR

#define RT_SENSOR_VENDOR_ASAIR   (10)

在文件 sensor_v2.h105 行定义.

◆ RT_SENSOR_VENDOR_ASAIR_STR

#define RT_SENSOR_VENDOR_ASAIR_STR   "Aosong"

在文件 sensor_v2.h106 行定义.

◆ RT_SENSOR_VENDOR_SHARP

#define RT_SENSOR_VENDOR_SHARP   (11)

在文件 sensor_v2.h107 行定义.

◆ RT_SENSOR_VENDOR_SHARP_STR

#define RT_SENSOR_VENDOR_SHARP_STR   "Sharp"

在文件 sensor_v2.h108 行定义.

◆ RT_SENSOR_VENDOR_SENSIRION

#define RT_SENSOR_VENDOR_SENSIRION   (12)

在文件 sensor_v2.h109 行定义.

◆ RT_SENSOR_VENDOR_SENSIRION_STR

#define RT_SENSOR_VENDOR_SENSIRION_STR   "Sensirion"

在文件 sensor_v2.h110 行定义.

◆ RT_SENSOR_VENDOR_TI

#define RT_SENSOR_VENDOR_TI   (13)

在文件 sensor_v2.h111 行定义.

◆ RT_SENSOR_VENDOR_TI_STR

#define RT_SENSOR_VENDOR_TI_STR   "Texas Instruments"

在文件 sensor_v2.h112 行定义.

◆ RT_SENSOR_VENDOR_PLANTOWER

#define RT_SENSOR_VENDOR_PLANTOWER   (14)

在文件 sensor_v2.h113 行定义.

◆ RT_SENSOR_VENDOR_PLANTOWER_STR

#define RT_SENSOR_VENDOR_PLANTOWER_STR   "Plantower"

在文件 sensor_v2.h114 行定义.

◆ RT_SENSOR_VENDOR_AMS

#define RT_SENSOR_VENDOR_AMS   (15)

在文件 sensor_v2.h115 行定义.

◆ RT_SENSOR_VENDOR_AMS_STR

#define RT_SENSOR_VENDOR_AMS_STR   "ams-OSRAM AG"

在文件 sensor_v2.h116 行定义.

◆ RT_SENSOR_VENDOR_MAXIM

#define RT_SENSOR_VENDOR_MAXIM   (16)

在文件 sensor_v2.h117 行定义.

◆ RT_SENSOR_VENDOR_MAXIM_STR

#define RT_SENSOR_VENDOR_MAXIM_STR   "Maxim Integrated"

在文件 sensor_v2.h118 行定义.

◆ RT_SENSOR_VENDOR_MELEXIS

#define RT_SENSOR_VENDOR_MELEXIS   (17)

在文件 sensor_v2.h119 行定义.

◆ RT_SENSOR_VENDOR_MELEXIS_STR

#define RT_SENSOR_VENDOR_MELEXIS_STR   "Melexis"

在文件 sensor_v2.h120 行定义.

◆ RT_SENSOR_VENDOR_LSC

#define RT_SENSOR_VENDOR_LSC   (18)

在文件 sensor_v2.h121 行定义.

◆ RT_SENSOR_VENDOR_LSC_STR

#define RT_SENSOR_VENDOR_LSC_STR   "Lite On"

在文件 sensor_v2.h122 行定义.

◆ RT_SENSOR_UNIT_NONE

#define RT_SENSOR_UNIT_NONE   (0) /* Dimensionless quantity */

在文件 sensor_v2.h125 行定义.

◆ RT_SENSOR_UNIT_NONE_STR

#define RT_SENSOR_UNIT_NONE_STR   ""

在文件 sensor_v2.h126 行定义.

◆ RT_SENSOR_UNIT_MG

#define RT_SENSOR_UNIT_MG   (1) /* Accelerometer unit: mG */

在文件 sensor_v2.h127 行定义.

◆ RT_SENSOR_UNIT_MG_STR

#define RT_SENSOR_UNIT_MG_STR   "mG"

在文件 sensor_v2.h128 行定义.

◆ RT_SENSOR_UNIT_MDPS

#define RT_SENSOR_UNIT_MDPS   (2) /* Gyroscope unit: mdps */

在文件 sensor_v2.h129 行定义.

◆ RT_SENSOR_UNIT_MDPS_STR

#define RT_SENSOR_UNIT_MDPS_STR   "mdps"

在文件 sensor_v2.h130 行定义.

◆ RT_SENSOR_UNIT_MGAUSS

#define RT_SENSOR_UNIT_MGAUSS   (3) /* Magnetometer unit: mGauss */

在文件 sensor_v2.h131 行定义.

◆ RT_SENSOR_UNIT_MGAUSS_STR

#define RT_SENSOR_UNIT_MGAUSS_STR   "mGauss"

在文件 sensor_v2.h132 行定义.

◆ RT_SENSOR_UNIT_LUX

#define RT_SENSOR_UNIT_LUX   (4) /* Ambient light unit: lux */

在文件 sensor_v2.h133 行定义.

◆ RT_SENSOR_UNIT_LUX_STR

#define RT_SENSOR_UNIT_LUX_STR   "lux"

在文件 sensor_v2.h134 行定义.

◆ RT_SENSOR_UNIT_M

#define RT_SENSOR_UNIT_M   (5) /* Distance unit: m */

在文件 sensor_v2.h135 行定义.

◆ RT_SENSOR_UNIT_M_STR

#define RT_SENSOR_UNIT_M_STR   "m"

在文件 sensor_v2.h136 行定义.

◆ RT_SENSOR_UNIT_CM

#define RT_SENSOR_UNIT_CM   (6) /* Distance unit: cm */

在文件 sensor_v2.h137 行定义.

◆ RT_SENSOR_UNIT_CM_STR

#define RT_SENSOR_UNIT_CM_STR   "cm"

在文件 sensor_v2.h138 行定义.

◆ RT_SENSOR_UNIT_MM

#define RT_SENSOR_UNIT_MM   (7) /* Distance unit: mm */

在文件 sensor_v2.h139 行定义.

◆ RT_SENSOR_UNIT_MM_STR

#define RT_SENSOR_UNIT_MM_STR   "mm"

在文件 sensor_v2.h140 行定义.

◆ RT_SENSOR_UNIT_PA

#define RT_SENSOR_UNIT_PA   (8) /* Barometer unit: Pa */

在文件 sensor_v2.h141 行定义.

◆ RT_SENSOR_UNIT_PA_STR

#define RT_SENSOR_UNIT_PA_STR   "Pa"

在文件 sensor_v2.h142 行定义.

◆ RT_SENSOR_UNIT_MMHG

#define RT_SENSOR_UNIT_MMHG   (9) /* Blood Pressure unit: mmHg */

在文件 sensor_v2.h143 行定义.

◆ RT_SENSOR_UNIT_MMHG_STR

#define RT_SENSOR_UNIT_MMHG_STR   "mmHg"

在文件 sensor_v2.h144 行定义.

◆ RT_SENSOR_UNIT_PERCENTAGE

#define RT_SENSOR_UNIT_PERCENTAGE   (10) /* Relative Humidity unit: percentage */

在文件 sensor_v2.h145 行定义.

◆ RT_SENSOR_UNIT_PERCENTAGE_STR

#define RT_SENSOR_UNIT_PERCENTAGE_STR   "%"

在文件 sensor_v2.h146 行定义.

◆ RT_SENSOR_UNIT_PERMILLAGE

#define RT_SENSOR_UNIT_PERMILLAGE   (11) /* Relative Humidity unit: permillage */

在文件 sensor_v2.h147 行定义.

◆ RT_SENSOR_UNIT_PERMILLAGE_STR

#define RT_SENSOR_UNIT_PERMILLAGE_STR   "‰"

在文件 sensor_v2.h148 行定义.

◆ RT_SENSOR_UNIT_CELSIUS

#define RT_SENSOR_UNIT_CELSIUS   (12) /* Temperature unit: Celsius ℃ */

在文件 sensor_v2.h149 行定义.

◆ RT_SENSOR_UNIT_CELSIUS_STR

#define RT_SENSOR_UNIT_CELSIUS_STR   "℃"

在文件 sensor_v2.h150 行定义.

◆ RT_SENSOR_UNIT_FAHRENHEIT

#define RT_SENSOR_UNIT_FAHRENHEIT   (13) /* Temperature unit: Fahrenheit ℉ */

在文件 sensor_v2.h151 行定义.

◆ RT_SENSOR_UNIT_FAHRENHEIT_STR

#define RT_SENSOR_UNIT_FAHRENHEIT_STR   "℉"

在文件 sensor_v2.h152 行定义.

◆ RT_SENSOR_UNIT_KELVIN

#define RT_SENSOR_UNIT_KELVIN   (14) /* Temperature unit: Kelvin K */

在文件 sensor_v2.h153 行定义.

◆ RT_SENSOR_UNIT_KELVIN_STR

#define RT_SENSOR_UNIT_KELVIN_STR   "K"

在文件 sensor_v2.h154 行定义.

◆ RT_SENSOR_UNIT_HZ

#define RT_SENSOR_UNIT_HZ   (15) /* Frequency unit: Hz */

在文件 sensor_v2.h155 行定义.

◆ RT_SENSOR_UNIT_HZ_STR

#define RT_SENSOR_UNIT_HZ_STR   "Hz"

在文件 sensor_v2.h156 行定义.

◆ RT_SENSOR_UNIT_V

#define RT_SENSOR_UNIT_V   (16) /* Voltage unit: V */

在文件 sensor_v2.h157 行定义.

◆ RT_SENSOR_UNIT_V_STR

#define RT_SENSOR_UNIT_V_STR   "V"

在文件 sensor_v2.h158 行定义.

◆ RT_SENSOR_UNIT_MV

#define RT_SENSOR_UNIT_MV   (17) /* Voltage unit: mV */

在文件 sensor_v2.h159 行定义.

◆ RT_SENSOR_UNIT_MV_STR

#define RT_SENSOR_UNIT_MV_STR   "mV"

在文件 sensor_v2.h160 行定义.

◆ RT_SENSOR_UNIT_A

#define RT_SENSOR_UNIT_A   (18) /* Current unit: A */

在文件 sensor_v2.h161 行定义.

◆ RT_SENSOR_UNIT_A_STR

#define RT_SENSOR_UNIT_A_STR   "A"

在文件 sensor_v2.h162 行定义.

◆ RT_SENSOR_UNIT_MA

#define RT_SENSOR_UNIT_MA   (19) /* Current unit: mA */

在文件 sensor_v2.h163 行定义.

◆ RT_SENSOR_UNIT_MA_STR

#define RT_SENSOR_UNIT_MA_STR   "mA"

在文件 sensor_v2.h164 行定义.

◆ RT_SENSOR_UNIT_N

#define RT_SENSOR_UNIT_N   (20) /* Force unit: N */

在文件 sensor_v2.h165 行定义.

◆ RT_SENSOR_UNIT_N_STR

#define RT_SENSOR_UNIT_N_STR   "N"

在文件 sensor_v2.h166 行定义.

◆ RT_SENSOR_UNIT_MN

#define RT_SENSOR_UNIT_MN   (21) /* Force unit: mN */

在文件 sensor_v2.h167 行定义.

◆ RT_SENSOR_UNIT_MN_STR

#define RT_SENSOR_UNIT_MN_STR   "mN"

在文件 sensor_v2.h168 行定义.

◆ RT_SENSOR_UNIT_BPM

#define RT_SENSOR_UNIT_BPM   (22) /* Heart rate unit: bpm */

在文件 sensor_v2.h169 行定义.

◆ RT_SENSOR_UNIT_BPM_STR

#define RT_SENSOR_UNIT_BPM_STR   "bpm"

在文件 sensor_v2.h170 行定义.

◆ RT_SENSOR_UNIT_PPM

#define RT_SENSOR_UNIT_PPM   (23) /* Concentration unit: ppm */

在文件 sensor_v2.h171 行定义.

◆ RT_SENSOR_UNIT_PPM_STR

#define RT_SENSOR_UNIT_PPM_STR   "ppm"

在文件 sensor_v2.h172 行定义.

◆ RT_SENSOR_UNIT_PPB

#define RT_SENSOR_UNIT_PPB   (24) /* Concentration unit: ppb */

在文件 sensor_v2.h173 行定义.

◆ RT_SENSOR_UNIT_PPB_STR

#define RT_SENSOR_UNIT_PPB_STR   "ppb"

在文件 sensor_v2.h174 行定义.

◆ RT_SENSOR_UNIT_DMS

#define RT_SENSOR_UNIT_DMS   (25) /* Coordinates unit: DMS */

在文件 sensor_v2.h175 行定义.

◆ RT_SENSOR_UNIT_DMS_STR

#define RT_SENSOR_UNIT_DMS_STR   "DMS"

在文件 sensor_v2.h176 行定义.

◆ RT_SENSOR_UNIT_DD

#define RT_SENSOR_UNIT_DD   (26) /* Coordinates unit: DD */

在文件 sensor_v2.h177 行定义.

◆ RT_SENSOR_UNIT_DD_STR

#define RT_SENSOR_UNIT_DD_STR   "DD"

在文件 sensor_v2.h178 行定义.

◆ RT_SENSOR_UNIT_MGM3

#define RT_SENSOR_UNIT_MGM3   (27) /* Concentration unit: mg/m3 */

在文件 sensor_v2.h179 行定义.

◆ RT_SENSOR_UNIT_MGM3_STR

#define RT_SENSOR_UNIT_MGM3_STR   "mg/m3"

在文件 sensor_v2.h180 行定义.

◆ RT_SENSOR_INTF_I2C

#define RT_SENSOR_INTF_I2C   (1 << 0)

在文件 sensor_v2.h183 行定义.

◆ RT_SENSOR_INTF_I2C_STR

#define RT_SENSOR_INTF_I2C_STR   "I2C"

在文件 sensor_v2.h184 行定义.

◆ RT_SENSOR_INTF_SPI

#define RT_SENSOR_INTF_SPI   (1 << 1)

在文件 sensor_v2.h185 行定义.

◆ RT_SENSOR_INTF_SPI_STR

#define RT_SENSOR_INTF_SPI_STR   "SPI"

在文件 sensor_v2.h186 行定义.

◆ RT_SENSOR_INTF_UART

#define RT_SENSOR_INTF_UART   (1 << 2)

在文件 sensor_v2.h187 行定义.

◆ RT_SENSOR_INTF_UART_STR

#define RT_SENSOR_INTF_UART_STR   "UART"

在文件 sensor_v2.h188 行定义.

◆ RT_SENSOR_INTF_ONEWIRE

#define RT_SENSOR_INTF_ONEWIRE   (1 << 3)

在文件 sensor_v2.h189 行定义.

◆ RT_SENSOR_INTF_ONEWIRE_STR

#define RT_SENSOR_INTF_ONEWIRE_STR   "1-Wire"

在文件 sensor_v2.h190 行定义.

◆ RT_SENSOR_INTF_CAN

#define RT_SENSOR_INTF_CAN   (1 << 4)

在文件 sensor_v2.h191 行定义.

◆ RT_SENSOR_INTF_CAN_STR

#define RT_SENSOR_INTF_CAN_STR   "CAN"

在文件 sensor_v2.h192 行定义.

◆ RT_SENSOR_INTF_MODBUS

#define RT_SENSOR_INTF_MODBUS   (1 << 5)

在文件 sensor_v2.h193 行定义.

◆ RT_SENSOR_INTF_MODBUS_STR

#define RT_SENSOR_INTF_MODBUS_STR   "Modbus"

在文件 sensor_v2.h194 行定义.

◆ RT_SENSOR_MODE_ACCURACY_BIT_OFFSET

#define RT_SENSOR_MODE_ACCURACY_BIT_OFFSET   (8)
           Sensor mode
        rt_uint16_t mode

0000 | 0000 | 0000 | 0000 unused accuracy power fetch data

在文件 sensor_v2.h202 行定义.

◆ RT_SENSOR_MODE_POWER_BIT_OFFSET

#define RT_SENSOR_MODE_POWER_BIT_OFFSET   (4)

在文件 sensor_v2.h203 行定义.

◆ RT_SENSOR_MODE_FETCH_BIT_OFFSET

#define RT_SENSOR_MODE_FETCH_BIT_OFFSET   (0)

在文件 sensor_v2.h204 行定义.

◆ RT_SENSOR_MODE_GET_ACCURACY

#define RT_SENSOR_MODE_GET_ACCURACY ( mode)
值:
unsigned char rt_uint8_t
#define RT_SENSOR_MODE_ACCURACY_BIT_OFFSET

在文件 sensor_v2.h206 行定义.

◆ RT_SENSOR_MODE_GET_POWER

#define RT_SENSOR_MODE_GET_POWER ( mode)
值:
#define RT_SENSOR_MODE_POWER_BIT_OFFSET

在文件 sensor_v2.h207 行定义.

◆ RT_SENSOR_MODE_GET_FETCH

#define RT_SENSOR_MODE_GET_FETCH ( mode)
值:
#define RT_SENSOR_MODE_FETCH_BIT_OFFSET

在文件 sensor_v2.h208 行定义.

◆ RT_SENSOR_MODE_CLEAR_ACCURACY

#define RT_SENSOR_MODE_CLEAR_ACCURACY ( mode)
值:
unsigned short rt_uint16_t

在文件 sensor_v2.h210 行定义.

◆ RT_SENSOR_MODE_CLEAR_POWER

#define RT_SENSOR_MODE_CLEAR_POWER ( mode)
值:

在文件 sensor_v2.h211 行定义.

◆ RT_SENSOR_MODE_CLEAR_FETCH

#define RT_SENSOR_MODE_CLEAR_FETCH ( mode)
值:

在文件 sensor_v2.h212 行定义.

◆ RT_SENSOR_MODE_SET_ACCURACY

#define RT_SENSOR_MODE_SET_ACCURACY ( mode,
accuracy_mode )
值:
#define RT_SENSOR_MODE_CLEAR_ACCURACY(mode)

在文件 sensor_v2.h214 行定义.

◆ RT_SENSOR_MODE_SET_POWER

#define RT_SENSOR_MODE_SET_POWER ( mode,
power_mode )
值:
#define RT_SENSOR_MODE_CLEAR_POWER(mode)

在文件 sensor_v2.h215 行定义.

◆ RT_SENSOR_MODE_SET_FETCH

#define RT_SENSOR_MODE_SET_FETCH ( mode,
fetch_mode )
值:
#define RT_SENSOR_MODE_CLEAR_FETCH(mode)

在文件 sensor_v2.h216 行定义.

◆ RT_SENSOR_MODE_ACCURACY_HIGHEST

#define RT_SENSOR_MODE_ACCURACY_HIGHEST   (0)

在文件 sensor_v2.h219 行定义.

◆ RT_SENSOR_MODE_ACCURACY_HIGHEST_STR

#define RT_SENSOR_MODE_ACCURACY_HIGHEST_STR   "Accuracy Highest"

在文件 sensor_v2.h220 行定义.

◆ RT_SENSOR_MODE_ACCURACY_HIGH

#define RT_SENSOR_MODE_ACCURACY_HIGH   (1)

在文件 sensor_v2.h221 行定义.

◆ RT_SENSOR_MODE_ACCURACY_HIGH_STR

#define RT_SENSOR_MODE_ACCURACY_HIGH_STR   "Accuracy High"

在文件 sensor_v2.h222 行定义.

◆ RT_SENSOR_MODE_ACCURACY_MEDIUM

#define RT_SENSOR_MODE_ACCURACY_MEDIUM   (2)

在文件 sensor_v2.h223 行定义.

◆ RT_SENSOR_MODE_ACCURACY_MEDIUM_STR

#define RT_SENSOR_MODE_ACCURACY_MEDIUM_STR   "Accuracy Medium"

在文件 sensor_v2.h224 行定义.

◆ RT_SENSOR_MODE_ACCURACY_LOW

#define RT_SENSOR_MODE_ACCURACY_LOW   (3)

在文件 sensor_v2.h225 行定义.

◆ RT_SENSOR_MODE_ACCURACY_LOW_STR

#define RT_SENSOR_MODE_ACCURACY_LOW_STR   "Accuracy Low"

在文件 sensor_v2.h226 行定义.

◆ RT_SENSOR_MODE_ACCURACY_LOWEST

#define RT_SENSOR_MODE_ACCURACY_LOWEST   (4)

在文件 sensor_v2.h227 行定义.

◆ RT_SENSOR_MODE_ACCURACY_LOWEST_STR

#define RT_SENSOR_MODE_ACCURACY_LOWEST_STR   "Accuracy Lowest"

在文件 sensor_v2.h228 行定义.

◆ RT_SENSOR_MODE_ACCURACY_NOTRUST

#define RT_SENSOR_MODE_ACCURACY_NOTRUST   (5)

在文件 sensor_v2.h229 行定义.

◆ RT_SENSOR_MODE_ACCURACY_NOTRUST_STR

#define RT_SENSOR_MODE_ACCURACY_NOTRUST_STR   "Accuracy No Trust"

在文件 sensor_v2.h230 行定义.

◆ RT_SENSOR_MODE_POWER_HIGHEST

#define RT_SENSOR_MODE_POWER_HIGHEST   (0)

在文件 sensor_v2.h233 行定义.

◆ RT_SENSOR_MODE_POWER_HIGHEST_STR

#define RT_SENSOR_MODE_POWER_HIGHEST_STR   "Power Highest"

在文件 sensor_v2.h234 行定义.

◆ RT_SENSOR_MODE_POWER_HIGH

#define RT_SENSOR_MODE_POWER_HIGH   (1)

在文件 sensor_v2.h235 行定义.

◆ RT_SENSOR_MODE_POWER_HIGH_STR

#define RT_SENSOR_MODE_POWER_HIGH_STR   "Power High"

在文件 sensor_v2.h236 行定义.

◆ RT_SENSOR_MODE_POWER_MEDIUM

#define RT_SENSOR_MODE_POWER_MEDIUM   (2)

在文件 sensor_v2.h237 行定义.

◆ RT_SENSOR_MODE_POWER_MEDIUM_STR

#define RT_SENSOR_MODE_POWER_MEDIUM_STR   "Power Medium"

在文件 sensor_v2.h238 行定义.

◆ RT_SENSOR_MODE_POWER_LOW

#define RT_SENSOR_MODE_POWER_LOW   (3)

在文件 sensor_v2.h239 行定义.

◆ RT_SENSOR_MODE_POWER_LOW_STR

#define RT_SENSOR_MODE_POWER_LOW_STR   "Power Low"

在文件 sensor_v2.h240 行定义.

◆ RT_SENSOR_MODE_POWER_LOWEST

#define RT_SENSOR_MODE_POWER_LOWEST   (4)

在文件 sensor_v2.h241 行定义.

◆ RT_SENSOR_MODE_POWER_LOWEST_STR

#define RT_SENSOR_MODE_POWER_LOWEST_STR   "Power Lowest"

在文件 sensor_v2.h242 行定义.

◆ RT_SENSOR_MODE_POWER_DOWN

#define RT_SENSOR_MODE_POWER_DOWN   (5)

在文件 sensor_v2.h243 行定义.

◆ RT_SENSOR_MODE_POWER_DOWN_STR

#define RT_SENSOR_MODE_POWER_DOWN_STR   "Power Down"

在文件 sensor_v2.h244 行定义.

◆ RT_SENSOR_MODE_FETCH_POLLING

#define RT_SENSOR_MODE_FETCH_POLLING   (0) /* One shot only read a data */

在文件 sensor_v2.h247 行定义.

◆ RT_SENSOR_MODE_FETCH_POLLING_STR

#define RT_SENSOR_MODE_FETCH_POLLING_STR   "Polling Mode"

在文件 sensor_v2.h248 行定义.

◆ RT_SENSOR_MODE_FETCH_INT

#define RT_SENSOR_MODE_FETCH_INT   (1) /* TODO: One shot interrupt only read a data */

在文件 sensor_v2.h249 行定义.

◆ RT_SENSOR_MODE_FETCH_INT_STR

#define RT_SENSOR_MODE_FETCH_INT_STR   "Interrupt Mode"

在文件 sensor_v2.h250 行定义.

◆ RT_SENSOR_MODE_FETCH_FIFO

#define RT_SENSOR_MODE_FETCH_FIFO   (2) /* TODO: One shot interrupt read all fifo data */

在文件 sensor_v2.h251 行定义.

◆ RT_SENSOR_MODE_FETCH_FIFO_STR

#define RT_SENSOR_MODE_FETCH_FIFO_STR   "FIFO Mode"

在文件 sensor_v2.h252 行定义.

◆ RT_SENSOR_CTRL_GET_ID

#define RT_SENSOR_CTRL_GET_ID   (RT_DEVICE_CTRL_BASE(Sensor) + 0) /* Get device id */

在文件 sensor_v2.h255 行定义.

◆ RT_SENSOR_CTRL_SELF_TEST

#define RT_SENSOR_CTRL_SELF_TEST   (RT_DEVICE_CTRL_BASE(Sensor) + 1) /* Take a self test */

在文件 sensor_v2.h256 行定义.

◆ RT_SENSOR_CTRL_SOFT_RESET

#define RT_SENSOR_CTRL_SOFT_RESET   (RT_DEVICE_CTRL_BASE(Sensor) + 2) /* soft reset sensor */

在文件 sensor_v2.h257 行定义.

◆ RT_SENSOR_CTRL_SET_FETCH_MODE

#define RT_SENSOR_CTRL_SET_FETCH_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 3) /* set fetch data mode */

在文件 sensor_v2.h258 行定义.

◆ RT_SENSOR_CTRL_SET_POWER_MODE

#define RT_SENSOR_CTRL_SET_POWER_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 4) /* set power mode */

在文件 sensor_v2.h259 行定义.

◆ RT_SENSOR_CTRL_SET_ACCURACY_MODE

#define RT_SENSOR_CTRL_SET_ACCURACY_MODE   (RT_DEVICE_CTRL_BASE(Sensor) + 5) /* set accuracy mode */

在文件 sensor_v2.h260 行定义.

◆ RT_SENSOR_CTRL_USER_CMD_START

#define RT_SENSOR_CTRL_USER_CMD_START   0x100 /* User commands should be greater than 0x100 */

在文件 sensor_v2.h262 行定义.

类型定义说明

◆ rt_sensor_float_t

typedef float rt_sensor_float_t

在文件 sensor_v2.h268 行定义.

◆ rt_sensor_t

typedef struct rt_sensor_device* rt_sensor_t

在文件 sensor_v2.h310 行定义.

◆ rt_sensor_data_t

在文件 sensor_v2.h311 行定义.

◆ rt_sensor_info_t

在文件 sensor_v2.h312 行定义.

◆ rt_sensor_accuracy_t

在文件 sensor_v2.h313 行定义.

◆ rt_sensor_scale_t

在文件 sensor_v2.h314 行定义.

函数说明

◆ rt_hw_sensor_register()

int rt_hw_sensor_register ( rt_sensor_t sensor,
const char * name,
rt_uint32_t flag,
void * data )

◆ rt_sensor_device_find()

rt_sensor_t rt_sensor_device_find ( const char * name)