c6dofimu5  2.0.0.0
c6dofimu5.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 C6DOFIMU5_H
36 #define C6DOFIMU5_H
37 
38 #include "mikrosdk_version.h"
39 
40 #ifdef __GNUC__
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
43 #else
44 #include "delays.h"
45 #endif
46 #endif
47 
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
50 #include "drv_i2c_master.h"
51 #include "drv_spi_master.h"
52 
53 // -------------------------------------------------------------- PUBLIC MACROS
64 #define C6DOFIMU5_MAP_MIKROBUS( cfg, mikrobus ) \
65  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
66  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
67  cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
68  cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
69  cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
70  cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
71  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
72 
78 #define C6DOFIMU5_RETVAL uint8_t
79 
80 #define C6DOFIMU5_OK 0x00
81 #define C6DOFIMU5_INIT_ERROR 0xFF
82 
88 #define C6DOFIMU5_I2C_SLAVE_ADR 0x63
89 
95 #define C6DOFIMU5_READ_BIT_MASK 0x80
96 #define C6DOFIMU5_WRITE_BIT_MASK 0x7F
97 
103 #define C6DOFIMU5_SELF_TEST_X_GYRO 0x00
104 #define C6DOFIMU5_SELF_TEST_Y_GYRO 0x01
105 #define C6DOFIMU5_SELF_TEST_Z_GYRO 0x02
106 #define C6DOFIMU5_SELF_TEST_X_ACCEL 0x0D
107 #define C6DOFIMU5_SELF_TEST_Y_ACCEL 0x0E
108 #define C6DOFIMU5_SELF_TEST_Z_ACCEL 0x0F
109 #define C6DOFIMU5_XG_OFFS_USR_H 0x13
110 #define C6DOFIMU5_XG_OFFS_USR_L 0x14
111 #define C6DOFIMU5_YG_OFFS_USR_H 0x15
112 #define C6DOFIMU5_YG_OFFS_USR_L 0x16
113 #define C6DOFIMU5_ZG_OFFS_USR_H 0x17
114 #define C6DOFIMU5_ZG_OFFS_USR_L 0x18
115 #define C6DOFIMU5_SMPL_RT_DIV 0x19
116 #define C6DOFIMU5_CFG 0x1A
117 #define C6DOFIMU5_GYRO_CFG 0x1B
118 #define C6DOFIMU5_ACCEL_CFG 0x1C
119 #define C6DOFIMU5_ACCEL_CFG_2 0x1D
120 #define C6DOFIMU5_LP_MODE_CTL 0x1E
121 #define C6DOFIMU5_ACCEL_WOM_X_THR 0x20
122 #define C6DOFIMU5_ACCEL_WOM_Y_THR 0x21
123 #define C6DOFIMU5_ACCEL_WOM_Z_THR 0x22
124 #define C6DOFIMU5_FIFO_EN 0x23
125 #define C6DOFIMU5_INT_PIN_CFG 0x37
126 #define C6DOFIMU5_INT_ENABLE 0x38
127 #define C6DOFIMU5_DMP_INT_STAT 0x39
128 #define C6DOFIMU5_INT_STAT 0x3A
129 #define C6DOFIMU5_ACCEL_XOUT_H 0x3B
130 #define C6DOFIMU5_ACCEL_XOUT_L 0x3C
131 #define C6DOFIMU5_ACCEL_YOUT_H 0x3D
132 #define C6DOFIMU5_ACCEL_YOUT_L 0x3E
133 #define C6DOFIMU5_ACCEL_ZOUT_H 0x3F
134 #define C6DOFIMU5_ACCEL_ZOUT_L 0x40
135 #define C6DOFIMU5_TEMP_OUT_H 0x41
136 #define C6DOFIMU5_TEMP_OUT_L 0x42
137 #define C6DOFIMU5_GYRO_XOUT_H 0x43
138 #define C6DOFIMU5_GYRO_XOUT_L 0x44
139 #define C6DOFIMU5_GYRO_YOUT_H 0x45
140 #define C6DOFIMU5_GYRO_YOUT_L 0x46
141 #define C6DOFIMU5_GYRO_ZOUT_H 0x47
142 #define C6DOFIMU5_GYRO_ZOUT_L 0x48
143 #define C6DOFIMU5_SIGNAL_PATH_RST 0x68
144 #define C6DOFIMU5_ACCEL_INTEL_CTL 0x69
145 #define C6DOFIMU5_USER_CTL 0x6A
146 #define C6DOFIMU5_PWR_MGMT_1 0x6B
147 #define C6DOFIMU5_PWR_MGMT_2 0x6C
148 #define C6DOFIMU5_FIFO_CNT_H 0x72
149 #define C6DOFIMU5_FIFO_CNT_L 0x73
150 #define C6DOFIMU5_FIFO_R_W 0x74
151 #define C6DOFIMU5_WHO_AM_I 0x75
152 #define C6DOFIMU5_XA_OFFS_H 0x77
153 #define C6DOFIMU5_XA_OFFS_L 0x78
154 #define C6DOFIMU5_YA_OFFS_H 0x7A
155 #define C6DOFIMU5_YA_OFFS_L 0x7B
156 #define C6DOFIMU5_ZA_OFFS_H 0x7D
157 #define C6DOFIMU5_ZA_OFFS_L 0x7E
158 
164 #define C6DOFIMU5_CFG_FIFO_MODE 0x40
165 #define C6DOFIMU5_CFG_EXT_SYNC_SET_1 0x08
166 #define C6DOFIMU5_CFG_EXT_SYNC_SET_2 0x10
167 #define C6DOFIMU5_CFG_EXT_SYNC_SET_3 0x18
168 #define C6DOFIMU5_CFG_EXT_SYNC_SET_4 0x20
169 #define C6DOFIMU5_CFG_EXT_SYNC_SET_5 0x28
170 #define C6DOFIMU5_CFG_EXT_SYNC_SET_6 0x30
171 #define C6DOFIMU5_CFG_EXT_SYNC_SET_7 0x38
172 #define C6DOFIMU5_CFG_DLPF_CFG_0 0x00
173 #define C6DOFIMU5_CFG_DLPF_CFG_1 0x01
174 #define C6DOFIMU5_CFG_DLPF_CFG_2 0x02
175 #define C6DOFIMU5_CFG_DLPF_CFG_3 0x03
176 #define C6DOFIMU5_CFG_DLPF_CFG_4 0x04
177 #define C6DOFIMU5_CFG_DLPF_CFG_5 0x05
178 #define C6DOFIMU5_CFG_DLPF_CFG_6 0x06
179 #define C6DOFIMU5_CFG_DLPF_CFG_7 0x07
180 
186 #define C6DOFIMU5_GYRO_CFG_XGYRO_STEN 0x80
187 #define C6DOFIMU5_GYRO_CFG_YGYRO_STEN 0x40
188 #define C6DOFIMU5_GYRO_CFG_ZGYRO_STEN 0x20
189 #define C6DOFIMU5_GYRO_CFG_FS_SEL_2000 0x18
190 #define C6DOFIMU5_GYRO_CFG_FS_SEL_1000 0x10
191 #define C6DOFIMU5_GYRO_CFG_FS_SEL_500 0x08
192 #define C6DOFIMU5_GYRO_CFG_FS_SEL_250 0x00
193 #define C6DOFIMU5_GYRO_CFG_FCHOICE_B_2 0x02
194 #define C6DOFIMU5_GYRO_CFG_FCHOICE_B_1 0x01
195 #define C6DOFIMU5_GYRO_CFG_FCHOICE_B_0 0x00
196 
202 #define C6DOFIMU5_ACCEL_CFG_AX_ST_EN 0x80
203 #define C6DOFIMU5_ACCEL_CFG_AY_ST_EN 0x40
204 #define C6DOFIMU5_ACCEL_CFG_AZ_ST_EN 0x20
205 #define C6DOFIMU5_ACCEL_CFG_FS_SEL_16G 0x18
206 #define C6DOFIMU5_ACCEL_CFG_FS_SEL_8G 0x10
207 #define C6DOFIMU5_ACCEL_CFG_FS_SEL_4G 0x08
208 #define C6DOFIMU5_ACCEL_CFG_FS_SEL_2G 0x00
209 
215 #define C6DOFIMU5_ACCEL2_CFG_FIFO_SIZE_4KB 0x40
216 #define C6DOFIMU5_ACCEL2_CFG_FIFO_SIZE_2KB 0x08
217 #define C6DOFIMU5_ACCEL2_CFG_FIFO_SIZE_1KB 0x10
218 #define C6DOFIMU5_ACCEL2_CFG_FIFO_SIZE_512B 0x18
219 #define C6DOFIMU5_ACCEL2_CFG_DEC2_CFG_32 0x30
220 #define C6DOFIMU5_ACCEL2_CFG_DEC2_CFG_16 0x20
221 #define C6DOFIMU5_ACCEL2_CFG_DEC2_CFG_8 0x10
222 #define C6DOFIMU5_ACCEL2_CFG_DEC2_CFG_4 0x00
223 #define C6DOFIMU5_ACCEL2_CFG_FCHOICE_B 0x00
224 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_0 0x00
225 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_1 0x01
226 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_2 0x02
227 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_3 0x03
228 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_4 0x04
229 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_5 0x05
230 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_6 0x06
231 #define C6DOFIMU5_ACCEL2_CFG_A_DLPF_CFG_7 0x07
232 
238 #define C6DOFIMU5_FIFO_EN_TEMP_OUT 0x80
239 #define C6DOFIMU5_FIFO_EN_GYRO_XOUT 0x40
240 #define C6DOFIMU5_FIFO_EN_GYRO_YOUT 0x20
241 #define C6DOFIMU5_FIFO_EN_GYRO_ZOUT 0x10
242 #define C6DOFIMU5_FIFO_EN_ACCEL_XYZ_OUT 0x08
243 
249 #define C6DOFIMU5_INT_PIN_CFG_ACTL 0x80
250 #define C6DOFIMU5_INT_PIN_CFG_OPEN 0x40
251 #define C6DOFIMU5_INT_PIN_CFG_LATCH_INT_EN 0x20
252 #define C6DOFIMU5_INT_PIN_CFG_INT_ANYRD_2CLR 0x10
253 #define C6DOFIMU5_INT_PIN_CFG_ACTL_FSYNC 0x08
254 #define C6DOFIMU5_INT_PIN_CFG_FSYNC_INT_MODE_EN 0x04
255 #define C6DOFIMU5_INT_PIN_CFG_BYPASS_EN 0x02
256 
262 #define C6DOFIMU5_INT_ENABLE_WOM_X_INT_EN 0x80
263 #define C6DOFIMU5_INT_ENABLE_WOM_Y_INT_EN 0x40
264 #define C6DOFIMU5_INT_ENABLE_WOM_Z_INT_EN 0x20
265 #define C6DOFIMU5_INT_ENABLE_FIFO_OVF_EN 0x10
266 #define C6DOFIMU5_INT_ENABLE_GDRIVE_RDY_EN 0x04
267 #define C6DOFIMU5_INT_ENABLE_DMP_INT_EN 0x02
268 #define C6DOFIMU5_INT_ENABLE_RAW_RDY_EN 0x01
269 
275 #define C6DOFIMU5_INT_STAT_WOM_X_INT 0x80
276 #define C6DOFIMU5_INT_STAT_WOM_Y_INT 0x40
277 #define C6DOFIMU5_INT_STAT_WOM_Z_INT 0x20
278 #define C6DOFIMU5_INT_STAT_FIFO_OVF_INT 0x10
279 #define C6DOFIMU5_INT_STAT_GDRIVE_RDY_INT 0x04
280 #define C6DOFIMU5_INT_STAT_DMP_INT 0x02
281 #define C6DOFIMU5_INT_STAT_RAW_RDY_INT 0x01
282 
288 #define C6DOFIMU5_SIGNAL_PATH_RST_GYRO_RST 0x80
289 #define C6DOFIMU5_SIGNAL_PATH_RST_ACCEL_RST 0x40
290 #define C6DOFIMU5_SIGNAL_PATH_RST_TEMP_RST 0x20
291 
297 #define C6DOFIMU5_ACCEL_INTEL_CTL_INTEL_EN 0x80
298 #define C6DOFIMU5_ACCEL_INTEL_CTL_INTEL_MODE_PREV_SAMP 0x40
299 #define C6DOFIMU5_ACCEL_INTEL_CTL_INTEL_MODE_FIRST_SAMP 0x00
300 
306 #define C6DOFIMU5_USER_CTL_DMP_EN 0x80
307 #define C6DOFIMU5_USER_CTL_FIFO_EN 0x40
308 #define C6DOFIMU5_USER_CTL_I2C_IF_DIS 0x10
309 #define C6DOFIMU5_USER_CTL_DMP_RST 0x08
310 #define C6DOFIMU5_USER_CTL_FIFO_RST 0x04
311 #define C6DOFIMU5_USER_CTL_SIG_COND_RST 0x01
312 
318 #define C6DOFIMU5_PWR_MGMT_1_DEV_RST 0x80
319 #define C6DOFIMU5_PWR_MGMT_1_SLEEP 0x40
320 #define C6DOFIMU5_PWR_MGMT_1_ACCEL_CYC 0x20
321 #define C6DOFIMU5_PWR_MGMT_1_GYRO_STDBY 0x10
322 #define C6DOFIMU5_PWR_MGMT_1_TEMP_DIS 0x08
323 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_7 0x07
324 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_6 0x06
325 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_5 0x05
326 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_4 0x04
327 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_3 0x03
328 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_2 0x02
329 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_1 0x01
330 #define C6DOFIMU5_PWR_MGMT_1_CLKSEL_0 0x00
331 
337 #define C6DOFIMU5_PWR_MGMT_2_LP_DIS 0x80
338 #define C6DOFIMU5_PWR_MGMT_2_DMP_LP_DIS 0x40
339 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_XA 0x20
340 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_YA 0x10
341 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_ZA 0x08
342 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_XG 0x04
343 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_YG 0x02
344 #define C6DOFIMU5_PWR_MGMT_2_DISABLE_ZG 0x01
345 
351 #define C6DOFIMU5_WHO_AM_I_VAL 0x03
352 
358 #define C6DOFIMU5_MEAS_CMD_LP_TRANS_T_FIRST 0x609C
359 #define C6DOFIMU5_MEAS_CMD_N_TRANS_T_FIRST 0x6825
360 #define C6DOFIMU5_MEAS_CMD_LN_TRANS_T_FIRST 0x70DF
361 #define C6DOFIMU5_MEAS_CMD_ULN_TRANS_T_FIRST 0x7866
362 #define C6DOFIMU5_MEAS_CMD_LP_TRANS_P_FIRST 0x401A
363 #define C6DOFIMU5_MEAS_CMD_N_TRANS_P_FIRST 0x48A3
364 #define C6DOFIMU5_MEAS_CMD_LN_TRANS_P_FIRST 0x5059
365 #define C6DOFIMU5_MEAS_CMD_ULN_TRANS_P_FIRST 0x58E0
366 #define C6DOFIMU5_DEVICE_SOFT_RESET_CMD 0x805D
367 #define C6DOFIMU5_READ_ID_REGISTER 0xEFC8
368 #define C6DOFIMU5_INCREMENTAL_READ 0xC7F7
369 #define C6DOFIMU5_ADR_REG_MOVE_POINTER 0xC595
370 
376 #define C6DOFIMU5_POWER_ON 0x01
377 #define C6DOFIMU5_POWER_OFF 0x00
378 
384 #define C6DOFIMU5_GYRO_SENS_FS_SEL_2000 16.4
385 #define C6DOFIMU5_GYRO_SENS_FS_SEL_1000 32.8
386 #define C6DOFIMU5_GYRO_SENS_FS_SEL_500 65.5
387 #define C6DOFIMU5_GYRO_SENS_FS_SEL_250 131.0
388 #define C6DOFIMU5_ACCEL_SENS_FS_SEL_16G 2048.0
389 #define C6DOFIMU5_ACCEL_SENS_FS_SEL_8G 4096.0
390 #define C6DOFIMU5_ACCEL_SENS_FS_SEL_4G 8192.0
391 #define C6DOFIMU5_ACCEL_SENS_FS_SEL_2G 16384.0
392 
398 #define C6DOFIMU5_LUT_LOWER 3670016.0
399 #define C6DOFIMU5_LUT_UPPER 12058624.0
400 #define C6DOFIMU5_QUADR_FACTOR 0.000000059604644775390625
401 #define C6DOFIMU5_OFFST_FACTOR 2048.0
402 #define C6DOFIMU5_P_PA_CALIB_0 45000.0
403 #define C6DOFIMU5_P_PA_CALIB_1 80000.0
404 #define C6DOFIMU5_P_PA_CALIB_2 105000.0
405  // End group macro
408 // --------------------------------------------------------------- PUBLIC TYPES
414 typedef struct
415 {
416  uint32_t p_raw;
417  uint16_t t_raw;
418  float pressure;
419  float temperature;
421 
425 typedef struct c6dofimu5_s
426 {
427  // Input pins
428 
429  digital_out_t cs;
430  digital_in_t int_pin;
431 
432  // Modules
433 
434  i2c_master_t i2c;
435  spi_master_t spi;
436 
437  // ctx variable
438 
439  uint8_t slave_address;
440  pin_name_t chip_select;
441 
446 
448 
452 typedef struct
453 {
454  // Communication gpio pins
455 
456  pin_name_t scl;
457  pin_name_t sda;
458  pin_name_t miso;
459  pin_name_t mosi;
460  pin_name_t sck;
461  pin_name_t cs;
462 
463  // Additional gpio pins
464 
465  pin_name_t int_pin;
466 
467  // static variable
468 
469  uint32_t i2c_speed;
470  uint8_t i2c_address;
471 
472  uint32_t spi_speed;
473  spi_master_mode_t spi_mode;
474  spi_master_chip_select_polarity_t cs_polarity;
475 
477  // End types group
479 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
485 #ifdef __cplusplus
486 extern "C"{
487 #endif
488 
498 
508 
517 
529 void c6dofimu5_write_bytes ( c6dofimu5_t *ctx, uint8_t reg, uint8_t *wr_data, uint16_t n_bytes );
530 
542 void c6dofimu5_read_bytes ( c6dofimu5_t *ctx, uint8_t reg, uint8_t *rd_data, uint16_t n_bytes );
543 
553 void c6dofimu5_power ( c6dofimu5_t *ctx, uint8_t on_off );
554 
563 
572 
581 
592 void c6dofimu5_read_gyroscope ( c6dofimu5_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z );
593 
604 void c6dofimu5_angular_rate ( c6dofimu5_t *ctx, float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
605 
614 
623 
632 
643 void c6dofimu5_read_accelerometer ( c6dofimu5_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z );
644 
655 void c6dofimu5_acceleration_rate ( c6dofimu5_t *ctx, float *x_accel_rte, float *y_accel_rte, float *z_accel_rte );
656 
665 
676 void c6dofimu5_baro_read ( c6dofimu5_t *ctx, uint16_t cmd, uint8_t *data_out, uint16_t n_bytes );
677 
687 void c6dofimu5_baro_write ( c6dofimu5_t *ctx, uint8_t *data_in, uint16_t n_bytes );
688 
699 
708 
717 
728 
738 void c6dofimu5_read_raw_data ( c6dofimu5_t *ctx, uint32_t *pres, uint16_t *temp );
739 
748 
749 #ifdef __cplusplus
750 }
751 #endif
752 #endif // _C6DOFIMU5_H_
753  // End public_function group
756 
757 // ------------------------------------------------------------------------- END
c6dofimu5_s::chip_select
pin_name_t chip_select
Definition: c6dofimu5.h:440
c6dofimu5_power
void c6dofimu5_power(c6dofimu5_t *ctx, uint8_t on_off)
Power up function.
c6dofimu5_cfg_t::cs_polarity
spi_master_chip_select_polarity_t cs_polarity
Definition: c6dofimu5.h:474
c6dofimu5_baro_read
void c6dofimu5_baro_read(c6dofimu5_t *ctx, uint16_t cmd, uint8_t *data_out, uint16_t n_bytes)
Barometer Read function.
c6dofimu5_s
Click ctx object definition.
Definition: c6dofimu5.h:426
c6dofimu5_read_gyro_z
int16_t c6dofimu5_read_gyro_z(c6dofimu5_t *ctx)
Read Gyroscope Z-axis data function.
c6dofimu5_read_raw_data
void c6dofimu5_read_raw_data(c6dofimu5_t *ctx, uint32_t *pres, uint16_t *temp)
Read raw data function.
c6dofimu5_cfg_t::spi_mode
spi_master_mode_t spi_mode
Definition: c6dofimu5.h:473
c6dofimu5_baro_write
void c6dofimu5_baro_write(c6dofimu5_t *ctx, uint8_t *data_in, uint16_t n_bytes)
Barometer Write function.
c6dofimu5_process_data_t::temperature
float temperature
Definition: c6dofimu5.h:419
c6dofimu5_s::i2c
i2c_master_t i2c
Definition: c6dofimu5.h:434
c6dofimu5_cfg_t::mosi
pin_name_t mosi
Definition: c6dofimu5.h:459
c6dofimu5_read_bytes
void c6dofimu5_read_bytes(c6dofimu5_t *ctx, uint8_t reg, uint8_t *rd_data, uint16_t n_bytes)
Generic read function.
c6dofimu5_read_gyro_x
int16_t c6dofimu5_read_gyro_x(c6dofimu5_t *ctx)
Read Gyroscope X-axis data function.
c6dofimu5_process_data_t
Definition: c6dofimu5.h:415
c6dofimu5_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: c6dofimu5.h:469
c6dofimu5_read_temp_out
float c6dofimu5_read_temp_out(c6dofimu5_t *ctx)
Read temperture function.
c6dofimu5_default_cfg
void c6dofimu5_default_cfg(c6dofimu5_t *ctx)
Click Default Configuration function.
c6dofimu5_s::sens_const_1
float sens_const_1
Definition: c6dofimu5.h:443
c6dofimu5_angular_rate
void c6dofimu5_angular_rate(c6dofimu5_t *ctx, float *x_ang_rte, float *y_ang_rte, float *z_ang_rte)
Read Angular Rate function.
c6dofimu5_read_accelerometer
void c6dofimu5_read_accelerometer(c6dofimu5_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
Read accelerometer data function.
c6dofimu5_write_bytes
void c6dofimu5_write_bytes(c6dofimu5_t *ctx, uint8_t reg, uint8_t *wr_data, uint16_t n_bytes)
Generic write function.
c6dofimu5_s::sens_const_2
float sens_const_2
Definition: c6dofimu5.h:444
c6dofimu5_cfg_t
Click configuration structure definition.
Definition: c6dofimu5.h:453
c6dofimu5_process_data
void c6dofimu5_process_data(c6dofimu5_t *ctx, c6dofimu5_process_data_t *process_d)
Process data function.
c6dofimu5_process_data_t::pressure
float pressure
Definition: c6dofimu5.h:418
c6dofimu5_baro_soft_rst
void c6dofimu5_baro_soft_rst(c6dofimu5_t *ctx)
Soft Reset Command function.
c6dofimu5_process_data_t::t_raw
uint16_t t_raw
Definition: c6dofimu5.h:417
c6dofimu5_cfg_t::cs
pin_name_t cs
Definition: c6dofimu5.h:461
c6dofimu5_cfg_t::spi_speed
uint32_t spi_speed
Definition: c6dofimu5.h:472
c6dofimu5_baro_id_read
uint8_t c6dofimu5_baro_id_read(c6dofimu5_t *ctx)
Barometer ID Readout function.
c6dofimu5_read_accel_x
int16_t c6dofimu5_read_accel_x(c6dofimu5_t *ctx)
Read Accelerometer X-axis data function.
c6dofimu5_cfg_t::sda
pin_name_t sda
Definition: c6dofimu5.h:457
c6dofimu5_cfg_t::i2c_address
uint8_t i2c_address
Definition: c6dofimu5.h:470
c6dofimu5_process_data_t::p_raw
uint32_t p_raw
Definition: c6dofimu5.h:416
c6dofimu5_baro_settings
void c6dofimu5_baro_settings(c6dofimu5_t *ctx)
I2C Barometer Settings function.
c6dofimu5_cfg_setup
void c6dofimu5_cfg_setup(c6dofimu5_cfg_t *cfg)
Config Object Initialization function.
c6dofimu5_s::spi
spi_master_t spi
Definition: c6dofimu5.h:435
c6dofimu5_cfg_t::scl
pin_name_t scl
Definition: c6dofimu5.h:456
c6dofimu5_cfg_t::sck
pin_name_t sck
Definition: c6dofimu5.h:460
c6dofimu5_read_accel_y
int16_t c6dofimu5_read_accel_y(c6dofimu5_t *ctx)
Read Accelerometer Y-axis data function.
c6dofimu5_cfg_t::miso
pin_name_t miso
Definition: c6dofimu5.h:458
c6dofimu5_read_gyro_y
int16_t c6dofimu5_read_gyro_y(c6dofimu5_t *ctx)
Read Gyroscope Y-axis data function.
c6dofimu5_s::sens_const_0
float sens_const_0
Definition: c6dofimu5.h:442
c6dofimu5_read_accel_z
int16_t c6dofimu5_read_accel_z(c6dofimu5_t *ctx)
Read Accelerometer Z-axis data function.
c6dofimu5_read_gyroscope
void c6dofimu5_read_gyroscope(c6dofimu5_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
Read gyroscope data function.
c6dofimu5_s::slave_address
uint8_t slave_address
Definition: c6dofimu5.h:439
c6dofimu5_s::int_pin
digital_in_t int_pin
Definition: c6dofimu5.h:430
C6DOFIMU5_RETVAL
#define C6DOFIMU5_RETVAL
Definition: c6dofimu5.h:78
c6dofimu5_s::cs
digital_out_t cs
Definition: c6dofimu5.h:429
c6dofimu5_s::sens_const_3
float sens_const_3
Definition: c6dofimu5.h:445
c6dofimu5_acceleration_rate
void c6dofimu5_acceleration_rate(c6dofimu5_t *ctx, float *x_accel_rte, float *y_accel_rte, float *z_accel_rte)
Read acceleration Rate function.
c6dofimu5_t
struct c6dofimu5_s c6dofimu5_t
Click ctx object definition.
c6dofimu5_init
C6DOFIMU5_RETVAL c6dofimu5_init(c6dofimu5_t *ctx, c6dofimu5_cfg_t *cfg)
Initialization function.
c6dofimu5_cfg_t::int_pin
pin_name_t int_pin
Definition: c6dofimu5.h:465
c6dofimu5_check_int_pin
uint8_t c6dofimu5_check_int_pin(c6dofimu5_t *ctx)
Check Interrupt state function.