drv_sensor.h
6.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/****************************************************************************
*
* Copyright (c) 2012-2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* @file drv_sensor.h
*
* Common sensor API and ioctl definitions.
*/
#ifndef _DRV_SENSOR_H
#define _DRV_SENSOR_H
#include <px4_platform_common/defines.h>
#include <stdint.h>
#include <sys/ioctl.h>
/**
* Sensor type definitions.
*
* Used to create a unique device id for redundant and combo sensors
*/
#define DRV_MAG_DEVTYPE_HMC5883 0x01
#define DRV_MAG_DEVTYPE_LSM303D_LEGACY 0x02
#define DRV_MAG_DEVTYPE_MAGSIM 0x03
#define DRV_MAG_DEVTYPE_AK8963 0x04
#define DRV_MAG_DEVTYPE_LIS3MDL 0x05
#define DRV_MAG_DEVTYPE_IST8310 0x06
#define DRV_MAG_DEVTYPE_RM3100 0x07
#define DRV_MAG_DEVTYPE_QMC5883L 0x08
#define DRV_MAG_DEVTYPE_AK09916 0x09
#define DRV_MAG_DEVTYPE_IST8308 0x0B
#define DRV_MAG_DEVTYPE_LIS2MDL 0x0C
#define DRV_IMU_DEVTYPE_LSM303D 0x11
#define DRV_ACC_DEVTYPE_MPU6000_LEGACY 0x13
#define DRV_IMU_DEVTYPE_SIM 0x14
#define DRV_ACC_DEVTYPE_MPU9250_LEGACY 0x16
#define DRV_IMU_DEVTYPE_MPU6000 0x21
#define DRV_GYR_DEVTYPE_L3GD20 0x22
#define DRV_IMU_DEVTYPE_MPU9250 0x24
#define DRV_IMU_DEVTYPE_ICM20649 0x25
#define DRV_IMU_DEVTYPE_ICM42688P 0x26
#define DRV_IMU_DEVTYPE_ICM40609D 0x27
#define DRV_IMU_DEVTYPE_ICM20948 0x28
#define DRV_IMU_DEVTYPE_ICM42605 0x29
#define DRV_RNG_DEVTYPE_MB12XX 0x31
#define DRV_RNG_DEVTYPE_LL40LS 0x32
#define DRV_ACC_DEVTYPE_MPU6050 0x33
#define DRV_ACC_DEVTYPE_MPU6500_LEGACY 0x34
#define DRV_GYR_DEVTYPE_MPU6050 0x35
#define DRV_IMU_DEVTYPE_MPU6500 0x36
#define DRV_ACC_DEVTYPE_ICM20602_LEGACY 0x37
#define DRV_IMU_DEVTYPE_ICM20602 0x38
#define DRV_ACC_DEVTYPE_ICM20608_LEGACY 0x39
#define DRV_IMU_DEVTYPE_ICM20608G 0x3A
#define DRV_ACC_DEVTYPE_ICM20689_LEGACY 0x3B
#define DRV_IMU_DEVTYPE_ICM20689 0x3C
#define DRV_BARO_DEVTYPE_MS5611 0x3D
#define DRV_BARO_DEVTYPE_MS5607 0x3E
#define DRV_BARO_DEVTYPE_BMP280 0x3F
#define DRV_BARO_DEVTYPE_LPS25H 0x40
#define DRV_ACC_DEVTYPE_BMI055 0x41
#define DRV_GYR_DEVTYPE_BMI055 0x42
#define DRV_MAG_DEVTYPE_BMM150 0x43
#define DRV_IMU_DEVTYPE_ST_LSM9DS1_AG 0x44
#define DRV_MAG_DEVTYPE_ST_LSM9DS1_M 0x45
#define DRV_DIFF_PRESS_DEVTYPE_ETS3 0x46
#define DRV_DIFF_PRESS_DEVTYPE_MS4525 0x47
#define DRV_DIFF_PRESS_DEVTYPE_MS5525 0x48
#define DRV_DIFF_PRESS_DEVTYPE_SDP31 0x49
#define DRV_DIFF_PRESS_DEVTYPE_SDP32 0x4A
#define DRV_DIFF_PRESS_DEVTYPE_SDP33 0x4B
#define DRV_BARO_DEVTYPE_LPS33HW 0x4C
#define DRV_BARO_DEVTYPE_TCBP001TA 0x4D
#define DRV_BARO_DEVTYPE_MPL3115A2 0x51
#define DRV_ACC_DEVTYPE_FXOS8701C 0x52
#define DRV_GYR_DEVTYPE_FXAS2100C 0x54
#define DRV_IMU_DEVTYPE_ADIS16448 0x57
#define DRV_IMU_DEVTYPE_ADIS16470 0x58
#define DRV_IMU_DEVTYPE_ADIS16477 0x59
#define DRV_BARO_DEVTYPE_LPS22HB 0x60
#define DRV_ACC_DEVTYPE_LSM303AGR 0x61
#define DRV_MAG_DEVTYPE_LSM303AGR 0x62
#define DRV_IMU_DEVTYPE_ADIS16497 0x63
#define DRV_BARO_DEVTYPE_BAROSIM 0x65
#define DRV_GYR_DEVTYPE_BMI088 0x66
#define DRV_BARO_DEVTYPE_BMP388 0x67
#define DRV_BARO_DEVTYPE_DPS310 0x68
#define DRV_ACC_DEVTYPE_BMI088 0x6a
#define DRV_OSD_DEVTYPE_ATXXXX 0x6b
#define DRV_FLOW_DEVTYPE_PMW3901 0x6c
#define DRV_FLOW_DEVTYPE_PAW3902 0x6d
#define DRV_FLOW_DEVTYPE_PX4FLOW 0x6e
#define DRV_PWM_DEVTYPE_PCA9685 0x6f
#define DRV_DIST_DEVTYPE_LL40LS 0x70
#define DRV_DIST_DEVTYPE_MAPPYDOT 0x71
#define DRV_DIST_DEVTYPE_MB12XX 0x72
#define DRV_DIST_DEVTYPE_LIGHTWARE_LASER 0x73
#define DRV_DIST_DEVTYPE_SRF02 0x74
#define DRV_DIST_DEVTYPE_TERARANGER 0x75
#define DRV_DIST_DEVTYPE_VL53L0X 0x76
#define DRV_POWER_DEVTYPE_INA226 0x77
#define DRV_POWER_DEVTYPE_VOXLPM 0x78
#define DRV_LED_DEVTYPE_RGBLED 0x7a
#define DRV_LED_DEVTYPE_RGBLED_NCP5623C 0x7b
#define DRV_BAT_DEVTYPE_SMBUS 0x7c
#define DRV_SENS_DEVTYPE_IRLOCK 0x7d
#define DRV_SENS_DEVTYPE_PCF8583 0x7e
#define DRV_TEL_DEVTYPE_BST 0x7f
// Generic types for unknown CAN sensors
#define DRV_ACC_DEVTYPE_UAVCAN 0x80
#define DRV_BARO_DEVTYPE_UAVCAN 0x81
#define DRV_BAT_DEVTYPE_UAVCAN 0x82
#define DRV_DIFF_PRESS_DEVTYPE_UAVCAN 0x83
#define DRV_FLOW_DEVTYPE_UAVCAN 0x84
#define DRV_GPS_DEVTYPE_UAVCAN 0x85
#define DRV_GYR_DEVTYPE_UAVCAN 0x86
#define DRV_IMU_DEVTYPE_UAVCAN 0x87
#define DRV_MAG_DEVTYPE_UAVCAN 0x88
#define DRV_DIST_DEVTYPE_UAVCAN 0x89
#define DRV_ADC_DEVTYPE_ADS1115 0x90
#define DRV_DIST_DEVTYPE_VL53L1X 0x91
#define DRV_DIST_DEVTYPE_CM8JL65 0x92
#define DRV_DIST_DEVTYPE_LEDDARONE 0x93
#define DRV_DIST_DEVTYPE_MAVLINK 0x94
#define DRV_DIST_DEVTYPE_PGA460 0x95
#define DRV_DIST_DEVTYPE_PX4FLOW 0x96
#define DRV_DIST_DEVTYPE_TFMINI 0x97
#define DRV_DIST_DEVTYPE_ULANDING 0x98
#define DRV_GPIO_DEVTYPE_MCP23009 0x99
#define DRV_DIST_DEVTYPE_SIM 0x9a
#define DRV_DIST_DEVTYPE_SRF05 0x9b
#define DRV_GPS_DEVTYPE_ASHTECH 0xA0
#define DRV_GPS_DEVTYPE_EMLID_REACH 0xA1
#define DRV_GPS_DEVTYPE_FEMTOMES 0xA2
#define DRV_GPS_DEVTYPE_MTK 0xA3
#define DRV_GPS_DEVTYPE_SBF 0xA4
#define DRV_GPS_DEVTYPE_UBX 0xA5
#define DRV_GPS_DEVTYPE_UBX_6 0xA6
#define DRV_GPS_DEVTYPE_UBX_7 0xA7
#define DRV_GPS_DEVTYPE_UBX_8 0xA8
#define DRV_GPS_DEVTYPE_UBX_9 0xA9
#define DRV_GPS_DEVTYPE_UBX_F9P 0xAA
#define DRV_GPS_DEVTYPE_SIM 0xAF
#define DRV_DEVTYPE_UNUSED 0xff
#endif /* _DRV_SENSOR_H */