c10dof  2.0.0.0
c10dof.h
Go to the documentation of this file.
1 /*
2  * MikroSDK - MikroE Software Development Kit
3  * Copyright© 2020 MikroElektronika d.o.o.
4  *
5  * Permission is hereby granted, free of charge, to any person
6  * obtaining a copy of this software and associated documentation
7  * files (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so,
11  * subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22  * OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
33 // ----------------------------------------------------------------------------
34 
35 #ifndef C10DOF_H
36 #define C10DOF_H
37 
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_i2c_master.h"
41 
42 
43 // -------------------------------------------------------------- PUBLIC MACROS
53 #define C10DOF_MAP_MIKROBUS( cfg, mikrobus ) \
54  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
55  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
56  cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
57  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
58 
64 #define C10DOF_RETVAL uint8_t
65 
66 #define C10DOF_OK 0x00
67 #define C10DOF_INIT_ERROR 0xFF
68 
73 #define C10DOF_BNO055_ADDRESS_A 0x28
74 #define C10DOF_BNO055_ADDRESS_B 0x29
75 #define C10DOF_BNO055_ID 0xA0
76 
82 #define C10DOF_BNO055_PAGE_ID_ADDR 0x07
83 #define C10DOF_BNO055_CHIP_ID_ADDR 0x00
84 #define C10DOF_BNO055_ACCEL_REV_ID_ADDR 0x01
85 #define C10DOF_BNO055_MAG_REV_ID_ADDR 0x02
86 #define C10DOF_BNO055_GYRO_REV_ID_ADDR 0x03
87 #define C10DOF_BNO055_SW_REV_ID_LSB_ADDR 0x04
88 #define C10DOF_BNO055_SW_REV_ID_MSB_ADDR 0x05
89 #define C10DOF_BNO055_BL_REV_ID_ADDR 0X06
90 
96 #define C10DOF_BNO055_ACCEL_DATA_X_LSB_ADDR 0x08
97 #define C10DOF_BNO055_ACCEL_DATA_X_MSB_ADDR 0x09
98 #define C10DOF_BNO055_ACCEL_DATA_Y_LSB_ADDR 0x0A
99 #define C10DOF_BNO055_ACCEL_DATA_Y_MSB_ADDR 0x0B
100 #define C10DOF_BNO055_ACCEL_DATA_Z_LSB_ADDR 0x0C
101 #define C10DOF_BNO055_ACCEL_DATA_Z_MSB_ADDR 0x0D
102 
108 #define C10DOF_BNO055_MAG_DATA_X_LSB_ADDR 0x0E
109 #define C10DOF_BNO055_MAG_DATA_X_MSB_ADDR 0x0F
110 #define C10DOF_BNO055_MAG_DATA_Y_LSB_ADDR 0x10
111 #define C10DOF_BNO055_MAG_DATA_Y_MSB_ADDR 0x11
112 #define C10DOF_BNO055_MAG_DATA_Z_LSB_ADDR 0x12
113 #define C10DOF_BNO055_MAG_DATA_Z_MSB_ADDR 0x13
114 
120 #define C10DOF_BNO055_GYRO_DATA_X_LSB_ADDR 0x14
121 #define C10DOF_BNO055_GYRO_DATA_X_MSB_ADDR 0x15
122 #define C10DOF_BNO055_GYRO_DATA_Y_LSB_ADDR 0x16
123 #define C10DOF_BNO055_GYRO_DATA_Y_MSB_ADDR 0x17
124 #define C10DOF_BNO055_GYRO_DATA_Z_LSB_ADDR 0x18
125 #define C10DOF_BNO055_GYRO_DATA_Z_MSB_ADDR 0x19
126 
132 #define C10DOF_BNO055_EULER_H_LSB_ADDR 0x1A
133 #define C10DOF_BNO055_EULER_H_MSB_ADDR 0x1B
134 #define C10DOF_BNO055_EULER_R_LSB_ADDR 0x1C
135 #define C10DOF_BNO055_EULER_R_MSB_ADDR 0x1D
136 #define C10DOF_BNO055_EULER_P_LSB_ADDR 0x1E
137 #define C10DOF_BNO055_EULER_P_MSB_ADDR 0x1F
138 
144 #define C10DOF_BNO055_QUATERNION_DATA_W_LSB_ADDR 0x20
145 #define C10DOF_BNO055_QUATERNION_DATA_W_MSB_ADDR 0x21
146 #define C10DOF_BNO055_QUATERNION_DATA_X_LSB_ADDR 0x22
147 #define C10DOF_BNO055_QUATERNION_DATA_X_MSB_ADDR 0x23
148 #define C10DOF_BNO055_QUATERNION_DATA_Y_LSB_ADDR 0x24
149 #define C10DOF_BNO055_QUATERNION_DATA_Y_MSB_ADDR 0x25
150 #define C10DOF_BNO055_QUATERNION_DATA_Z_LSB_ADDR 0x26
151 #define C10DOF_BNO055_QUATERNION_DATA_Z_MSB_ADDR 0x27
152 
158 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR 0x28
159 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_X_MSB_ADDR 0x29
160 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_Y_LSB_ADDR 0x2A
161 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_Y_MSB_ADDR 0x2B
162 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_Z_LSB_ADDR 0x2C
163 #define C10DOF_BNO055_LINEAR_ACCEL_DATA_Z_MSB_ADDR 0x2D
164 
170 #define C10DOF_BNO055_GRAVITY_DATA_X_LSB_ADDR 0x2E
171 #define C10DOF_BNO055_GRAVITY_DATA_X_MSB_ADDR 0x2F
172 #define C10DOF_BNO055_GRAVITY_DATA_Y_LSB_ADDR 0x30
173 #define C10DOF_BNO055_GRAVITY_DATA_Y_MSB_ADDR 0x31
174 #define C10DOF_BNO055_GRAVITY_DATA_Z_LSB_ADDR 0x32
175 #define C10DOF_BNO055_GRAVITY_DATA_Z_MSB_ADDR 0x33
176 
182 #define C10DOF_BNO055_TEMP_ADDR 0x34
183 
189 #define C10DOF_BNO055_CALIB_STAT_ADDR 0x35
190 #define C10DOF_BNO055_SELFTEST_RESULT_ADDR 0x36
191 #define C10DOF_BNO055_INTR_STAT_ADDR 0x37
192 #define C10DOF_BNO055_SYS_CLK_STAT_ADDR 0x38
193 #define C10DOF_BNO055_SYS_STAT_ADDR 0x39
194 #define C10DOF_BNO055_SYS_ERR_ADDR 0x3A
195 
201 #define C10DOF_BNO055_UNIT_SEL_ADDR 0x3B
202 #define C10DOF_BNO055_DATA_SELECT_ADDR 0x3C
203 
209 #define C10DOF_BNO055_OPR_MODE_ADDR 0x3D
210 #define C10DOF_BNO055_PWR_MODE_ADDR 0x3E
211 #define C10DOF_BNO055_SYS_TRIGGER_ADDR 0x3F
212 #define C10DOF_BNO055_TEMP_SOURCE_ADDR 0x40
213 
219 #define C10DOF_BNO055_AXIS_MAP_CONFIG_ADDR 0x41
220 #define C10DOF_BNO055_AXIS_MAP_SIGN_ADDR 0x42
221 
227 #define C10DOF_BNO055_SIC_MATRIX_0_LSB_ADDR 0x43
228 #define C10DOF_BNO055_SIC_MATRIX_0_MSB_ADDR 0x44
229 #define C10DOF_BNO055_SIC_MATRIX_1_LSB_ADDR 0x45
230 #define C10DOF_BNO055_SIC_MATRIX_1_MSB_ADDR 0x46
231 #define C10DOF_BNO055_SIC_MATRIX_2_LSB_ADDR 0x47
232 #define C10DOF_BNO055_SIC_MATRIX_2_MSB_ADDR 0x48
233 #define C10DOF_BNO055_SIC_MATRIX_3_LSB_ADDR 0x49
234 #define C10DOF_BNO055_SIC_MATRIX_3_MSB_ADDR 0x4A
235 #define C10DOF_BNO055_SIC_MATRIX_4_LSB_ADDR 0x4B
236 #define C10DOF_BNO055_SIC_MATRIX_4_MSB_ADDR 0x4C
237 #define C10DOF_BNO055_SIC_MATRIX_5_LSB_ADDR 0x4D
238 #define C10DOF_BNO055_SIC_MATRIX_5_MSB_ADDR 0x4E
239 #define C10DOF_BNO055_SIC_MATRIX_6_LSB_ADDR 0x4F
240 #define C10DOF_BNO055_SIC_MATRIX_6_MSB_ADDR 0x50
241 #define C10DOF_BNO055_SIC_MATRIX_7_LSB_ADDR 0x51
242 #define C10DOF_BNO055_SIC_MATRIX_7_MSB_ADDR 0x52
243 #define C10DOF_BNO055_SIC_MATRIX_8_LSB_ADDR 0x53
244 #define C10DOF_BNO055_SIC_MATRIX_8_MSB_ADDR 0x54
245 
251 #define C10DOF_ACCEL_OFFSET_X_LSB_ADDR 0x55
252 #define C10DOF_ACCEL_OFFSET_X_MSB_ADDR 0x56
253 #define C10DOF_ACCEL_OFFSET_Y_LSB_ADDR 0x57
254 #define C10DOF_ACCEL_OFFSET_Y_MSB_ADDR 0x58
255 #define C10DOF_ACCEL_OFFSET_Z_LSB_ADDR 0x59
256 #define C10DOF_ACCEL_OFFSET_Z_MSB_ADDR 0x5A
257 
263 #define C10DOF_MAG_OFFSET_X_LSB_ADDR 0x5B
264 #define C10DOF_MAG_OFFSET_X_MSB_ADDR 0x5C
265 #define C10DOF_MAG_OFFSET_Y_LSB_ADDR 0x5D
266 #define C10DOF_MAG_OFFSET_Y_MSB_ADDR 0x5E
267 #define C10DOF_MAG_OFFSET_Z_LSB_ADDR 0x5F
268 #define C10DOF_MAG_OFFSET_Z_MSB_ADDR 0x60
269 
275 #define C10DOF_GYRO_OFFSET_X_LSB_ADDR 0x61
276 #define C10DOF_GYRO_OFFSET_X_MSB_ADDR 0x62
277 #define C10DOF_GYRO_OFFSET_Y_LSB_ADDR 0x63
278 #define C10DOF_GYRO_OFFSET_Y_MSB_ADDR 0x64
279 #define C10DOF_GYRO_OFFSET_Z_LSB_ADDR 0x65
280 #define C10DOF_GYRO_OFFSET_Z_MSB_ADDR 0x66
281 
287 #define C10DOF_ACCEL_RADIUS_LSB_ADDR 0x67
288 #define C10DOF_ACCEL_RADIUS_MSB_ADDR 0x68
289 #define C10DOF_MAG_RADIUS_LSB_ADDR 0x69
290 #define C10DOF_MAG_RADIUS_MSB_ADDR 0x6A
291 
297 #define C10DOF_BMP180_ADDRESS 0x77
298 #define C10DOF_BMP180_PROM_START__ADDR 0xAA
299 #define C10DOF_BMP180_CHIP_ID_REG 0xD0
300 #define C10DOF_BMP180_VERSION_REG 0xD1
301 #define C10DOF_BMP180_CTRL_MEAS_REG 0xF4
302 #define C10DOF_BMP180_ADC_OUT_MSB_REG 0xF6
303 #define C10DOF_BMP180_ADC_OUT_LSB_REG 0xF7
304 #define C10DOF_BMP180_SOFT_RESET_REG 0xE0
305 #define C10DOF_BMP180_REG_CALIB_PARAM_AC1_MSB 0xAA
306 #define C10DOF_BMP180_REG_CALIB_PARAM_AC1_LSB 0xAB
307 #define C10DOF_BMP180_REG_CALIB_PARAM_AC2_MSB 0xAC
308 #define C10DOF_BMP180_REG_CALIB_PARAM_AC2_LSB 0xAD
309 #define C10DOF_BMP180_REG_CALIB_PARAM_AC3_MSB 0xAE
310 #define C10DOF_BMP180_REG_CALIB_PARAM_AC3_LSB 0xAF
311 #define C10DOF_BMP180_REG_CALIB_PARAM_AC4_MSB 0xB0
312 #define C10DOF_BMP180_REG_CALIB_PARAM_AC4_LSB 0xB1
313 #define C10DOF_BMP180_REG_CALIB_PARAM_AC5_MSB 0xB2
314 #define C10DOF_BMP180_REG_CALIB_PARAM_AC5_LSB 0xB3
315 #define C10DOF_BMP180_REG_CALIB_PARAM_AC6_MSB 0xB4
316 #define C10DOF_BMP180_REG_CALIB_PARAM_AC6_LSB 0xB5
317 #define C10DOF_BMP180_REG_CALIB_PARAM_B1_MSB 0xB6
318 #define C10DOF_BMP180_REG_CALIB_PARAM_B1_LSB 0xB7
319 #define C10DOF_BMP180_REG_CALIB_PARAM_B2_MSB 0xB8
320 #define C10DOF_BMP180_REG_CALIB_PARAM_B2_LSB 0xB9
321 #define C10DOF_BMP180_REG_CALIB_PARAM_MB_MSB 0xBA
322 #define C10DOF_BMP180_REG_CALIB_PARAM_MB_LSB 0xBB
323 #define C10DOF_BMP180_REG_CALIB_PARAM_MC_MSB 0xBC
324 #define C10DOF_BMP180_REG_CALIB_PARAM_MC_LSB 0xBD
325 #define C10DOF_BMP180_REG_CALIB_PARAM_MD_MSB 0xBE
326 #define C10DOF_BMP180_REG_CALIB_PARAM_MD_LSB 0xBF
327 #define C10DOF_BMP180_REG_CONF_ADDR 0x07
328 #define C10DOF_BMP180_PWR_MODE_ADDR 0x3E
329 #define C10DOF_BMP180_OPR_MODE_ADDR 0x3D
330 #define C10DOF_BMP180_T_MEASURE 0x2E
331 #define C10DOF_BMP180_P_MEASURE 0x34
332  // End group macro
335 // --------------------------------------------------------------- PUBLIC TYPES
344 typedef struct
345 {
346  // Output pins
347 
348  digital_out_t rst;
349 
350  // Input pins
351 
352  digital_in_t int_pin;
353 
354  // Modules
355 
356  i2c_master_t i2c;
357 
358  // ctx variable
359 
360  uint8_t slave_address;
361 
362 } c10dof_t;
363 
367 typedef struct
368 {
369  // Communication gpio pins
370 
371  pin_name_t scl;
372  pin_name_t sda;
373 
374  // Additional gpio pins
375 
376  pin_name_t rst;
377  pin_name_t int_pin;
378 
379  // static variable
380 
381  uint32_t i2c_speed;
382  uint8_t i2c_address;
383 
384 } c10dof_cfg_t;
385  // End types group
387 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
388 
394 #ifdef __cplusplus
395 extern "C"{
396 #endif
397 
406 void c10dof_cfg_setup ( c10dof_cfg_t *cfg );
407 
417 
425 void c10dof_default_cfg ( c10dof_t *ctx );
426 
437 void c10dof_write_byte ( c10dof_t *ctx, uint8_t reg, uint8_t data_in, uint8_t slave_addr );
438 
451 uint8_t c10dof_read_byte ( c10dof_t *ctx, uint8_t reg, uint8_t slave_addr );
452 
465 uint16_t c10dof_read_data ( c10dof_t *ctx, uint8_t msb_reg, uint8_t slave_addr );
466 
475 void c10dof_hw_reset ( c10dof_t *ctx );
476 
487 uint8_t c10dof_bmp180_chip_ID ( c10dof_t *ctx );
488 
499 uint8_t c10dof_bno055_chip_ID ( c10dof_t *ctx );
500 
511 uint8_t c10dof_get_accel_ID ( c10dof_t *ctx );
512 
523 uint8_t c10dof_get_mag_ID ( c10dof_t *ctx );
524 
535 uint8_t c10dof_get_gyro_ID ( c10dof_t *ctx );
536 
547 uint16_t c10dof_get_soft_ID ( c10dof_t *ctx );
548 
559 uint8_t c10dof_get_page_ID ( c10dof_t *ctx );
560 
570 
580 
591 void c10dof_set_config_mode ( c10dof_t *ctx, uint8_t config_mode );
592 
603 void c10dof_select_page ( c10dof_t *ctx, uint8_t page_number );
604 
615 void c10dof_config_accel ( c10dof_t *ctx, uint8_t acc_cnfg );
616 
627 void c10dof_config_gyro ( c10dof_t *ctx, uint8_t gyro_cnfg );
628 
639 void c10dof_config_mag ( c10dof_t *ctx, uint8_t mag_cnfg );
640 
651 void c10dof_set_sensor_units ( c10dof_t *ctx, uint8_t sensor_units );
652 
663 uint8_t c10dof_get_system_status ( c10dof_t *ctx );
664 
675 uint8_t c10dof_get_system_error ( c10dof_t *ctx );
676 
686 void c10dof_set_mode( c10dof_t *ctx, uint8_t mode_val );
687 
696 void c10dof_set_normal_mode ( c10dof_t *ctx );
697 
707 
717 
727 int16_t c10dof_read_raw_temperature ( c10dof_t *ctx, uint8_t msb_reg );
728 
738 int32_t c10dof_read_raw_pressure ( c10dof_t *ctx, uint8_t msb_addr );
739 
747 void c10dof_get_calib_param ( c10dof_t *ctx );
748 
757 void c10dof_get_measurements ( c10dof_t *ctx, float *temperature, float *pressure );
758 
768 float c10dof_get_temperature ( c10dof_t *ctx );
769 
779 float c10dof_get_pressure ( c10dof_t *ctx );
780 
791 int16_t c10dof_get_axis( c10dof_t *ctx, uint8_t addr_reg_low );
792 
803 void c10dof_read_accel ( c10dof_t *ctx, int16_t *accelX, int16_t *accelY, int16_t *accelZ );
804 
815 void c10dof_read_mag ( c10dof_t *ctx, int16_t *magX, int16_t *magY, int16_t *magZ );
816 
830 void c10dof_read_gyro ( c10dof_t *ctx, int16_t *gyroX, int16_t *gyroY, int16_t *gyroZ );
831 
841 uint8_t c10dof_check_interrupt ( c10dof_t *ctx );
842 
843 #ifdef __cplusplus
844 }
845 #endif
846 #endif // _C10DOF_H_
847  // End public_function group
850 
851 // ------------------------------------------------------------------------- END
c10dof_set_sensor_units
void c10dof_set_sensor_units(c10dof_t *ctx, uint8_t sensor_units)
Sensor units function.
c10dof_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: c10dof.h:381
c10dof_cfg_t::i2c_address
uint8_t i2c_address
Definition: c10dof.h:382
C10DOF_RETVAL
#define C10DOF_RETVAL
Definition: c10dof.h:64
c10dof_start_pressure_measure
void c10dof_start_pressure_measure(c10dof_t *ctx)
Pressure reading start.
c10dof_select_page
void c10dof_select_page(c10dof_t *ctx, uint8_t page_number)
Page selection function.
c10dof_get_measurements
void c10dof_get_measurements(c10dof_t *ctx, float *temperature, float *pressure)
Get measurements value - temperature and pressure data function.
c10dof_get_system_error
uint8_t c10dof_get_system_error(c10dof_t *ctx)
System error code.
c10dof_t::rst
digital_out_t rst
Definition: c10dof.h:348
c10dof_get_system_status
uint8_t c10dof_get_system_status(c10dof_t *ctx)
System status code.
c10dof_start_temperature_measure
void c10dof_start_temperature_measure(c10dof_t *ctx)
Temperature reading start.
c10dof_hw_reset
void c10dof_hw_reset(c10dof_t *ctx)
Reset function.
c10dof_get_accel_ID
uint8_t c10dof_get_accel_ID(c10dof_t *ctx)
ID function.
c10dof_read_raw_pressure
int32_t c10dof_read_raw_pressure(c10dof_t *ctx, uint8_t msb_addr)
Raw pressure reading.
c10dof_read_accel
void c10dof_read_accel(c10dof_t *ctx, int16_t *accelX, int16_t *accelY, int16_t *accelZ)
Function read Accel X-axis, Y-axis and Z-axis.
c10dof_init
C10DOF_RETVAL c10dof_init(c10dof_t *ctx, c10dof_cfg_t *cfg)
Initialization function.
c10dof_get_gyro_ID
uint8_t c10dof_get_gyro_ID(c10dof_t *ctx)
ID function.
c10dof_get_axis
int16_t c10dof_get_axis(c10dof_t *ctx, uint8_t addr_reg_low)
Function get axis data of BNO055 register.
c10dof_cfg_t::int_pin
pin_name_t int_pin
Definition: c10dof.h:377
c10dof_cfg_t::rst
pin_name_t rst
Definition: c10dof.h:376
c10dof_t::slave_address
uint8_t slave_address
Definition: c10dof.h:360
c10dof_check_interrupt
uint8_t c10dof_check_interrupt(c10dof_t *ctx)
Check the state of interrupt function.
c10dof_config_gyro
void c10dof_config_gyro(c10dof_t *ctx, uint8_t gyro_cnfg)
Gyro configuration function.
c10dof_set_config_mode
void c10dof_set_config_mode(c10dof_t *ctx, uint8_t config_mode)
Configuration function.
c10dof_default_configuration_BNO055
void c10dof_default_configuration_BNO055(c10dof_t *ctx)
Configuration function.
c10dof_read_gyro
void c10dof_read_gyro(c10dof_t *ctx, int16_t *gyroX, int16_t *gyroY, int16_t *gyroZ)
Function read Gyro X-axis, Y-axis and Z-axis axis.
c10dof_t::int_pin
digital_in_t int_pin
Definition: c10dof.h:352
c10dof_read_data
uint16_t c10dof_read_data(c10dof_t *ctx, uint8_t msb_reg, uint8_t slave_addr)
Generic read function.
c10dof_set_mode
void c10dof_set_mode(c10dof_t *ctx, uint8_t mode_val)
Mode.
c10dof_write_byte
void c10dof_write_byte(c10dof_t *ctx, uint8_t reg, uint8_t data_in, uint8_t slave_addr)
Generic write function.
c10dof_cfg_setup
void c10dof_cfg_setup(c10dof_cfg_t *cfg)
Config Object Initialization function.
c10dof_get_mag_ID
uint8_t c10dof_get_mag_ID(c10dof_t *ctx)
ID function.
c10dof_t::i2c
i2c_master_t i2c
Definition: c10dof.h:356
c10dof_cfg_t::scl
pin_name_t scl
Definition: c10dof.h:371
c10dof_get_page_ID
uint8_t c10dof_get_page_ID(c10dof_t *ctx)
ID function.
c10dof_bmp180_chip_ID
uint8_t c10dof_bmp180_chip_ID(c10dof_t *ctx)
ID function.
c10dof_t
Click ctx object definition.
Definition: c10dof.h:344
c10dof_cfg_t
Click configuration structure definition.
Definition: c10dof.h:367
c10dof_default_configuration_BMP180
void c10dof_default_configuration_BMP180(c10dof_t *ctx)
Configuration function.
c10dof_bno055_chip_ID
uint8_t c10dof_bno055_chip_ID(c10dof_t *ctx)
ID function.
c10dof_read_raw_temperature
int16_t c10dof_read_raw_temperature(c10dof_t *ctx, uint8_t msb_reg)
Raw temperature reading.
c10dof_get_pressure
float c10dof_get_pressure(c10dof_t *ctx)
Get pressure value function.
c10dof_config_accel
void c10dof_config_accel(c10dof_t *ctx, uint8_t acc_cnfg)
Accel configuration function.
c10dof_default_cfg
void c10dof_default_cfg(c10dof_t *ctx)
Click Default Configuration function.
c10dof_get_calib_param
void c10dof_get_calib_param(c10dof_t *ctx)
Read the calibration parameter function.
c10dof_get_temperature
float c10dof_get_temperature(c10dof_t *ctx)
Get temperature value function.
c10dof_cfg_t::sda
pin_name_t sda
Definition: c10dof.h:372
c10dof_set_normal_mode
void c10dof_set_normal_mode(c10dof_t *ctx)
Normal mode.
c10dof_read_byte
uint8_t c10dof_read_byte(c10dof_t *ctx, uint8_t reg, uint8_t slave_addr)
Generic read function.
c10dof_config_mag
void c10dof_config_mag(c10dof_t *ctx, uint8_t mag_cnfg)
Mag configuration function.
c10dof_get_soft_ID
uint16_t c10dof_get_soft_ID(c10dof_t *ctx)
ID function.
c10dof_read_mag
void c10dof_read_mag(c10dof_t *ctx, int16_t *magX, int16_t *magY, int16_t *magZ)
Function read Magnetometar X-axis, Y-axis and Z-axis.