c6dofimu17  2.0.0.0
c6dofimu17.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 C6DOFIMU17_H
29 #define C6DOFIMU17_H
30 
31 #ifdef __cplusplus
32 extern "C"{
33 #endif
34 
35 #include "mikrosdk_version.h"
36 
37 #ifdef __GNUC__
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
40 #else
41 #include "delays.h"
42 #endif
43 #endif
44 
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
47 #include "drv_i2c_master.h"
48 #include "drv_spi_master.h"
49 #include "spi_specifics.h"
50 
51 
72 #define C6DOFIMU17_REG_DEVICE_CONFIG 0x11
73 #define C6DOFIMU17_REG_DRIVE_CONFIG 0x13
74 #define C6DOFIMU17_REG_INT_CONFIG 0x14
75 #define C6DOFIMU17_REG_FIFO_CONFIG 0x16
76 #define C6DOFIMU17_REG_TEMP_DATA1_UI 0x1D
77 #define C6DOFIMU17_REG_TEMP_DATA0_UI 0x1E
78 #define C6DOFIMU17_REG_ACCEL_DATA_X1_UI 0x1F
79 #define C6DOFIMU17_REG_ACCEL_DATA_X0_UI 0x20
80 #define C6DOFIMU17_REG_ACCEL_DATA_Y1_UI 0x21
81 #define C6DOFIMU17_REG_ACCEL_DATA_Y0_UI 0x22
82 #define C6DOFIMU17_REG_ACCEL_DATA_Z1_UI 0x23
83 #define C6DOFIMU17_REG_ACCEL_DATA_Z0_UI 0x24
84 #define C6DOFIMU17_REG_GYRO_DATA_X1_UI 0x25
85 #define C6DOFIMU17_REG_GYRO_DATA_X0_UI 0x26
86 #define C6DOFIMU17_REG_GYRO_DATA_Y1_UI 0x27
87 #define C6DOFIMU17_REG_GYRO_DATA_Y0_UI 0x28
88 #define C6DOFIMU17_REG_GYRO_DATA_Z1_UI 0x29
89 #define C6DOFIMU17_REG_GYRO_DATA_Z0_UI 0x2A
90 #define C6DOFIMU17_REG_TMST_FSYNCH 0x2B
91 #define C6DOFIMU17_REG_TMST_FSYNCL 0x2C
92 #define C6DOFIMU17_REG_INT_STATUS 0x2D
93 #define C6DOFIMU17_REG_FIFO_COUNTH 0x2E
94 #define C6DOFIMU17_REG_FIFO_COUNTL 0x2F
95 #define C6DOFIMU17_REG_FIFO_DATA 0x30
96 #define C6DOFIMU17_REG_APEX_DATA0 0x31
97 #define C6DOFIMU17_REG_APEX_DATA1 0x32
98 #define C6DOFIMU17_REG_APEX_DATA2 0x33
99 #define C6DOFIMU17_REG_APEX_DATA3 0x34
100 #define C6DOFIMU17_REG_APEX_DATA4 0x35
101 #define C6DOFIMU17_REG_APEX_DATA5 0x36
102 #define C6DOFIMU17_REG_INT_STATUS2 0x37
103 #define C6DOFIMU17_REG_INT_STATUS3 0x38
104 #define C6DOFIMU17_REG_SIGNAL_PATH_RESET 0x4B
105 #define C6DOFIMU17_REG_INTF_CONFIG0 0x4C
106 #define C6DOFIMU17_REG_INTF_CONFIG1 0x4D
107 #define C6DOFIMU17_REG_PWR_MGMT0 0x4E
108 #define C6DOFIMU17_REG_GYRO_CONFIG0 0x4F
109 #define C6DOFIMU17_REG_ACCEL_CONFIG0 0x50
110 #define C6DOFIMU17_REG_GYRO_CONFIG1 0x51
111 #define C6DOFIMU17_REG_GYRO_ACCEL_CONFIG0 0x52
112 #define C6DOFIMU17_REG_ACCEL_CONFIG1 0x53
113 #define C6DOFIMU17_REG_TMST_CONFIG 0x54
114 #define C6DOFIMU17_REG_APEX_CONFIG0 0x55
115 #define C6DOFIMU17_REG_SMD_CONFIG 0x56
116 #define C6DOFIMU17_REG_FIFO_CONFIG1 0x5F
117 #define C6DOFIMU17_REG_FIFO_CONFIG2 0x60
118 #define C6DOFIMU17_REG_FIFO_CONFIG3 0x61
119 #define C6DOFIMU17_REG_FSYNC_CONFIG 0x62
120 #define C6DOFIMU17_REG_INT_CONFIG0 0x63
121 #define C6DOFIMU17_REG_INT_CONFIG1 0x64
122 #define C6DOFIMU17_REG_INT_SOURCE0 0x65
123 #define C6DOFIMU17_REG_INT_SOURCE1 0x66
124 #define C6DOFIMU17_REG_INT_SOURCE3 0x68
125 #define C6DOFIMU17_REG_INT_SOURCE4 0x69
126 #define C6DOFIMU17_REG_FIFO_LOST_PKT0 0x6C
127 #define C6DOFIMU17_REG_FIFO_LOST_PKT1 0x6D
128 #define C6DOFIMU17_REG_SELF_TEST_CONFIG 0x70
129 #define C6DOFIMU17_REG_WHO_AM_I 0x75
130 #define C6DOFIMU17_REG_BANK_SEL 0x76
131 #define C6DOFIMU17_CHIP_ID 0x6F
132 
137 #define C6DOFIMU17_REG_SENSOR_CONFIG0 0x03
138 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC2 0x0B
139 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC3 0x0C
140 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC4 0x0D
141 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC5 0x0E
142 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC6 0x0F
143 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC7 0x10
144 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC8 0x11
145 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC9 0x12
146 #define C6DOFIMU17_REG_GYRO_CONFIG_STATIC10 0x13
147 #define C6DOFIMU17_REG_XG_ST_DATA 0x5F
148 #define C6DOFIMU17_REG_YG_ST_DATA 0x60
149 #define C6DOFIMU17_REG_ZG_ST_DATA 0x61
150 #define C6DOFIMU17_REG_TMSTVAL0 0x62
151 #define C6DOFIMU17_REG_TMSTVAL1 0x63
152 #define C6DOFIMU17_REG_TMSTVAL2 0x64
153 #define C6DOFIMU17_REG_INTF_CONFIG4 0x7A
154 #define C6DOFIMU17_REG_INTF_CONFIG5 0x7B
155 #define C6DOFIMU17_REG_INTF_CONFIG6 0x7C
156 
161 #define C6DOFIMU17_REG_ACCEL_CONFIG_STATIC2 0x03
162 #define C6DOFIMU17_REG_ACCEL_CONFIG_STATIC3 0x04
163 #define C6DOFIMU17_REG_ACCEL_CONFIG_STATIC4 0x05
164 #define C6DOFIMU17_REG_XA_ST_DATA 0x3B
165 #define C6DOFIMU17_REG_YA_ST_DATA 0x3C
166 #define C6DOFIMU17_REG_ZA_ST_DATA 0x3D
167 
172 #define C6DOFIMU17_REG_PU_PD_CONFIG1 0x06
173 #define C6DOFIMU17_REG_PU_PD_CONFIG2 0x0E
174 
179 #define C6DOFIMU17_REG_FDR_CONFIG 0x09
180 #define C6DOFIMU17_REG_APEX_CONFIG1 0x40
181 #define C6DOFIMU17_REG_APEX_CONFIG2 0x41
182 #define C6DOFIMU17_REG_APEX_CONFIG3 0x42
183 #define C6DOFIMU17_REG_APEX_CONFIG4 0x43
184 #define C6DOFIMU17_REG_APEX_CONFIG5 0x44
185 #define C6DOFIMU17_REG_APEX_CONFIG6 0x45
186 #define C6DOFIMU17_REG_APEX_CONFIG7 0x46
187 #define C6DOFIMU17_REG_APEX_CONFIG8 0x47
188 #define C6DOFIMU17_REG_APEX_CONFIG9 0x48
189 #define C6DOFIMU17_REG_APEX_CONFIG10 0x49
190 #define C6DOFIMU17_REG_ACCEL_WOM_X_THR 0x4A
191 #define C6DOFIMU17_REG_ACCEL_WOM_Y_THR 0x4B
192 #define C6DOFIMU17_REG_ACCEL_WOM_Z_THR 0x4C
193 #define C6DOFIMU17_REG_INT_SOURCE6 0x4D
194 #define C6DOFIMU17_REG_INT_SOURCE7 0x4E
195 #define C6DOFIMU17_REG_INT_SOURCE8 0x4F
196 #define C6DOFIMU17_REG_INT_SOURCE9 0x50
197 #define C6DOFIMU17_REG_INT_SOURCE10 0x51
198 #define C6DOFIMU17_REG_OFFSET_USER0 0x77
199 #define C6DOFIMU17_REG_OFFSET_USER1 0x78
200 #define C6DOFIMU17_REG_OFFSET_USER2 0x79
201 #define C6DOFIMU17_REG_OFFSET_USER3 0x7A
202 #define C6DOFIMU17_REG_OFFSET_USER4 0x7B
203 #define C6DOFIMU17_REG_OFFSET_USER5 0x7C
204 #define C6DOFIMU17_REG_OFFSET_USER6 0x7D
205 #define C6DOFIMU17_REG_OFFSET_USER7 0x7E
206 #define C6DOFIMU17_REG_OFFSET_USER8 0x7F
207  // c6dofimu17_reg
209 
224 #define C6DOFIMU17_SET_TEMPERATURE_ENABLED 0xDF
225 #define C6DOFIMU17_SET_TEMPERATURE_DISABLED 0x20
226 
227 #define C6DOFIMU17_SET_GYRO_OFF_MODE 0x00
228 #define C6DOFIMU17_SET_GYRO_STANDBY_MODE 0x04
229 #define C6DOFIMU17_SET_GYRO_TLOW_NOISE_MODE 0x0C
230 
231 #define C6DOFIMU17_SET_ACCEL_OFF_MODE 0x00
232 #define C6DOFIMU17_SET_ACCEL_LOW_POWER_MODE 0x02
233 #define C6DOFIMU17_SET_ACCEL_LOW_NOISE_MODE 0x03
234 
235 #define C6DOFIMU17_SET_GYRO_FS_SEL_2000_dps 0x00
236 #define C6DOFIMU17_SET_GYRO_FS_SEL_1000_dps 0x01
237 #define C6DOFIMU17_SET_GYRO_FS_SEL_500_dps 0x02
238 #define C6DOFIMU17_SET_GYRO_FS_SEL_250_dps 0x03
239 #define C6DOFIMU17_SET_GYRO_FS_SEL_125_dps 0x04
240 #define C6DOFIMU17_SET_GYRO_FS_SEL_62_5_dps 0x05
241 #define C6DOFIMU17_SET_GYRO_FS_SEL_31_25_dps 0x06
242 #define C6DOFIMU17_SET_GYRO_FS_SEL_16_625_dps 0x07
243 
244 #define C6DOFIMU17_SET_GYRO_ODR_32kHz 0x01
245 #define C6DOFIMU17_SET_GYRO_ODR_16kHz 0x02
246 #define C6DOFIMU17_SET_GYRO_ODR_8kHz 0x03
247 #define C6DOFIMU17_SET_GYRO_ODR_4kHz 0x04
248 #define C6DOFIMU17_SET_GYRO_ODR_2kHz 0x05
249 #define C6DOFIMU17_SET_GYRO_ODR_1kHz 0x06
250 #define C6DOFIMU17_SET_GYRO_ODR_200Hz 0x07
251 #define C6DOFIMU17_SET_GYRO_ODR_100Hz 0x08
252 #define C6DOFIMU17_SET_GYRO_ODR_50Hz 0x09
253 #define C6DOFIMU17_SET_GYRO_ODR_25Hz 0x0A
254 #define C6DOFIMU17_SET_GYRO_ODR_12_5Hz 0x0B
255 
256 #define C6DOFIMU17_SET_GYRO_UI_FILT_ORD_1st 0x00
257 #define C6DOFIMU17_SET_GYRO_UI_FILT_ORD_2st 0x01
258 #define C6DOFIMU17_SET_GYRO_UI_FILT_ORD_3st 0x02
259 
260 #define C6DOFIMU17_SET_GYRO_DEC2_M2_ORD_3st 0x02
261 
262 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_2 0x00
263 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_4 0x01
264 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_5 0x02
265 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_8 0x03
266 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_10 0x04
267 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_16 0x05
268 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_20 0x06
269 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_ODR_40 0x07
270 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_LOW_LATENCY_0 0x0E
271 #define C6DOFIMU17_SET_GYRO_UI_FILT_BW_LOW_LATENCY_1 0x0F
272 
273 #define C6DOFIMU17_SET_ACCEL_FS_SEL_16g 0x00
274 #define C6DOFIMU17_SET_ACCEL_FS_SEL_8g 0x01
275 #define C6DOFIMU17_SET_ACCEL_FS_SEL_4g 0x02
276 #define C6DOFIMU17_SET_ACCEL_FS_SEL_2g 0x03
277 
278 #define C6DOFIMU17_SET_ACCEL_ODR_32kHz 0x01
279 #define C6DOFIMU17_SET_ACCEL_ODR_16kHz 0x02
280 #define C6DOFIMU17_SET_ACCEL_ODR_8kHz 0x03
281 #define C6DOFIMU17_SET_ACCEL_ODR_4kHz 0x04
282 #define C6DOFIMU17_SET_ACCEL_ODR_2kHz 0x05
283 #define C6DOFIMU17_SET_ACCEL_ODR_1kHz 0x06
284 #define C6DOFIMU17_SET_ACCEL_ODR_200Hz 0x07
285 #define C6DOFIMU17_SET_ACCEL_ODR_100Hz 0x08
286 #define C6DOFIMU17_SET_ACCEL_ODR_50Hz 0x09
287 #define C6DOFIMU17_SET_ACCEL_ODR_25Hz 0x0A
288 #define C6DOFIMU17_SET_ACCEL_ODR_12_5Hz 0x0B
289 
290 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_2 0x00
291 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_4 0x01
292 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_5 0x02
293 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_8 0x03
294 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_10 0x04
295 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_16 0x05
296 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_20 0x06
297 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_ODR_40 0x07
298 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_LOW_LATENCY_0 0x0E
299 #define C6DOFIMU17_SET_ACCEL_UI_FILT_BW_LOW_LATENCY_1 0x0F
300 
301 #define C6DOFIMU17_SET_ACCEL_UI_FILT_ORD_1st 0x00
302 #define C6DOFIMU17_SET_ACCEL_UI_FILT_ORD_2st 0x01
303 #define C6DOFIMU17_SET_ACCEL_UI_FILT_ORD_3st 0x02
304 
305 #define C6DOFIMU17_SET_ACCEL_DEC2_M2_ORD_3st 0x02
306 
307 #define C6DOFIMU17_SET_BANK_0 0x00
308 #define C6DOFIMU17_SET_BANK_1 0x01
309 #define C6DOFIMU17_SET_BANK_2 0x02
310 #define C6DOFIMU17_SET_BANK_3 0x03
311 #define C6DOFIMU17_SET_BANK_4 0x04
312 
318 #define C6DOFIMU17_SET_DEV_ADDR 0x68
319 
328 #define C6DOFIMU17_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
329 #define C6DOFIMU17_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
330  // c6dofimu17_set
332 
347 #define C6DOFIMU17_MAP_MIKROBUS( cfg, mikrobus ) \
348  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
349  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
350  cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
351  cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
352  cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
353  cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
354  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
355  // c6dofimu17_map // c6dofimu17
358 
363 typedef enum
364 {
369 
374 typedef err_t ( *c6dofimu17_master_io_t )( struct c6dofimu17_s*, uint8_t, uint8_t*, uint8_t );
380 typedef struct c6dofimu17_s
381 {
382  digital_in_t int_pin;
384  i2c_master_t i2c;
385  spi_master_t spi;
387  uint8_t slave_address;
388  pin_name_t chip_select;
395 
400 typedef struct
401 {
402  pin_name_t scl;
403  pin_name_t sda;
404  pin_name_t miso;
405  pin_name_t mosi;
406  pin_name_t sck;
407  pin_name_t cs;
408  pin_name_t int_pin;
410  uint32_t i2c_speed;
411  uint8_t i2c_address;
413  uint32_t spi_speed;
414  spi_master_mode_t spi_mode;
415  spi_master_chip_select_polarity_t cs_polarity;
420 
425 typedef enum
426 {
428  C6DOFIMU17_ERROR = -1
429 
431 
436 typedef struct
437 {
438  int16_t x;
439  int16_t y;
440  int16_t z;
441 
443 
448 typedef struct
449 {
450  uint8_t gyro_fs_sel;
451  uint8_t gyro_odr;
455 
457 
462 typedef struct
463 {
464  uint8_t accel_fs_sel;
465  uint8_t accel_odr;
469 
471 
488 
504 
520 
535 
551 err_t c6dofimu17_generic_write ( c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
552 
568 err_t c6dofimu17_generic_read ( c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
569 
589 err_t c6dofimu17_bank_selection ( c6dofimu17_t *ctx, uint8_t bank_sel );
590 
603 
618 err_t c6dofimu17_get_device_id ( c6dofimu17_t *ctx, uint8_t *device_id );
619 
634 
649 
664 
680 
696 
712 
728 
743 
759 
775 
790 err_t c6dofimu17_get_temperature ( c6dofimu17_t *ctx, float *temperature );
791 
792 #ifdef __cplusplus
793 }
794 #endif
795 #endif // C6DOFIMU17_H
796  // c6dofimu17
798 
799 // ------------------------------------------------------------------------ END
c6dofimu17_get_accel_data
err_t c6dofimu17_get_accel_data(c6dofimu17_t *ctx, c6dofimu17_axis_t *accel_data)
6DOF IMU 17 get accel data function.
c6dofimu17_gyro_enable
err_t c6dofimu17_gyro_enable(c6dofimu17_t *ctx)
6DOF IMU 17 gyroscope enable function.
c6dofimu17_accel_cfg_t::accel_dec2_m2_ord
uint8_t accel_dec2_m2_ord
Definition: c6dofimu17.h:468
c6dofimu17_return_value_t
c6dofimu17_return_value_t
6DOF IMU 17 Click return value data.
Definition: c6dofimu17.h:426
c6dofimu17_cfg_t::spi_mode
spi_master_mode_t spi_mode
Definition: c6dofimu17.h:414
c6dofimu17_accel_cfg_t::accel_fs_sel
uint8_t accel_fs_sel
Definition: c6dofimu17.h:464
c6dofimu17_cfg_t::mosi
pin_name_t mosi
Definition: c6dofimu17.h:405
c6dofimu17_s
6DOF IMU 17 Click context object.
Definition: c6dofimu17.h:381
c6dofimu17_init
err_t c6dofimu17_init(c6dofimu17_t *ctx, c6dofimu17_cfg_t *cfg)
6DOF IMU 17 initialization function.
c6dofimu17_accel_cfg_t::accel_odr
uint8_t accel_odr
Definition: c6dofimu17.h:465
C6DOFIMU17_DRV_SEL_SPI
@ C6DOFIMU17_DRV_SEL_SPI
Definition: c6dofimu17.h:365
c6dofimu17_axis_t
6DOF IMU 17 Axis structure object.
Definition: c6dofimu17.h:437
spi_specifics.h
This file contains SPI specific macros, functions, etc.
c6dofimu17_axis_t::y
int16_t y
Definition: c6dofimu17.h:439
c6dofimu17_s::spi
spi_master_t spi
Definition: c6dofimu17.h:385
c6dofimu17_get_gyro_data
err_t c6dofimu17_get_gyro_data(c6dofimu17_t *ctx, c6dofimu17_axis_t *gyro_data)
6DOF IMU 17 get gyroscope data function.
c6dofimu17_drv_t
c6dofimu17_drv_t
6DOF IMU 17 Click driver selector.
Definition: c6dofimu17.h:364
c6dofimu17_temperature_enable
err_t c6dofimu17_temperature_enable(c6dofimu17_t *ctx)
6DOF IMU 17 temperature enable function.
c6dofimu17_cfg_t::i2c_address
uint8_t i2c_address
Definition: c6dofimu17.h:411
c6dofimu17_cfg_t::int_pin
pin_name_t int_pin
Definition: c6dofimu17.h:408
c6dofimu17_cfg_t
6DOF IMU 17 Click configuration object.
Definition: c6dofimu17.h:401
c6dofimu17_accel_cfg_t
6DOF IMU 17 Accelerometer configuration structure object.
Definition: c6dofimu17.h:463
c6dofimu17_bank_selection
err_t c6dofimu17_bank_selection(c6dofimu17_t *ctx, uint8_t bank_sel)
6DOF IMU 17 bank selection function.
c6dofimu17_gyro_cfg_t::gyro_ui_filt_bw
uint8_t gyro_ui_filt_bw
Definition: c6dofimu17.h:454
c6dofimu17_gyro_cfg_t::gyro_dec2_m2_ord
uint8_t gyro_dec2_m2_ord
Definition: c6dofimu17.h:453
c6dofimu17_get_config_gyro
err_t c6dofimu17_get_config_gyro(c6dofimu17_t *ctx, c6dofimu17_gyro_cfg_t *gyro_cfg)
6DOF IMU 17 get config gyroscope function.
c6dofimu17_gyro_cfg_t::gyro_ui_filt_ord
uint8_t gyro_ui_filt_ord
Definition: c6dofimu17.h:452
c6dofimu17_cfg_t::drv_sel
c6dofimu17_drv_t drv_sel
Definition: c6dofimu17.h:417
c6dofimu17_cfg_t::miso
pin_name_t miso
Definition: c6dofimu17.h:404
c6dofimu17_get_interrupt
uint8_t c6dofimu17_get_interrupt(c6dofimu17_t *ctx)
6DOF IMU 17 get interrupt function.
c6dofimu17_s::chip_select
pin_name_t chip_select
Definition: c6dofimu17.h:388
c6dofimu17_get_temperature
err_t c6dofimu17_get_temperature(c6dofimu17_t *ctx, float *temperature)
6DOF IMU 17 get temperature data function.
c6dofimu17_s::drv_sel
c6dofimu17_drv_t drv_sel
Definition: c6dofimu17.h:389
c6dofimu17_gyro_cfg_t::gyro_fs_sel
uint8_t gyro_fs_sel
Definition: c6dofimu17.h:450
c6dofimu17_cfg_t::cs
pin_name_t cs
Definition: c6dofimu17.h:407
C6DOFIMU17_ERROR
@ C6DOFIMU17_ERROR
Definition: c6dofimu17.h:428
c6dofimu17_cfg_t::scl
pin_name_t scl
Definition: c6dofimu17.h:402
c6dofimu17_s::slave_address
uint8_t slave_address
Definition: c6dofimu17.h:387
c6dofimu17_cfg_t::sck
pin_name_t sck
Definition: c6dofimu17.h:406
c6dofimu17_generic_read
err_t c6dofimu17_generic_read(c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
6DOF IMU 17 data reading function.
c6dofimu17_gyro_cfg_t::gyro_odr
uint8_t gyro_odr
Definition: c6dofimu17.h:451
c6dofimu17_accel_cfg_t::accel_ui_filt_ord
uint8_t accel_ui_filt_ord
Definition: c6dofimu17.h:467
c6dofimu17_cfg_t::cs_polarity
spi_master_chip_select_polarity_t cs_polarity
Definition: c6dofimu17.h:415
c6dofimu17_t
struct c6dofimu17_s c6dofimu17_t
6DOF IMU 17 Click context object.
c6dofimu17_s::i2c
i2c_master_t i2c
Definition: c6dofimu17.h:384
c6dofimu17_cfg_t::sda
pin_name_t sda
Definition: c6dofimu17.h:403
c6dofimu17_master_io_t
err_t(* c6dofimu17_master_io_t)(struct c6dofimu17_s *, uint8_t, uint8_t *, uint8_t)
6DOF IMU 17 Click driver interface.
Definition: c6dofimu17.h:374
C6DOFIMU17_DRV_SEL_I2C
@ C6DOFIMU17_DRV_SEL_I2C
Definition: c6dofimu17.h:366
c6dofimu17_drv_interface_selection
void c6dofimu17_drv_interface_selection(c6dofimu17_cfg_t *cfg, c6dofimu17_drv_t drv_sel)
6DOF IMU 17 driver interface setup function.
c6dofimu17_axis_t::z
int16_t z
Definition: c6dofimu17.h:440
c6dofimu17_cfg_t::spi_speed
uint32_t spi_speed
Definition: c6dofimu17.h:413
c6dofimu17_s::write_f
c6dofimu17_master_io_t write_f
Definition: c6dofimu17.h:391
c6dofimu17_gyro_cfg_t
6DOF IMU 17 Gyro configuration structure object.
Definition: c6dofimu17.h:449
c6dofimu17_accel_cfg_t::accel_ui_filt_bw
uint8_t accel_ui_filt_bw
Definition: c6dofimu17.h:466
c6dofimu17_axis_t::x
int16_t x
Definition: c6dofimu17.h:438
c6dofimu17_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: c6dofimu17.h:410
c6dofimu17_get_device_id
err_t c6dofimu17_get_device_id(c6dofimu17_t *ctx, uint8_t *device_id)
6DOF IMU 17 get device ID function.
c6dofimu17_soft_reset
err_t c6dofimu17_soft_reset(c6dofimu17_t *ctx)
6DOF IMU 17 soft reset function.
c6dofimu17_cfg_setup
void c6dofimu17_cfg_setup(c6dofimu17_cfg_t *cfg)
6DOF IMU 17 configuration object setup function.
c6dofimu17_default_cfg
err_t c6dofimu17_default_cfg(c6dofimu17_t *ctx)
6DOF IMU 17 default configuration function.
c6dofimu17_set_config_accel
err_t c6dofimu17_set_config_accel(c6dofimu17_t *ctx, c6dofimu17_accel_cfg_t accel_cfg)
6DOF IMU 17 set config accelerometer function.
c6dofimu17_set_config_gyro
err_t c6dofimu17_set_config_gyro(c6dofimu17_t *ctx, c6dofimu17_gyro_cfg_t gyro_cfg)
6DOF IMU 17 set config gyroscope function.
c6dofimu17_get_config_accel
err_t c6dofimu17_get_config_accel(c6dofimu17_t *ctx, c6dofimu17_accel_cfg_t *accel_cfg)
6DOF IMU 17 get config accelerometer function.
C6DOFIMU17_OK
@ C6DOFIMU17_OK
Definition: c6dofimu17.h:427
c6dofimu17_s::read_f
c6dofimu17_master_io_t read_f
Definition: c6dofimu17.h:392
c6dofimu17_generic_write
err_t c6dofimu17_generic_write(c6dofimu17_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
6DOF IMU 17 data writing function.
c6dofimu17_s::int_pin
digital_in_t int_pin
Definition: c6dofimu17.h:382
c6dofimu17_accel_enable
err_t c6dofimu17_accel_enable(c6dofimu17_t *ctx)
6DOF IMU 17 accelerometer enable function.