c6dofimu25 2.1.0.0
Loading...
Searching...
No Matches
c6dofimu25.h
Go to the documentation of this file.
1/****************************************************************************
2** Copyright (C) 2020 MikroElektronika d.o.o.
3** Contact: https://www.mikroe.com/contact
4**
5** Permission is hereby granted, free of charge, to any person obtaining a copy
6** of this software and associated documentation files (the "Software"), to deal
7** in the Software without restriction, including without limitation the rights
8** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9** copies of the Software, and to permit persons to whom the Software is
10** furnished to do so, subject to the following conditions:
11** The above copyright notice and this permission notice shall be
12** included in all copies or substantial portions of the Software.
13**
14** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
19** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20** USE OR OTHER DEALINGS IN THE SOFTWARE.
21****************************************************************************/
22
28#ifndef C6DOFIMU25_H
29#define C6DOFIMU25_H
30
31#ifdef __cplusplus
32extern "C"{
33#endif
34
39#ifdef PREINIT_SUPPORTED
40#include "preinit.h"
41#endif
42
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
45 #include "delays.h"
46 #endif
47#endif
48
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
52#include "drv_spi_master.h"
53#include "spi_specifics.h"
54
75#define C6DOFIMU25_REG_FUNC_CFG_ACCESS 0x01
76#define C6DOFIMU25_REG_PIN_CTRL 0x02
77#define C6DOFIMU25_REG_IF_CFG 0x03
78#define C6DOFIMU25_REG_FIFO_CTRL1 0x07
79#define C6DOFIMU25_REG_FIFO_CTRL2 0x08
80#define C6DOFIMU25_REG_FIFO_CTRL3 0x09
81#define C6DOFIMU25_REG_FIFO_CTRL4 0x0A
82#define C6DOFIMU25_REG_COUNTER_BDR_1 0x0B
83#define C6DOFIMU25_REG_COUNTER_BDR_2 0x0C
84#define C6DOFIMU25_REG_INT1_CTRL 0x0D
85#define C6DOFIMU25_REG_INT2_CTRL 0x0E
86#define C6DOFIMU25_REG_WHO_AM_I 0x0F
87#define C6DOFIMU25_REG_CTRL1 0x10
88#define C6DOFIMU25_REG_CTRL2 0x11
89#define C6DOFIMU25_REG_CTRL3 0x12
90#define C6DOFIMU25_REG_CTRL4 0x13
91#define C6DOFIMU25_REG_CTRL5 0x14
92#define C6DOFIMU25_REG_CTRL6 0x15
93#define C6DOFIMU25_REG_CTRL7 0x16
94#define C6DOFIMU25_REG_CTRL8 0x17
95#define C6DOFIMU25_REG_CTRL9 0x18
96#define C6DOFIMU25_REG_CTRL10 0x19
97#define C6DOFIMU25_REG_CTRL_STATUS 0x1A
98#define C6DOFIMU25_REG_FIFO_STATUS1 0x1B
99#define C6DOFIMU25_REG_FIFO_STATUS2 0x1C
100#define C6DOFIMU25_REG_ALL_INT_SRC 0x1D
101#define C6DOFIMU25_REG_STATUS 0x1E
102#define C6DOFIMU25_REG_OUT_TEMP_L 0x20
103#define C6DOFIMU25_REG_OUT_TEMP_H 0x21
104#define C6DOFIMU25_REG_OUTX_L_G 0x22
105#define C6DOFIMU25_REG_OUTX_H_G 0x23
106#define C6DOFIMU25_REG_OUTY_L_G 0x24
107#define C6DOFIMU25_REG_OUTY_H_G 0x25
108#define C6DOFIMU25_REG_OUTZ_L_G 0x26
109#define C6DOFIMU25_REG_OUTZ_H_G 0x27
110#define C6DOFIMU25_REG_OUTZ_L_A 0x28
111#define C6DOFIMU25_REG_OUTZ_H_A 0x29
112#define C6DOFIMU25_REG_OUTY_L_A 0x2A
113#define C6DOFIMU25_REG_OUTY_H_A 0x2B
114#define C6DOFIMU25_REG_OUTX_L_A 0x2C
115#define C6DOFIMU25_REG_OUTX_H_A 0x2D
116#define C6DOFIMU25_REG_UI_OUTZ_L_A_DUALC 0x34
117#define C6DOFIMU25_REG_UI_OUTZ_H_A_DUALC 0x35
118#define C6DOFIMU25_REG_UI_OUTY_L_A_DUALC 0x36
119#define C6DOFIMU25_REG_UI_OUTY_H_A_DUALC 0x37
120#define C6DOFIMU25_REG_UI_OUTX_L_A_DUALC 0x38
121#define C6DOFIMU25_REG_UI_OUTX_H_A_DUALC 0x39
122#define C6DOFIMU25_REG_AH_BIO_OUT_L 0x3A
123#define C6DOFIMU25_REG_AH_BIO_OUT_H 0x3B
124#define C6DOFIMU25_REG_TIMESTAMP0 0x40
125#define C6DOFIMU25_REG_TIMESTAMP1 0x41
126#define C6DOFIMU25_REG_TIMESTAMP2 0x42
127#define C6DOFIMU25_REG_TIMESTAMP3 0x43
128#define C6DOFIMU25_REG_WAKE_UP_SRC 0x45
129#define C6DOFIMU25_REG_TAP_SRC 0x46
130#define C6DOFIMU25_REG_D6D_SRC 0x47
131#define C6DOFIMU25_REG_EMB_FUNC_STATUS_MAINPAGE 0x49
132#define C6DOFIMU25_REG_FSM_STATUS_MAINPAGE 0x4A
133#define C6DOFIMU25_REG_MLC_STATUS_MAINPAGE 0x4B
134#define C6DOFIMU25_REG_INTERNAL_FREQ_FINE 0x4F
135#define C6DOFIMU25_REG_FUNCTIONS_ENABLE 0x50
136#define C6DOFIMU25_REG_INACTIVITY_DUR 0x54
137#define C6DOFIMU25_REG_INACTIVITY_THS 0x55
138#define C6DOFIMU25_REG_TAP_CFG0 0x56
139#define C6DOFIMU25_REG_TAP_CFG1 0x57
140#define C6DOFIMU25_REG_TAP_CFG2 0x58
141#define C6DOFIMU25_REG_TAP_THS_6D 0x59
142#define C6DOFIMU25_REG_TAP_DUR 0x5A
143#define C6DOFIMU25_REG_WAKE_UP_THS 0x5B
144#define C6DOFIMU25_REG_WAKE_UP_DUR 0x5C
145#define C6DOFIMU25_REG_FREE_FALL 0x5D
146#define C6DOFIMU25_REG_MD1_CFG 0x5E
147#define C6DOFIMU25_REG_MD2_CFG 0x5F
148#define C6DOFIMU25_REG_EMB_FUNC_CFG 0x63
149#define C6DOFIMU25_REG_X_OFS_USR 0x73
150#define C6DOFIMU25_REG_Y_OFS_USR 0x74
151#define C6DOFIMU25_REG_Z_OFS_USR 0x75
152#define C6DOFIMU25_REG_FIFO_DATA_OUT_TAG 0x78
153#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_0 0x79
154#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_1 0x7A
155#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_2 0x7B
156#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_3 0x7C
157#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_4 0x7D
158#define C6DOFIMU25_REG_FIFO_DATA_OUT_BYTE_5 0x7E
159
164#define C6DOFIMU25_REG_EMBF_PAGE_SEL 0x02
165#define C6DOFIMU25_REG_EMBF_EMB_FUNC_EN_A 0x04
166#define C6DOFIMU25_REG_EMBF_EMB_FUNC_EN_B 0x05
167#define C6DOFIMU25_REG_EMBF_EMB_FUNC_EXEC_STATUS 0x07
168#define C6DOFIMU25_REG_EMBF_PAGE_ADDRESS 0x08
169#define C6DOFIMU25_REG_EMBF_PAGE_VALUE 0x09
170#define C6DOFIMU25_REG_EMBF_EMB_FUNC_INT1 0x0A
171#define C6DOFIMU25_REG_EMBF_FSM_INT1 0x0B
172#define C6DOFIMU25_REG_EMBF_MLC_INT1 0x0D
173#define C6DOFIMU25_REG_EMBF_EMB_FUNC_INT2 0x0E
174#define C6DOFIMU25_REG_EMBF_FSM_INT2 0x0F
175#define C6DOFIMU25_REG_EMBF_MLC_INT2 0x11
176#define C6DOFIMU25_REG_EMBF_EMB_FUNC_STATUS 0x12
177#define C6DOFIMU25_REG_EMBF_FSM_STATUS 0x13
178#define C6DOFIMU25_REG_EMBF_MLC_STATUS 0x15
179#define C6DOFIMU25_REG_EMBF_PAGE_RW 0x17
180#define C6DOFIMU25_REG_EMBF_EMB_FUNC_FIFO_EN_A 0x44
181#define C6DOFIMU25_REG_EMBF_EMB_FUNC_FIFO_EN_B 0x45
182#define C6DOFIMU25_REG_EMBF_FSM_ENABLE 0x46
183#define C6DOFIMU25_REG_EMBF_FSM_LONG_COUNTER_L 0x48
184#define C6DOFIMU25_REG_EMBF_FSM_LONG_COUNTER_H 0x49
185#define C6DOFIMU25_REG_EMBF_INT_ACK_MASK 0x4B
186#define C6DOFIMU25_REG_EMBF_FSM_OUTS1 0x4C
187#define C6DOFIMU25_REG_EMBF_FSM_OUTS2 0x4D
188#define C6DOFIMU25_REG_EMBF_FSM_OUTS3 0x4E
189#define C6DOFIMU25_REG_EMBF_FSM_OUTS4 0x4F
190#define C6DOFIMU25_REG_EMBF_FSM_OUTS5 0x50
191#define C6DOFIMU25_REG_EMBF_FSM_OUTS6 0x51
192#define C6DOFIMU25_REG_EMBF_FSM_OUTS7 0x52
193#define C6DOFIMU25_REG_EMBF_FSM_OUTS8 0x53
194#define C6DOFIMU25_REG_EMBF_SFLP_ODR 0x5E
195#define C6DOFIMU25_REG_EMBF_FSM_ODR 0x5F
196#define C6DOFIMU25_REG_EMBF_MLC_ODR 0x60
197#define C6DOFIMU25_REG_EMBF_STEP_COUNTER_L 0x62
198#define C6DOFIMU25_REG_EMBF_STEP_COUNTER_H 0x63
199#define C6DOFIMU25_REG_EMBF_EMB_FUNC_SRC 0x64
200#define C6DOFIMU25_REG_EMBF_EMB_FUNC_INIT_A 0x66
201#define C6DOFIMU25_REG_EMBF_EMB_FUNC_INIT_B 0x67
202#define C6DOFIMU25_REG_EMBF_MLC1_SRC 0x70
203#define C6DOFIMU25_REG_EMBF_MLC2_SRC 0x71
204#define C6DOFIMU25_REG_EMBF_MLC3_SRC 0x72
205#define C6DOFIMU25_REG_EMBF_MLC4_SRC 0x73
206
211#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASX_L 0x6E
212#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASX_H 0x6F
213#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASY_L 0x70
214#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASY_H 0x71
215#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASZ_L 0x72
216#define C6DOFIMU25_REG_EMBAF0_SFLP_GAME_GBIASZ_H 0x73
217#define C6DOFIMU25_REG_EMBAF0_FSM_BIO_SENSITIVITY_L 0xBA
218#define C6DOFIMU25_REG_EMBAF0_FSM_BIO_SENSITIVITY_H 0xBB
219#define C6DOFIMU25_REG_EMBAF1_FSM_LC_TIMEOUT_L 0x7A
220#define C6DOFIMU25_REG_EMBAF1_FSM_LC_TIMEOUT_H 0x7B
221#define C6DOFIMU25_REG_EMBAF1_FSM_PROGRAMS 0x7C
222#define C6DOFIMU25_REG_EMBAF1_FSM_START_ADD_L 0x7E
223#define C6DOFIMU25_REG_EMBAF1_FSM_START_ADD_H 0x7F
224#define C6DOFIMU25_REG_EMBAF1_PEDO_CMD 0x83
225#define C6DOFIMU25_REG_EMBAF1_PEDO_DEB_STEPS_CONF 0x84
226#define C6DOFIMU25_REG_EMBAF1_PEDO_SC_DELTAT_L 0xD0
227#define C6DOFIMU25_REG_EMBAF1_PEDO_SC_DELTAT_H 0xD1
228#define C6DOFIMU25_REG_EMBAF1_MLC_BIO_SENSITIVITY_L 0xE8
229#define C6DOFIMU25_REG_EMBAF1_MLC_BIO_SENSITIVITY_H 0xE9
230
231 // c6dofimu25_reg
232
247#define C6DOFIMU25_FUNC_CFG_ACCESS_EMBF_MASK 0x80
248#define C6DOFIMU25_FUNC_CFG_ACCESS_FSM_WR_CTRL_EN 0x08
249#define C6DOFIMU25_FUNC_CFG_ACCESS_SW_POR 0x04
250
255#define C6DOFIMU25_INT1_CTRL_CNT_BDR 0x40
256#define C6DOFIMU25_INT1_CTRL_FIFO_FULL 0x20
257#define C6DOFIMU25_INT1_CTRL_FIFO_OVR 0x10
258#define C6DOFIMU25_INT1_CTRL_FIFO_TH 0x08
259#define C6DOFIMU25_INT1_CTRL_DRDY_G 0x02
260#define C6DOFIMU25_INT1_CTRL_DRDY_XL 0x01
261
266#define C6DOFIMU25_WHO_AM_I 0x71
267
272#define C6DOFIMU25_CTRL1_OP_MODE_XL_MASK 0x70
273#define C6DOFIMU25_CTRL1_ODR_XL_MASK 0x0F
274
279#define C6DOFIMU25_CTRL2_OP_MODE_G_MASK 0x70
280#define C6DOFIMU25_CTRL2_ODR_G_MASK 0x0F
281
286#define C6DOFIMU25_CTRL3_BOOT 0x80
287#define C6DOFIMU25_CTRL3_BDU 0x40
288#define C6DOFIMU25_CTRL3_IF_INC 0x04
289#define C6DOFIMU25_CTRL3_SW_RESET 0x01
290
295#define C6DOFIMU25_CTRL6_LPF1_G_BW_MASK 0x70
296#define C6DOFIMU25_CTRL6_FS_G_125DPS 0x00
297#define C6DOFIMU25_CTRL6_FS_G_250DPS 0x01
298#define C6DOFIMU25_CTRL6_FS_G_500DPS 0x02
299#define C6DOFIMU25_CTRL6_FS_G_1000DPS 0x03
300#define C6DOFIMU25_CTRL6_FS_G_2000DPS 0x04
301#define C6DOFIMU25_CTRL6_FS_G_4000DPS 0x0C
302#define C6DOFIMU25_CTRL6_FS_G_MASK 0x0F
303
308#define C6DOFIMU25_CTRL8_HP_LPF2_XL_BW_MASK 0xE0
309#define C6DOFIMU25_CTRL8_AH_BIO_HPF_MASK 0x10
310#define C6DOFIMU25_CTRL8_HL_DUALC_EN_MASK 0x08
311#define C6DOFIMU25_CTRL8_FS_XL_MASK 0x03
312
317#define C6DOFIMU25_STATUS_TIMESTAMP_ENDCOUNT 0x80
318#define C6DOFIMU25_STATUS_AH_BIODA 0x08
319#define C6DOFIMU25_STATUS_TDA 0x04
320#define C6DOFIMU25_STATUS_GDA 0x02
321#define C6DOFIMU25_STATUS_XLDA 0x01
322
327#define C6DOFIMU25_MEM_BANK_USER 0
328#define C6DOFIMU25_MEM_BANK_EMBEDDED_FUNC 1
329
334#define C6DOFIMU25_ACCEL_ODR_OFF 0
335#define C6DOFIMU25_ACCEL_ODR_1_875_HZ 1
336#define C6DOFIMU25_ACCEL_ODR_7_5_HZ 2
337#define C6DOFIMU25_ACCEL_ODR_15_HZ 3
338#define C6DOFIMU25_ACCEL_ODR_30_HZ 4
339#define C6DOFIMU25_ACCEL_ODR_60_HZ 5
340#define C6DOFIMU25_ACCEL_ODR_120_HZ 6
341#define C6DOFIMU25_ACCEL_ODR_240_HZ 7
342#define C6DOFIMU25_ACCEL_ODR_480_HZ 8
343#define C6DOFIMU25_ACCEL_ODR_960_HZ 9
344#define C6DOFIMU25_ACCEL_ODR_1920_HZ 10
345#define C6DOFIMU25_ACCEL_ODR_3840_HZ 11
346#define C6DOFIMU25_ACCEL_ODR_7680_HZ 12
347
352#define C6DOFIMU25_ACCEL_FS_2G 0
353#define C6DOFIMU25_ACCEL_FS_4G 1
354#define C6DOFIMU25_ACCEL_FS_8G 2
355#define C6DOFIMU25_ACCEL_FS_16G 3
356
361#define C6DOFIMU25_GYRO_ODR_OFF 0
362#define C6DOFIMU25_GYRO_ODR_7_5_HZ 2
363#define C6DOFIMU25_GYRO_ODR_15_HZ 3
364#define C6DOFIMU25_GYRO_ODR_30_HZ 4
365#define C6DOFIMU25_GYRO_ODR_60_HZ 5
366#define C6DOFIMU25_GYRO_ODR_120_HZ 6
367#define C6DOFIMU25_GYRO_ODR_240_HZ 7
368#define C6DOFIMU25_GYRO_ODR_480_HZ 8
369#define C6DOFIMU25_GYRO_ODR_960_HZ 9
370#define C6DOFIMU25_GYRO_ODR_1920_HZ 10
371#define C6DOFIMU25_GYRO_ODR_3840_HZ 11
372#define C6DOFIMU25_GYRO_ODR_7680_HZ 12
373
378#define C6DOFIMU25_GYRO_FS_125DPS 0
379#define C6DOFIMU25_GYRO_FS_250DPS 1
380#define C6DOFIMU25_GYRO_FS_500DPS 2
381#define C6DOFIMU25_GYRO_FS_1000DPS 3
382#define C6DOFIMU25_GYRO_FS_2000DPS 4
383#define C6DOFIMU25_GYRO_FS_4000DPS 5
384
389#define C6DOFIMU25_ACCEL_SENS_G_PER_LSB 0.000061
390#define C6DOFIMU25_GYRO_SENS_DPS_PER_LSB 0.004375
391#define C6DOFIMU25_TEMP_SENS_LSB_PER_C 256.0
392#define C6DOFIMU25_TEMP_OFFSET 25.0
393
399#define C6DOFIMU25_DEVICE_ADDRESS_0 0x6A
400#define C6DOFIMU25_DEVICE_ADDRESS_1 0x6B
401
410#define C6DOFIMU25_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
411#define C6DOFIMU25_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
412
413 // c6dofimu25_set
414
429#define C6DOFIMU25_MAP_MIKROBUS( cfg, mikrobus ) \
430 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
431 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
432 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
433 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
434 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
435 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
436 cfg.int2 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
437 cfg.int1 = MIKROBUS( mikrobus, MIKROBUS_INT )
438
439 // c6dofimu25_map
440 // c6dofimu25
441
452
457struct c6dofimu25_s;
458typedef err_t ( *c6dofimu25_master_io_t )( struct c6dofimu25_s*, uint8_t, uint8_t*, uint8_t );
483
488typedef struct
489{
490 pin_name_t scl;
491 pin_name_t sda;
492 pin_name_t miso;
493 pin_name_t mosi;
494 pin_name_t sck;
495 pin_name_t cs;
496 pin_name_t int2;
497 pin_name_t int1;
499 uint32_t i2c_speed;
500 uint8_t i2c_address;
502 uint32_t spi_speed;
503 spi_master_mode_t spi_mode;
504 spi_master_chip_select_polarity_t cs_polarity;
509
514typedef struct
515{
516 float x;
517 float y;
518 float z;
521
533
544
561
577
592
606
619err_t c6dofimu25_write_reg ( c6dofimu25_t *ctx, uint8_t reg, uint8_t data_in );
620
635err_t c6dofimu25_write_regs ( c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
636
649err_t c6dofimu25_read_reg ( c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_out );
650
665err_t c6dofimu25_read_regs ( c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
666
676
686
698
712err_t c6dofimu25_set_mem_bank ( c6dofimu25_t *ctx, uint8_t mem_bank );
713
725
749err_t c6dofimu25_set_accel_odr ( c6dofimu25_t *ctx, uint8_t odr );
750
773err_t c6dofimu25_set_gyro_odr ( c6dofimu25_t *ctx, uint8_t odr );
774
789err_t c6dofimu25_set_accel_fsr ( c6dofimu25_t *ctx, uint8_t fsr );
790
807err_t c6dofimu25_set_gyro_fsr ( c6dofimu25_t *ctx, uint8_t fsr );
808
821err_t c6dofimu25_get_accel_drdy ( c6dofimu25_t *ctx, uint8_t *drdy );
822
835err_t c6dofimu25_get_gyro_drdy ( c6dofimu25_t *ctx, uint8_t *drdy );
836
849err_t c6dofimu25_get_temp_drdy ( c6dofimu25_t *ctx, uint8_t *drdy );
850
864
878
890err_t c6dofimu25_get_temp ( c6dofimu25_t *ctx, float *temp );
891
905
906#ifdef __cplusplus
907}
908#endif
909#endif // C6DOFIMU25_H
910
911 // c6dofimu25
912
913// ------------------------------------------------------------------------ END
c6dofimu25_drv_t
6DOF IMU 25 Click driver selector.
Definition c6dofimu25.h:447
@ C6DOFIMU25_DRV_SEL_SPI
Definition c6dofimu25.h:448
@ C6DOFIMU25_DRV_SEL_I2C
Definition c6dofimu25.h:449
c6dofimu25_return_value_t
6DOF IMU 25 Click return value data.
Definition c6dofimu25.h:539
@ C6DOFIMU25_OK
Definition c6dofimu25.h:540
@ C6DOFIMU25_ERROR
Definition c6dofimu25.h:541
struct c6dofimu25_s c6dofimu25_t
6DOF IMU 25 Click context object.
err_t(* c6dofimu25_master_io_t)(struct c6dofimu25_s *, uint8_t, uint8_t *, uint8_t)
Definition c6dofimu25.h:458
err_t c6dofimu25_set_gyro_odr(c6dofimu25_t *ctx, uint8_t odr)
6DOF IMU 25 set gyro odr function.
err_t c6dofimu25_set_accel_odr(c6dofimu25_t *ctx, uint8_t odr)
6DOF IMU 25 set accel odr function.
err_t c6dofimu25_set_mem_bank(c6dofimu25_t *ctx, uint8_t mem_bank)
6DOF IMU 25 set mem bank function.
err_t c6dofimu25_set_gyro_fsr(c6dofimu25_t *ctx, uint8_t fsr)
6DOF IMU 25 set gyro fsr function.
err_t c6dofimu25_check_communication(c6dofimu25_t *ctx)
6DOF IMU 25 check communication function.
err_t c6dofimu25_get_accel_drdy(c6dofimu25_t *ctx, uint8_t *drdy)
6DOF IMU 25 get accel drdy function.
err_t c6dofimu25_init(c6dofimu25_t *ctx, c6dofimu25_cfg_t *cfg)
6DOF IMU 25 initialization function.
err_t c6dofimu25_get_gyro(c6dofimu25_t *ctx, c6dofimu25_axes_t *gyro)
6DOF IMU 25 get gyro function.
err_t c6dofimu25_read_regs(c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
6DOF IMU 25 read regs function.
err_t c6dofimu25_get_accel(c6dofimu25_t *ctx, c6dofimu25_axes_t *accel)
6DOF IMU 25 get accel function.
err_t c6dofimu25_sw_reset(c6dofimu25_t *ctx)
6DOF IMU 25 sw reset function.
void c6dofimu25_drv_interface_sel(c6dofimu25_cfg_t *cfg, c6dofimu25_drv_t drv_sel)
6DOF IMU 25 driver interface setup function.
err_t c6dofimu25_default_cfg(c6dofimu25_t *ctx)
6DOF IMU 25 default configuration function.
err_t c6dofimu25_set_accel_fsr(c6dofimu25_t *ctx, uint8_t fsr)
6DOF IMU 25 set accel fsr function.
uint8_t c6dofimu25_get_int1_pin(c6dofimu25_t *ctx)
6DOF IMU 25 get int1 pin function.
err_t c6dofimu25_get_temp_drdy(c6dofimu25_t *ctx, uint8_t *drdy)
6DOF IMU 25 get temp drdy function.
err_t c6dofimu25_get_temp(c6dofimu25_t *ctx, float *temp)
6DOF IMU 25 get temp function.
err_t c6dofimu25_write_regs(c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
6DOF IMU 25 write regs function.
err_t c6dofimu25_read_reg(c6dofimu25_t *ctx, uint8_t reg, uint8_t *data_out)
6DOF IMU 25 read reg function.
err_t c6dofimu25_write_reg(c6dofimu25_t *ctx, uint8_t reg, uint8_t data_in)
6DOF IMU 25 write reg function.
err_t c6dofimu25_get_data(c6dofimu25_t *ctx, c6dofimu25_data_t *data_out)
6DOF IMU 25 get data function.
err_t c6dofimu25_get_gyro_drdy(c6dofimu25_t *ctx, uint8_t *drdy)
6DOF IMU 25 get gyro drdy function.
uint8_t c6dofimu25_get_int2_pin(c6dofimu25_t *ctx)
6DOF IMU 25 get int2 pin function.
void c6dofimu25_cfg_setup(c6dofimu25_cfg_t *cfg)
6DOF IMU 25 configuration object setup function.
This file contains SPI specific macros, functions, etc.
6DOF IMU 25 Click axes data structure.
Definition c6dofimu25.h:515
float y
Definition c6dofimu25.h:517
float x
Definition c6dofimu25.h:516
float z
Definition c6dofimu25.h:518
6DOF IMU 25 Click configuration object.
Definition c6dofimu25.h:489
pin_name_t int1
Definition c6dofimu25.h:497
pin_name_t int2
Definition c6dofimu25.h:496
uint32_t i2c_speed
Definition c6dofimu25.h:499
spi_master_chip_select_polarity_t cs_polarity
Definition c6dofimu25.h:504
pin_name_t sck
Definition c6dofimu25.h:494
spi_master_mode_t spi_mode
Definition c6dofimu25.h:503
pin_name_t mosi
Definition c6dofimu25.h:493
uint32_t spi_speed
Definition c6dofimu25.h:502
pin_name_t scl
Definition c6dofimu25.h:490
pin_name_t miso
Definition c6dofimu25.h:492
pin_name_t sda
Definition c6dofimu25.h:491
c6dofimu25_drv_t drv_sel
Definition c6dofimu25.h:506
pin_name_t cs
Definition c6dofimu25.h:495
uint8_t i2c_address
Definition c6dofimu25.h:500
6DOF IMU 25 Click data structure.
Definition c6dofimu25.h:527
c6dofimu25_axes_t accel
Definition c6dofimu25.h:528
c6dofimu25_axes_t gyro
Definition c6dofimu25.h:529
float temperature
Definition c6dofimu25.h:530
6DOF IMU 25 Click context object.
Definition c6dofimu25.h:465
c6dofimu25_master_io_t read_f
Definition c6dofimu25.h:477
digital_in_t int2
Definition c6dofimu25.h:466
spi_master_t spi
Definition c6dofimu25.h:470
c6dofimu25_master_io_t write_f
Definition c6dofimu25.h:476
digital_in_t int1
Definition c6dofimu25.h:467
float gyro_sens
Definition c6dofimu25.h:479
i2c_master_t i2c
Definition c6dofimu25.h:469
float accel_sens
Definition c6dofimu25.h:480
uint8_t slave_address
Definition c6dofimu25.h:472
pin_name_t chip_select
Definition c6dofimu25.h:473
c6dofimu25_drv_t drv_sel
Definition c6dofimu25.h:474