c6dofimu6  2.0.0.0
c6dofimu6.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 C6DOFIMU6_H
36 #define C6DOFIMU6_H
37 
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_i2c_master.h"
41 #include "drv_spi_master.h"
42 
43 // -------------------------------------------------------------- PUBLIC MACROS
54 #define C6DOFIMU6_MAP_MIKROBUS( cfg, mikrobus ) \
55  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
56  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
57  cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
58  cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
59  cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
60  cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
61  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
62 
68 #define C6DOFIMU6_MASTER_I2C 0
69 #define C6DOFIMU6_MASTER_SPI 1
70 
76 #define C6DOFIMU6_RETVAL uint8_t
77 
78 #define C6DOFIMU6_OK 0x00
79 #define C6DOFIMU6_INIT_ERROR 0xFF
80 
86 #define C6DOFIMU6_I2C_SLAVE_ADR_GND 0x68
87 #define C6DOFIMU6_I2C_SLAVE_ADR_VCC 0x69
88 
94 #define C6DOFIMU6_READ_BIT_MASK 0x80
95 #define C6DOFIMU6_WRITE_BIT_MASK 0x7F
96 
102 #define C6DOFIMU6_SELF_TEST_X_GYRO 0x00
103 #define C6DOFIMU6_SELF_TEST_Y_GYRO 0x01
104 #define C6DOFIMU6_SELF_TEST_Z_GYRO 0x02
105 #define C6DOFIMU6_SELF_TEST_X_ACCEL 0x0D
106 #define C6DOFIMU6_SELF_TEST_Y_ACCEL 0x0E
107 #define C6DOFIMU6_SELF_TEST_Z_ACCEL 0x0F
108 #define C6DOFIMU6_XG_OFFS_USR_H 0x13
109 #define C6DOFIMU6_XG_OFFS_USR_L 0x14
110 #define C6DOFIMU6_YG_OFFS_USR_H 0x15
111 #define C6DOFIMU6_YG_OFFS_USR_L 0x16
112 #define C6DOFIMU6_ZG_OFFS_USR_H 0x17
113 #define C6DOFIMU6_ZG_OFFS_USR_L 0x18
114 #define C6DOFIMU6_SMPL_RT_DIV 0x19
115 #define C6DOFIMU6_CFG 0x1A
116 #define C6DOFIMU6_GYRO_CFG 0x1B
117 #define C6DOFIMU6_ACCEL_CFG 0x1C
118 #define C6DOFIMU6_ACCEL_CFG_2 0x1D
119 #define C6DOFIMU6_LP_MODE_CTL 0x1E
120 #define C6DOFIMU6_ACCEL_WOM_X_THR 0x20
121 #define C6DOFIMU6_ACCEL_WOM_Y_THR 0x21
122 #define C6DOFIMU6_ACCEL_WOM_Z_THR 0x22
123 #define C6DOFIMU6_FIFO_EN 0x23
124 #define C6DOFIMU6_INT_PIN_CFG 0x37
125 #define C6DOFIMU6_INT_ENABLE 0x38
126 #define C6DOFIMU6_DMP_INT_STAT 0x39
127 #define C6DOFIMU6_INT_STAT 0x3A
128 #define C6DOFIMU6_ACCEL_XOUT_H 0x3B
129 #define C6DOFIMU6_ACCEL_XOUT_L 0x3C
130 #define C6DOFIMU6_ACCEL_YOUT_H 0x3D
131 #define C6DOFIMU6_ACCEL_YOUT_L 0x3E
132 #define C6DOFIMU6_ACCEL_ZOUT_H 0x3F
133 #define C6DOFIMU6_ACCEL_ZOUT_L 0x40
134 #define C6DOFIMU6_TEMP_OUT_H 0x41
135 #define C6DOFIMU6_TEMP_OUT_L 0x42
136 #define C6DOFIMU6_GYRO_XOUT_H 0x43
137 #define C6DOFIMU6_GYRO_XOUT_L 0x44
138 #define C6DOFIMU6_GYRO_YOUT_H 0x45
139 #define C6DOFIMU6_GYRO_YOUT_L 0x46
140 #define C6DOFIMU6_GYRO_ZOUT_H 0x47
141 #define C6DOFIMU6_GYRO_ZOUT_L 0x48
142 #define C6DOFIMU6_SIGNAL_PATH_RST 0x68
143 #define C6DOFIMU6_ACCEL_INTEL_CTL 0x69
144 #define C6DOFIMU6_USER_CTL 0x6A
145 #define C6DOFIMU6_PWR_MGMT_1 0x6B
146 #define C6DOFIMU6_PWR_MGMT_2 0x6C
147 #define C6DOFIMU6_FIFO_CNT_H 0x72
148 #define C6DOFIMU6_FIFO_CNT_L 0x73
149 #define C6DOFIMU6_FIFO_R_W 0x74
150 #define C6DOFIMU6_WHO_AM_I 0x75
151 #define C6DOFIMU6_XA_OFFS_H 0x77
152 #define C6DOFIMU6_XA_OFFS_L 0x78
153 #define C6DOFIMU6_YA_OFFS_H 0x7A
154 #define C6DOFIMU6_YA_OFFS_L 0x7B
155 #define C6DOFIMU6_ZA_OFFS_H 0x7D
156 #define C6DOFIMU6_ZA_OFFS_L 0x7E
157 
163 #define C6DOFIMU6_CFG_FIFO_MODE 0x40
164 #define C6DOFIMU6_CFG_EXT_SYNC_SET_1 0x08
165 #define C6DOFIMU6_CFG_EXT_SYNC_SET_2 0x10
166 #define C6DOFIMU6_CFG_EXT_SYNC_SET_3 0x18
167 #define C6DOFIMU6_CFG_EXT_SYNC_SET_4 0x20
168 #define C6DOFIMU6_CFG_EXT_SYNC_SET_5 0x28
169 #define C6DOFIMU6_CFG_EXT_SYNC_SET_6 0x30
170 #define C6DOFIMU6_CFG_EXT_SYNC_SET_7 0x38
171 #define C6DOFIMU6_CFG_DLPF_CFG_0 0x00
172 #define C6DOFIMU6_CFG_DLPF_CFG_1 0x01
173 #define C6DOFIMU6_CFG_DLPF_CFG_2 0x02
174 #define C6DOFIMU6_CFG_DLPF_CFG_3 0x03
175 #define C6DOFIMU6_CFG_DLPF_CFG_4 0x04
176 #define C6DOFIMU6_CFG_DLPF_CFG_5 0x05
177 #define C6DOFIMU6_CFG_DLPF_CFG_6 0x06
178 #define C6DOFIMU6_CFG_DLPF_CFG_7 0x07
179 
185 #define C6DOFIMU6_GYRO_CFG_XGYRO_STEN 0x80
186 #define C6DOFIMU6_GYRO_CFG_YGYRO_STEN 0x40
187 #define C6DOFIMU6_GYRO_CFG_ZGYRO_STEN 0x20
188 #define C6DOFIMU6_GYRO_CFG_FS_SEL_2000 0x18
189 #define C6DOFIMU6_GYRO_CFG_FS_SEL_1000 0x10
190 #define C6DOFIMU6_GYRO_CFG_FS_SEL_500 0x08
191 #define C6DOFIMU6_GYRO_CFG_FS_SEL_250 0x00
192 #define C6DOFIMU6_GYRO_CFG_FCHOICE_B_2 0x02
193 #define C6DOFIMU6_GYRO_CFG_FCHOICE_B_1 0x01
194 #define C6DOFIMU6_GYRO_CFG_FCHOICE_B_0 0x00
195 
201 #define C6DOFIMU6_ACCEL_CFG_AX_ST_EN 0x80
202 #define C6DOFIMU6_ACCEL_CFG_AY_ST_EN 0x40
203 #define C6DOFIMU6_ACCEL_CFG_AZ_ST_EN 0x20
204 #define C6DOFIMU6_ACCEL_CFG_FS_SEL_16G 0x18
205 #define C6DOFIMU6_ACCEL_CFG_FS_SEL_8G 0x10
206 #define C6DOFIMU6_ACCEL_CFG_FS_SEL_4G 0x08
207 #define C6DOFIMU6_ACCEL_CFG_FS_SEL_2G 0x00
208 
214 #define C6DOFIMU6_ACCEL2_CFG_FIFO_SIZE_4KB 0x40
215 #define C6DOFIMU6_ACCEL2_CFG_FIFO_SIZE_2KB 0x08
216 #define C6DOFIMU6_ACCEL2_CFG_FIFO_SIZE_1KB 0x10
217 #define C6DOFIMU6_ACCEL2_CFG_FIFO_SIZE_512B 0x18
218 #define C6DOFIMU6_ACCEL2_CFG_DEC2_CFG_32 0x30
219 #define C6DOFIMU6_ACCEL2_CFG_DEC2_CFG_16 0x20
220 #define C6DOFIMU6_ACCEL2_CFG_DEC2_CFG_8 0x10
221 #define C6DOFIMU6_ACCEL2_CFG_DEC2_CFG_4 0x00
222 #define C6DOFIMU6_ACCEL2_CFG_FCHOICE_B 0x00
223 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_0 0x00
224 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_1 0x01
225 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_2 0x02
226 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_3 0x03
227 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_4 0x04
228 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_5 0x05
229 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_6 0x06
230 #define C6DOFIMU6_ACCEL2_CFG_A_DLPF_CFG_7 0x07
231 
237 #define C6DOFIMU6_FIFO_EN_TEMP_OUT 0x80
238 #define C6DOFIMU6_FIFO_EN_GYRO_XOUT 0x40
239 #define C6DOFIMU6_FIFO_EN_GYRO_YOUT 0x20
240 #define C6DOFIMU6_FIFO_EN_GYRO_ZOUT 0x10
241 #define C6DOFIMU6_FIFO_EN_ACCEL_XYZ_OUT 0x08
242 
248 #define C6DOFIMU6_INT_PIN_CFG_ACTL 0x80
249 #define C6DOFIMU6_INT_PIN_CFG_OPEN 0x40
250 #define C6DOFIMU6_INT_PIN_CFG_LATCH_INT_EN 0x20
251 #define C6DOFIMU6_INT_PIN_CFG_INT_ANYRD_2CLR 0x10
252 #define C6DOFIMU6_INT_PIN_CFG_ACTL_FSYNC 0x08
253 #define C6DOFIMU6_INT_PIN_CFG_FSYNC_INT_MODE_EN 0x04
254 #define C6DOFIMU6_INT_PIN_CFG_BYPASS_EN 0x02
255 
261 #define C6DOFIMU6_INT_ENABLE_WOM_X_INT_EN 0x80
262 #define C6DOFIMU6_INT_ENABLE_WOM_Y_INT_EN 0x40
263 #define C6DOFIMU6_INT_ENABLE_WOM_Z_INT_EN 0x20
264 #define C6DOFIMU6_INT_ENABLE_FIFO_OVF_EN 0x10
265 #define C6DOFIMU6_INT_ENABLE_GDRIVE_RDY_EN 0x04
266 #define C6DOFIMU6_INT_ENABLE_DMP_INT_EN 0x02
267 #define C6DOFIMU6_INT_ENABLE_RAW_RDY_EN 0x01
268 
274 #define C6DOFIMU6_INT_STAT_WOM_X_INT 0x80
275 #define C6DOFIMU6_INT_STAT_WOM_Y_INT 0x40
276 #define C6DOFIMU6_INT_STAT_WOM_Z_INT 0x20
277 #define C6DOFIMU6_INT_STAT_FIFO_OVF_INT 0x10
278 #define C6DOFIMU6_INT_STAT_GDRIVE_RDY_INT 0x04
279 #define C6DOFIMU6_INT_STAT_DMP_INT 0x02
280 #define C6DOFIMU6_INT_STAT_RAW_RDY_INT 0x01
281 
287 #define C6DOFIMU6_SIGNAL_PATH_RST_GYRO_RST 0x80
288 #define C6DOFIMU6_SIGNAL_PATH_RST_ACCEL_RST 0x40
289 #define C6DOFIMU6_SIGNAL_PATH_RST_TEMP_RST 0x20
290 
296 #define C6DOFIMU6_ACCEL_INTEL_CTL_INTEL_EN 0x80
297 #define C6DOFIMU6_ACCEL_INTEL_CTL_INTEL_MODE_PREV_SAMP 0x40
298 #define C6DOFIMU6_ACCEL_INTEL_CTL_INTEL_MODE_FIRST_SAMP 0x00
299 
305 #define C6DOFIMU6_USER_CTL_DMP_EN 0x80
306 #define C6DOFIMU6_USER_CTL_FIFO_EN 0x40
307 #define C6DOFIMU6_USER_CTL_I2C_IF_DIS 0x10
308 #define C6DOFIMU6_USER_CTL_DMP_RST 0x08
309 #define C6DOFIMU6_USER_CTL_FIFO_RST 0x04
310 #define C6DOFIMU6_USER_CTL_SIG_COND_RST 0x01
311 
317 #define C6DOFIMU6_PWR_MGMT_1_DEV_RST 0x80
318 #define C6DOFIMU6_PWR_MGMT_1_SLEEP 0x40
319 #define C6DOFIMU6_PWR_MGMT_1_ACCEL_CYC 0x20
320 #define C6DOFIMU6_PWR_MGMT_1_GYRO_STDBY 0x10
321 #define C6DOFIMU6_PWR_MGMT_1_TEMP_DIS 0x08
322 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_7 0x07
323 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_6 0x06
324 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_5 0x05
325 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_4 0x04
326 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_3 0x03
327 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_2 0x02
328 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_1 0x01
329 #define C6DOFIMU6_PWR_MGMT_1_CLKSEL_0 0x00
330 
336 #define C6DOFIMU6_PWR_MGMT_2_LP_DIS 0x80
337 #define C6DOFIMU6_PWR_MGMT_2_DMP_LP_DIS 0x40
338 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_XA 0x20
339 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_YA 0x10
340 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_ZA 0x08
341 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_XG 0x04
342 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_YG 0x02
343 #define C6DOFIMU6_PWR_MGMT_2_DISABLE_ZG 0x01
344 
350 #define C6DOFIMU6_WHO_AM_I_VAL 0x98
351 
357 #define C6DOFIMU6_POWER_ON 0x01
358 #define C6DOFIMU6_POWER_OFF 0x00
359 
365 #define C6DOFIMU6_GYRO_SENS_FS_SEL_2000 16.4
366 #define C6DOFIMU6_GYRO_SENS_FS_SEL_1000 32.8
367 #define C6DOFIMU6_GYRO_SENS_FS_SEL_500 65.5
368 #define C6DOFIMU6_GYRO_SENS_FS_SEL_250 131.0
369 #define C6DOFIMU6_ACCEL_SENS_FS_SEL_16G 2048.0
370 #define C6DOFIMU6_ACCEL_SENS_FS_SEL_8G 4096.0
371 #define C6DOFIMU6_ACCEL_SENS_FS_SEL_4G 8192.0
372 #define C6DOFIMU6_ACCEL_SENS_FS_SEL_2G 16384.0
373  // End group macro
376 // --------------------------------------------------------------- PUBLIC TYPES
385 typedef uint8_t c6dofimu6_select_t;
386 
390 typedef void ( *c6dofimu6_master_io_t )( struct c6dofimu6_s*, uint8_t, uint8_t*, uint16_t );
391 
395 typedef struct c6dofimu6_s
396 {
397  // Output pins
398 
399  digital_out_t cs;
400 
401  // Input pins
402 
403  digital_in_t int_pin;
404 
405  // Modules
406 
407  i2c_master_t i2c;
408  spi_master_t spi;
409 
410  // ctx variable
411 
412  uint8_t slave_address;
413  pin_name_t chip_select;
417 
419 
423 typedef struct
424 {
425  // Communication gpio pins
426 
427  pin_name_t scl;
428  pin_name_t sda;
429  pin_name_t miso;
430  pin_name_t mosi;
431  pin_name_t sck;
432  pin_name_t cs;
433 
434  // Additional gpio pins
435 
436  pin_name_t int_pin;
437 
438  // static variable
439 
440  uint32_t i2c_speed;
441  uint8_t i2c_address;
442 
443  uint32_t spi_speed;
444  spi_master_mode_t spi_mode;
445  spi_master_chip_select_polarity_t cs_polarity;
446 
448 
450  // End types group
452 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
458 #ifdef __cplusplus
459 extern "C"{
460 #endif
461 
471 
481 
490 
501 void c6dofimu6_generic_write ( c6dofimu6_t *ctx, uint8_t reg, uint8_t *data_buf, uint16_t len );
502 
513 void c6dofimu6_generic_read ( c6dofimu6_t *ctx, uint8_t reg, uint8_t *data_buf, uint16_t len );
514 
524 void c6dofimu6_power ( c6dofimu6_t *ctx, uint8_t on_off );
525 
536 
547 
558 
569 void c6dofimu6_read_gyroscope ( c6dofimu6_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z );
570 
581 void c6dofimu6_angular_rate ( c6dofimu6_t *ctx, float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
582 
593 
604 
615 
626 void c6dofimu6_read_accelerometer ( c6dofimu6_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z );
627 
638 void c6dofimu6_acceleration_rate ( c6dofimu6_t *ctx, float *x_accel_rte, float *y_accel_rte, float *z_accel_rte );
639 
650 
661 
662 #ifdef __cplusplus
663 }
664 #endif
665 #endif // _C6DOFIMU6_H_
666  // End public_function group
669 
670 // ------------------------------------------------------------------------- END
c6dofimu6_check_int_pin
uint8_t c6dofimu6_check_int_pin(c6dofimu6_t *ctx)
Check Interrupt state function.
c6dofimu6_cfg_t::sck
pin_name_t sck
Definition: c6dofimu6.h:431
c6dofimu6_s::cs
digital_out_t cs
Definition: c6dofimu6.h:399
c6dofimu6_select_t
uint8_t c6dofimu6_select_t
Communication type.
Definition: c6dofimu6.h:385
c6dofimu6_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: c6dofimu6.h:440
c6dofimu6_cfg_t::cs
pin_name_t cs
Definition: c6dofimu6.h:432
c6dofimu6_cfg_t::sda
pin_name_t sda
Definition: c6dofimu6.h:428
c6dofimu6_cfg_t::mosi
pin_name_t mosi
Definition: c6dofimu6.h:430
C6DOFIMU6_RETVAL
#define C6DOFIMU6_RETVAL
Definition: c6dofimu6.h:76
c6dofimu6_read_accel_z
int16_t c6dofimu6_read_accel_z(c6dofimu6_t *ctx)
Read Accelerometer Z-axis data function.
c6dofimu6_generic_write
void c6dofimu6_generic_write(c6dofimu6_t *ctx, uint8_t reg, uint8_t *data_buf, uint16_t len)
Generic write function.
c6dofimu6_default_cfg
void c6dofimu6_default_cfg(c6dofimu6_t *ctx)
Click Default Configuration function.
c6dofimu6_cfg_t::cs_polarity
spi_master_chip_select_polarity_t cs_polarity
Definition: c6dofimu6.h:445
c6dofimu6_read_gyroscope
void c6dofimu6_read_gyroscope(c6dofimu6_t *ctx, int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
Read gyroscope data function.
c6dofimu6_cfg_t::sel
c6dofimu6_select_t sel
Definition: c6dofimu6.h:447
c6dofimu6_s::int_pin
digital_in_t int_pin
Definition: c6dofimu6.h:403
c6dofimu6_cfg_t::spi_speed
uint32_t spi_speed
Definition: c6dofimu6.h:443
c6dofimu6_acceleration_rate
void c6dofimu6_acceleration_rate(c6dofimu6_t *ctx, float *x_accel_rte, float *y_accel_rte, float *z_accel_rte)
Read acceleration Rate function.
c6dofimu6_read_accelerometer
void c6dofimu6_read_accelerometer(c6dofimu6_t *ctx, int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
Read accelerometer data function.
c6dofimu6_read_gyro_x
int16_t c6dofimu6_read_gyro_x(c6dofimu6_t *ctx)
Read Gyroscope X-axis data function.
c6dofimu6_t
struct c6dofimu6_s c6dofimu6_t
Click ctx object definition.
c6dofimu6_cfg_t::miso
pin_name_t miso
Definition: c6dofimu6.h:429
c6dofimu6_read_accel_x
int16_t c6dofimu6_read_accel_x(c6dofimu6_t *ctx)
Read Accelerometer X-axis data function.
c6dofimu6_cfg_t::int_pin
pin_name_t int_pin
Definition: c6dofimu6.h:436
c6dofimu6_cfg_t::i2c_address
uint8_t i2c_address
Definition: c6dofimu6.h:441
c6dofimu6_cfg_setup
void c6dofimu6_cfg_setup(c6dofimu6_cfg_t *cfg)
Config Object Initialization function.
c6dofimu6_s::chip_select
pin_name_t chip_select
Definition: c6dofimu6.h:413
c6dofimu6_s::read_f
c6dofimu6_master_io_t read_f
Definition: c6dofimu6.h:415
c6dofimu6_cfg_t::spi_mode
spi_master_mode_t spi_mode
Definition: c6dofimu6.h:444
c6dofimu6_read_gyro_y
int16_t c6dofimu6_read_gyro_y(c6dofimu6_t *ctx)
Read Gyroscope Y-axis data function.
c6dofimu6_s::master_sel
c6dofimu6_select_t master_sel
Definition: c6dofimu6.h:416
c6dofimu6_cfg_t
Click configuration structure definition.
Definition: c6dofimu6.h:424
c6dofimu6_read_temp_out
float c6dofimu6_read_temp_out(c6dofimu6_t *ctx)
Read temperture function.
c6dofimu6_s::i2c
i2c_master_t i2c
Definition: c6dofimu6.h:407
c6dofimu6_read_gyro_z
int16_t c6dofimu6_read_gyro_z(c6dofimu6_t *ctx)
Read Gyroscope Z-axis data function.
c6dofimu6_generic_read
void c6dofimu6_generic_read(c6dofimu6_t *ctx, uint8_t reg, uint8_t *data_buf, uint16_t len)
Generic read function.
c6dofimu6_angular_rate
void c6dofimu6_angular_rate(c6dofimu6_t *ctx, float *x_ang_rte, float *y_ang_rte, float *z_ang_rte)
Read Angular Rate function.
c6dofimu6_s
Click ctx object definition.
Definition: c6dofimu6.h:396
c6dofimu6_power
void c6dofimu6_power(c6dofimu6_t *ctx, uint8_t on_off)
Power up function.
c6dofimu6_s::write_f
c6dofimu6_master_io_t write_f
Definition: c6dofimu6.h:414
c6dofimu6_cfg_t::scl
pin_name_t scl
Definition: c6dofimu6.h:427
c6dofimu6_init
C6DOFIMU6_RETVAL c6dofimu6_init(c6dofimu6_t *ctx, c6dofimu6_cfg_t *cfg)
Initialization function.
c6dofimu6_read_accel_y
int16_t c6dofimu6_read_accel_y(c6dofimu6_t *ctx)
Read Accelerometer Y-axis data function.
c6dofimu6_s::spi
spi_master_t spi
Definition: c6dofimu6.h:408
c6dofimu6_s::slave_address
uint8_t slave_address
Definition: c6dofimu6.h:412
c6dofimu6_master_io_t
void(* c6dofimu6_master_io_t)(struct c6dofimu6_s *, uint8_t, uint8_t *, uint16_t)
Master Input/Output type.
Definition: c6dofimu6.h:390