1 | /** \mainpage
|
---|
2 | *
|
---|
3 | ****************************************************************************
|
---|
4 | * Copyright (C) 2013 - 2014 Bosch Sensortec GmbH
|
---|
5 | *
|
---|
6 | * File : bno055.h
|
---|
7 | *
|
---|
8 | * Date : 2014/12/12
|
---|
9 | *
|
---|
10 | * Revision : 2.0.2 $
|
---|
11 | *
|
---|
12 | * Usage: Sensor Driver file for BNO055 sensor
|
---|
13 | *
|
---|
14 | * **************************************************************************
|
---|
15 | *
|
---|
16 | * Added Arduino M0/M0 Pro support
|
---|
17 | *
|
---|
18 | * Date: 07/27/2015
|
---|
19 | *
|
---|
20 | * Modified by: Arduino.org development Team.
|
---|
21 | *
|
---|
22 | ****************************************************************************
|
---|
23 | *
|
---|
24 | * \section License
|
---|
25 | *
|
---|
26 | * Redistribution and use in source and binary forms, with or without
|
---|
27 | * modification, are permitted provided that the following conditions are met:
|
---|
28 | *
|
---|
29 | * Redistributions of source code must retain the above copyright
|
---|
30 | * notice, this list of conditions and the following disclaimer.
|
---|
31 | *
|
---|
32 | * Redistributions in binary form must reproduce the above copyright
|
---|
33 | * notice, this list of conditions and the following disclaimer in the
|
---|
34 | * documentation and/or other materials provided with the distribution.
|
---|
35 | *
|
---|
36 | * Neither the name of the copyright holder nor the names of the
|
---|
37 | * contributors may be used to endorse or promote products derived from
|
---|
38 | * this software without specific prior written permission.
|
---|
39 | *
|
---|
40 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
---|
41 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
---|
42 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
---|
43 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
44 | * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
|
---|
45 | * OR CONTRIBUTORS BE LIABLE FOR ANY
|
---|
46 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
---|
47 | * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
|
---|
48 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
49 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
---|
51 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
52 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
53 | * ANY WAY OUT OF THE USE OF THIS
|
---|
54 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
---|
55 | *
|
---|
56 | * The information provided is believed to be accurate and reliable.
|
---|
57 | * The copyright holder assumes no responsibility
|
---|
58 | * for the consequences of use
|
---|
59 | * of such information nor for any infringement of patents or
|
---|
60 | * other rights of third parties which may result from its use.
|
---|
61 | * No license is granted by implication or otherwise under any patent or
|
---|
62 | * patent rights of the copyright holder.
|
---|
63 | **************************************************************************/
|
---|
64 | /*! \file bno055.h
|
---|
65 | \brief BNO055 Sensor Driver Support Header File */
|
---|
66 |
|
---|
67 | #ifndef __BNO055_H__
|
---|
68 | #define __BNO055_H__
|
---|
69 | /****************************************************************/
|
---|
70 | /**\name DATA TYPES INCLUDES */
|
---|
71 | /************************************************************/
|
---|
72 | /*!
|
---|
73 | * @brief The following definition uses for define the data types
|
---|
74 | *
|
---|
75 | * @note While porting the API please consider the following
|
---|
76 | * @note Please check the version of C standard
|
---|
77 | * @note Are you using Linux platform
|
---|
78 | */
|
---|
79 |
|
---|
80 | /*!
|
---|
81 | * @brief For the Linux platform support
|
---|
82 | * Please use the types.h for your data types definitions
|
---|
83 | */
|
---|
84 | #ifdef __KERNEL__
|
---|
85 |
|
---|
86 | #include <linux/types.h>
|
---|
87 | /* singed integer type*/
|
---|
88 | typedef int8_t s_8;/**< used for signed 8bit */
|
---|
89 | typedef int16_t s_16;/**< used for signed 16bit */
|
---|
90 | typedef int32_t s_32;/**< used for signed 32bit */
|
---|
91 | typedef int64_t s_64;/**< used for signed 64bit */
|
---|
92 |
|
---|
93 | typedef u_int8_t u_8;/**< used for unsigned 8bit */
|
---|
94 | typedef u_int16_t u_16;/**< used for unsigned 16bit */
|
---|
95 | typedef u_int32_t u_32;/**< used for unsigned 32bit */
|
---|
96 | typedef u_int64_t u_64;/**< used for unsigned 64bit */
|
---|
97 |
|
---|
98 |
|
---|
99 |
|
---|
100 | #else /* ! __KERNEL__ */
|
---|
101 | /**********************************************************
|
---|
102 | * These definition uses for define the C
|
---|
103 | * standard version data types
|
---|
104 | ***********************************************************/
|
---|
105 | # if !defined(__STDC_VERSION__)
|
---|
106 |
|
---|
107 | /************************************************
|
---|
108 | * compiler is C11 C standard
|
---|
109 | ************************************************/
|
---|
110 | #if (__STDC_VERSION__ == 201112L)
|
---|
111 |
|
---|
112 | /************************************************/
|
---|
113 | #include <stdint.h>
|
---|
114 | /************************************************/
|
---|
115 |
|
---|
116 | /*unsigned integer types*/
|
---|
117 | typedef uint8_t u_8;/**< used for unsigned 8bit */
|
---|
118 | typedef uint16_t u_16;/**< used for unsigned 16bit */
|
---|
119 | typedef uint32_t u_32;/**< used for unsigned 32bit */
|
---|
120 | typedef uint64_t u_64;/**< used for unsigned 64bit */
|
---|
121 |
|
---|
122 | /*signed integer types*/
|
---|
123 | typedef int8_t s_8;/**< used for signed 8bit */
|
---|
124 | typedef int16_t s_16;/**< used for signed 16bit */
|
---|
125 | typedef int32_t s_32;/**< used for signed 32bit */
|
---|
126 | typedef int64_t s_64;/**< used for signed 64bit */
|
---|
127 | /************************************************
|
---|
128 | * compiler is C99 C standard
|
---|
129 | ************************************************/
|
---|
130 |
|
---|
131 | #elif (__STDC_VERSION__ == 199901L)
|
---|
132 |
|
---|
133 | /* stdint.h is a C99 supported c library.
|
---|
134 | which is used to fixed the integer size*/
|
---|
135 | /************************************************/
|
---|
136 | #include <stdint.h>
|
---|
137 | /************************************************/
|
---|
138 |
|
---|
139 | /*unsigned integer types*/
|
---|
140 | typedef uint8_t u_8;/**< used for unsigned 8bit */
|
---|
141 | typedef uint16_t u_16;/**< used for unsigned 16bit */
|
---|
142 | typedef uint32_t u_32;/**< used for unsigned 32bit */
|
---|
143 | typedef uint64_t u_64;/**< used for unsigned 64bit */
|
---|
144 |
|
---|
145 | /*signed integer types*/
|
---|
146 | typedef int8_t s_8;/**< used for signed 8bit */
|
---|
147 | typedef int16_t s_16;/**< used for signed 16bit */
|
---|
148 | typedef int32_t s_32;/**< used for signed 32bit */
|
---|
149 | typedef int64_t s_64;/**< used for signed 64bit */
|
---|
150 | /************************************************
|
---|
151 | * compiler is C89 or other C standard
|
---|
152 | ************************************************/
|
---|
153 |
|
---|
154 | #else /* !defined(__STDC_VERSION__) */
|
---|
155 | /*!
|
---|
156 | * @brief By default it is defined as 32 bit machine configuration
|
---|
157 | * define your data types based on your
|
---|
158 | * machine/compiler/controller configuration
|
---|
159 | */
|
---|
160 | #define MACHINE_32_BIT
|
---|
161 |
|
---|
162 | /*! @brief
|
---|
163 | * If your machine support 16 bit
|
---|
164 | * define the MACHINE_16_BIT
|
---|
165 | */
|
---|
166 | #ifdef MACHINE_16_BIT
|
---|
167 | #include <limits.h>
|
---|
168 | /*signed integer types*/
|
---|
169 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
170 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
171 | typedef signed long int s_32;/**< used for signed 32bit */
|
---|
172 |
|
---|
173 | #if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL
|
---|
174 | typedef long int s_64;/**< used for signed 64bit */
|
---|
175 | typedef unsigned long int u_64;/**< used for unsigned 64bit */
|
---|
176 | #elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL)
|
---|
177 | typedef long long int s_64;/**< used for signed 64bit */
|
---|
178 | typedef unsigned long long int u_64;/**< used for unsigned 64bit */
|
---|
179 | #else
|
---|
180 | #warning Either the correct data type for signed 64 bit integer \
|
---|
181 | could not be found, or 64 bit integers are not supported in your environment.
|
---|
182 | #warning If 64 bit integers are supported on your platform, \
|
---|
183 | please set s_64 manually.
|
---|
184 | #endif
|
---|
185 |
|
---|
186 | /*unsigned integer types*/
|
---|
187 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
188 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
189 | typedef unsigned long int u_32;/**< used for unsigned 32bit */
|
---|
190 |
|
---|
191 | /* If your machine support 32 bit
|
---|
192 | define the MACHINE_32_BIT*/
|
---|
193 | #elif defined MACHINE_32_BIT
|
---|
194 | /*signed integer types*/
|
---|
195 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
196 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
197 | typedef signed int s_32;/**< used for signed 32bit */
|
---|
198 | typedef signed long long int s_64;/**< used for signed 64bit */
|
---|
199 |
|
---|
200 | /*unsigned integer types*/
|
---|
201 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
202 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
203 | typedef unsigned int u_32;/**< used for unsigned 32bit */
|
---|
204 | typedef unsigned long long int u_64;/**< used for unsigned 64bit */
|
---|
205 |
|
---|
206 | /* If your machine support 64 bit
|
---|
207 | define the MACHINE_64_BIT*/
|
---|
208 | #elif defined MACHINE_64_BIT
|
---|
209 | /*signed integer types*/
|
---|
210 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
211 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
212 | typedef signed int s_32;/**< used for signed 32bit */
|
---|
213 | typedef signed long int s_64;/**< used for signed 64bit */
|
---|
214 |
|
---|
215 | /*unsigned integer types*/
|
---|
216 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
217 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
218 | typedef unsigned int u_32;/**< used for unsigned 32bit */
|
---|
219 | typedef unsigned long int u_64;/**< used for unsigned 64bit */
|
---|
220 |
|
---|
221 | #else
|
---|
222 | #warning The data types defined above which not supported \
|
---|
223 | define the data types manually
|
---|
224 | #endif
|
---|
225 | #endif
|
---|
226 |
|
---|
227 | /*** This else will execute for the compilers
|
---|
228 | * which are not supported the C standards
|
---|
229 | * Like C89/C99/C11***/
|
---|
230 | #else
|
---|
231 | /*!
|
---|
232 | * @brief By default it is defined as 32 bit machine configuration
|
---|
233 | * define your data types based on your
|
---|
234 | * machine/compiler/controller configuration
|
---|
235 | */
|
---|
236 | #define MACHINE_32_BIT
|
---|
237 |
|
---|
238 | /* If your machine support 16 bit
|
---|
239 | define the MACHINE_16_BIT*/
|
---|
240 | #ifdef MACHINE_16_BIT
|
---|
241 | #include <limits.h>
|
---|
242 | /*signed integer types*/
|
---|
243 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
244 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
245 | typedef signed long int s_32;/**< used for signed 32bit */
|
---|
246 |
|
---|
247 | #if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL
|
---|
248 | typedef long int s_64;/**< used for signed 64bit */
|
---|
249 | typedef unsigned long int u_64;/**< used for unsigned 64bit */
|
---|
250 | #elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL)
|
---|
251 | typedef long long int s_64;/**< used for signed 64bit */
|
---|
252 | typedef unsigned long long int u_64;/**< used for unsigned 64bit */
|
---|
253 | #else
|
---|
254 | #warning Either the correct data type for signed 64 bit integer \
|
---|
255 | could not be found, or 64 bit integers are not supported in your environment.
|
---|
256 | #warning If 64 bit integers are supported on your platform, \
|
---|
257 | please set s_64 manually.
|
---|
258 | #endif
|
---|
259 |
|
---|
260 | /*unsigned integer types*/
|
---|
261 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
262 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
263 | typedef unsigned long int u_32;/**< used for unsigned 32bit */
|
---|
264 |
|
---|
265 | /*! @brief If your machine support 32 bit
|
---|
266 | define the MACHINE_32_BIT*/
|
---|
267 | #elif defined MACHINE_32_BIT
|
---|
268 | /*signed integer types*/
|
---|
269 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
270 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
271 | typedef signed int s_32;/**< used for signed 32bit */
|
---|
272 | typedef signed long long int s_64;/**< used for signed 64bit */
|
---|
273 |
|
---|
274 | /*unsigned integer types*/
|
---|
275 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
276 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
277 | typedef unsigned int u_32;/**< used for unsigned 32bit */
|
---|
278 | typedef unsigned long long int u_64;/**< used for unsigned 64bit */
|
---|
279 |
|
---|
280 | /* If your machine support 64 bit
|
---|
281 | define the MACHINE_64_BIT*/
|
---|
282 | #elif defined MACHINE_64_BIT
|
---|
283 | /*signed integer types*/
|
---|
284 | typedef signed char s_8;/**< used for signed 8bit */
|
---|
285 | typedef signed short int s_16;/**< used for signed 16bit */
|
---|
286 | typedef signed int s_32;/**< used for signed 32bit */
|
---|
287 | typedef signed long int s_64;/**< used for signed 64bit */
|
---|
288 |
|
---|
289 | /*unsigned integer types*/
|
---|
290 | typedef unsigned char u_8;/**< used for unsigned 8bit */
|
---|
291 | typedef unsigned short int u_16;/**< used for unsigned 16bit */
|
---|
292 | typedef unsigned int u_32;/**< used for unsigned 32bit */
|
---|
293 | typedef unsigned long int u_64;/**< used for unsigned 64bit */
|
---|
294 |
|
---|
295 | #else
|
---|
296 | #warning The data types defined above which not supported \
|
---|
297 | define the data types manually
|
---|
298 | #endif
|
---|
299 | #endif
|
---|
300 | #endif
|
---|
301 | /***************************************************************/
|
---|
302 | /**\name BUS READ AND WRITE FUNCTIONS */
|
---|
303 | /***************************************************************/
|
---|
304 | #define BNO055_WR_FUNC_PTR s_8 (*bus_write)\
|
---|
305 | (u_8, u_8 , u_8 *, u_8)
|
---|
306 |
|
---|
307 | #define BNO055_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)\
|
---|
308 | bus_write(dev_addr, reg_addr, reg_data, wr_len)
|
---|
309 |
|
---|
310 | #define BNO055_RD_FUNC_PTR s_8 \
|
---|
311 | (*bus_read)(u_8, u_8 , u_8 *, u_8)
|
---|
312 |
|
---|
313 | #define BNO055_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, r_len)\
|
---|
314 | bus_read(dev_addr, reg_addr, reg_data, r_len)
|
---|
315 |
|
---|
316 | #define BNO055_DELAY_RETURN_TYPE void
|
---|
317 |
|
---|
318 | #define BNO055_DELAY_PARAM_TYPES u_32
|
---|
319 |
|
---|
320 | #define BNO055_DELAY_FUNC(delay_in_msec)\
|
---|
321 | delay_func(delay_in_msec)
|
---|
322 |
|
---|
323 | /********************************************************/
|
---|
324 | /**\name I2C ADDRESS DEFINITION FOR BNO055 */
|
---|
325 | /********************************************************/
|
---|
326 | /* bno055 I2C Address */
|
---|
327 | #define BNO055_I2C_ADDR1 0x28
|
---|
328 | #define BNO055_I2C_ADDR2 0x29
|
---|
329 |
|
---|
330 | /***************************************************/
|
---|
331 | /**\name REGISTER ADDRESS DEFINITION */
|
---|
332 | /***************************************************/
|
---|
333 | /* Page id register definition*/
|
---|
334 | #define BNO055_PAGE_ID_ADDR 0X07
|
---|
335 |
|
---|
336 | /* PAGE0 REGISTER DEFINITION START*/
|
---|
337 | #define BNO055_CHIP_ID_ADDR 0x00
|
---|
338 | #define BNO055_ACCEL_REV_ID_ADDR 0x01
|
---|
339 | #define BNO055_MAG_REV_ID_ADDR 0x02
|
---|
340 | #define BNO055_GYRO_REV_ID_ADDR 0x03
|
---|
341 | #define BNO055_SW_REV_ID_LSB_ADDR 0x04
|
---|
342 | #define BNO055_SW_REV_ID_MSB_ADDR 0x05
|
---|
343 | #define BNO055_BL_REV_ID_ADDR 0X06
|
---|
344 |
|
---|
345 | /* Accel data register*/
|
---|
346 | #define BNO055_ACCEL_DATA_X_LSB_ADDR 0X08
|
---|
347 | #define BNO055_ACCEL_DATA_X_MSB_ADDR 0X09
|
---|
348 | #define BNO055_ACCEL_DATA_Y_LSB_ADDR 0X0A
|
---|
349 | #define BNO055_ACCEL_DATA_Y_MSB_ADDR 0X0B
|
---|
350 | #define BNO055_ACCEL_DATA_Z_LSB_ADDR 0X0C
|
---|
351 | #define BNO055_ACCEL_DATA_Z_MSB_ADDR 0X0D
|
---|
352 |
|
---|
353 | /*Mag data register*/
|
---|
354 | #define BNO055_MAG_DATA_X_LSB_ADDR 0X0E
|
---|
355 | #define BNO055_MAG_DATA_X_MSB_ADDR 0X0F
|
---|
356 | #define BNO055_MAG_DATA_Y_LSB_ADDR 0X10
|
---|
357 | #define BNO055_MAG_DATA_Y_MSB_ADDR 0X11
|
---|
358 | #define BNO055_MAG_DATA_Z_LSB_ADDR 0X12
|
---|
359 | #define BNO055_MAG_DATA_Z_MSB_ADDR 0X13
|
---|
360 |
|
---|
361 | /*Gyro data registers*/
|
---|
362 | #define BNO055_GYRO_DATA_X_LSB_ADDR 0X14
|
---|
363 | #define BNO055_GYRO_DATA_X_MSB_ADDR 0X15
|
---|
364 | #define BNO055_GYRO_DATA_Y_LSB_ADDR 0X16
|
---|
365 | #define BNO055_GYRO_DATA_Y_MSB_ADDR 0X17
|
---|
366 | #define BNO055_GYRO_DATA_Z_LSB_ADDR 0X18
|
---|
367 | #define BNO055_GYRO_DATA_Z_MSB_ADDR 0X19
|
---|
368 |
|
---|
369 | /*Euler data registers*/
|
---|
370 | #define BNO055_EULER_H_LSB_ADDR 0X1A
|
---|
371 | #define BNO055_EULER_H_MSB_ADDR 0X1B
|
---|
372 |
|
---|
373 | #define BNO055_EULER_R_LSB_ADDR 0X1C
|
---|
374 | #define BNO055_EULER_R_MSB_ADDR 0X1D
|
---|
375 |
|
---|
376 | #define BNO055_EULER_P_LSB_ADDR 0X1E
|
---|
377 | #define BNO055_EULER_P_MSB_ADDR 0X1F
|
---|
378 |
|
---|
379 | /*Quaternion data registers*/
|
---|
380 | #define BNO055_QUATERNION_DATA_W_LSB_ADDR 0X20
|
---|
381 | #define BNO055_QUATERNION_DATA_W_MSB_ADDR 0X21
|
---|
382 | #define BNO055_QUATERNION_DATA_X_LSB_ADDR 0X22
|
---|
383 | #define BNO055_QUATERNION_DATA_X_MSB_ADDR 0X23
|
---|
384 | #define BNO055_QUATERNION_DATA_Y_LSB_ADDR 0X24
|
---|
385 | #define BNO055_QUATERNION_DATA_Y_MSB_ADDR 0X25
|
---|
386 | #define BNO055_QUATERNION_DATA_Z_LSB_ADDR 0X26
|
---|
387 | #define BNO055_QUATERNION_DATA_Z_MSB_ADDR 0X27
|
---|
388 |
|
---|
389 | /* Linear acceleration data registers*/
|
---|
390 | #define BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR 0X28
|
---|
391 | #define BNO055_LINEAR_ACCEL_DATA_X_MSB_ADDR 0X29
|
---|
392 | #define BNO055_LINEAR_ACCEL_DATA_Y_LSB_ADDR 0X2A
|
---|
393 | #define BNO055_LINEAR_ACCEL_DATA_Y_MSB_ADDR 0X2B
|
---|
394 | #define BNO055_LINEAR_ACCEL_DATA_Z_LSB_ADDR 0X2C
|
---|
395 | #define BNO055_LINEAR_ACCEL_DATA_Z_MSB_ADDR 0X2D
|
---|
396 |
|
---|
397 | /*Gravity data registers*/
|
---|
398 | #define BNO055_GRAVITY_DATA_X_LSB_ADDR 0X2E
|
---|
399 | #define BNO055_GRAVITY_DATA_X_MSB_ADDR 0X2F
|
---|
400 | #define BNO055_GRAVITY_DATA_Y_LSB_ADDR 0X30
|
---|
401 | #define BNO055_GRAVITY_DATA_Y_MSB_ADDR 0X31
|
---|
402 | #define BNO055_GRAVITY_DATA_Z_LSB_ADDR 0X32
|
---|
403 | #define BNO055_GRAVITY_DATA_Z_MSB_ADDR 0X33
|
---|
404 |
|
---|
405 | /* Temperature data register*/
|
---|
406 | #define BNO055_TEMP_ADDR 0X34
|
---|
407 |
|
---|
408 | /* Status registers*/
|
---|
409 | #define BNO055_CALIB_STAT_ADDR 0X35
|
---|
410 | #define BNO055_SELFTEST_RESULT_ADDR 0X36
|
---|
411 | #define BNO055_INTR_STAT_ADDR 0X37
|
---|
412 | #define BNO055_SYS_CLK_STAT_ADDR 0X38
|
---|
413 | #define BNO055_SYS_STAT_ADDR 0X39
|
---|
414 | #define BNO055_SYS_ERR_ADDR 0X3A
|
---|
415 |
|
---|
416 | /* Unit selection register*/
|
---|
417 | #define BNO055_UNIT_SEL_ADDR 0X3B
|
---|
418 | #define BNO055_DATA_SELECT_ADDR 0X3C
|
---|
419 |
|
---|
420 | /* Mode registers*/
|
---|
421 | #define BNO055_OPR_MODE_ADDR 0X3D
|
---|
422 | #define BNO055_PWR_MODE_ADDR 0X3E
|
---|
423 |
|
---|
424 | #define BNO055_SYS_TRIGGER_ADDR 0X3F
|
---|
425 | #define BNO055_TEMP_SOURCE_ADDR 0X40
|
---|
426 | /* Axis remap registers*/
|
---|
427 | #define BNO055_AXIS_MAP_CONFIG_ADDR 0X41
|
---|
428 | #define BNO055_AXIS_MAP_SIGN_ADDR 0X42
|
---|
429 |
|
---|
430 | /* SIC registers*/
|
---|
431 | #define BNO055_SIC_MATRIX_0_LSB_ADDR 0X43
|
---|
432 | #define BNO055_SIC_MATRIX_0_MSB_ADDR 0X44
|
---|
433 | #define BNO055_SIC_MATRIX_1_LSB_ADDR 0X45
|
---|
434 | #define BNO055_SIC_MATRIX_1_MSB_ADDR 0X46
|
---|
435 | #define BNO055_SIC_MATRIX_2_LSB_ADDR 0X47
|
---|
436 | #define BNO055_SIC_MATRIX_2_MSB_ADDR 0X48
|
---|
437 | #define BNO055_SIC_MATRIX_3_LSB_ADDR 0X49
|
---|
438 | #define BNO055_SIC_MATRIX_3_MSB_ADDR 0X4A
|
---|
439 | #define BNO055_SIC_MATRIX_4_LSB_ADDR 0X4B
|
---|
440 | #define BNO055_SIC_MATRIX_4_MSB_ADDR 0X4C
|
---|
441 | #define BNO055_SIC_MATRIX_5_LSB_ADDR 0X4D
|
---|
442 | #define BNO055_SIC_MATRIX_5_MSB_ADDR 0X4E
|
---|
443 | #define BNO055_SIC_MATRIX_6_LSB_ADDR 0X4F
|
---|
444 | #define BNO055_SIC_MATRIX_6_MSB_ADDR 0X50
|
---|
445 | #define BNO055_SIC_MATRIX_7_LSB_ADDR 0X51
|
---|
446 | #define BNO055_SIC_MATRIX_7_MSB_ADDR 0X52
|
---|
447 | #define BNO055_SIC_MATRIX_8_LSB_ADDR 0X53
|
---|
448 | #define BNO055_SIC_MATRIX_8_MSB_ADDR 0X54
|
---|
449 |
|
---|
450 | /* Accelerometer Offset registers*/
|
---|
451 | #define ACCEL_OFFSET_X_LSB_ADDR 0X55
|
---|
452 | #define ACCEL_OFFSET_X_MSB_ADDR 0X56
|
---|
453 | #define ACCEL_OFFSET_Y_LSB_ADDR 0X57
|
---|
454 | #define ACCEL_OFFSET_Y_MSB_ADDR 0X58
|
---|
455 | #define ACCEL_OFFSET_Z_LSB_ADDR 0X59
|
---|
456 | #define ACCEL_OFFSET_Z_MSB_ADDR 0X5A
|
---|
457 |
|
---|
458 | /* Magnetometer Offset registers*/
|
---|
459 | #define MAG_OFFSET_X_LSB_ADDR 0X5B
|
---|
460 | #define MAG_OFFSET_X_MSB_ADDR 0X5C
|
---|
461 | #define MAG_OFFSET_Y_LSB_ADDR 0X5D
|
---|
462 | #define MAG_OFFSET_Y_MSB_ADDR 0X5E
|
---|
463 | #define MAG_OFFSET_Z_LSB_ADDR 0X5F
|
---|
464 | #define MAG_OFFSET_Z_MSB_ADDR 0X60
|
---|
465 |
|
---|
466 | /* Gyroscope Offset registers*/
|
---|
467 | #define GYRO_OFFSET_X_LSB_ADDR 0X61
|
---|
468 | #define GYRO_OFFSET_X_MSB_ADDR 0X62
|
---|
469 | #define GYRO_OFFSET_Y_LSB_ADDR 0X63
|
---|
470 | #define GYRO_OFFSET_Y_MSB_ADDR 0X64
|
---|
471 | #define GYRO_OFFSET_Z_LSB_ADDR 0X65
|
---|
472 | #define GYRO_OFFSET_Z_MSB_ADDR 0X66
|
---|
473 |
|
---|
474 | /* Radius registers*/
|
---|
475 | #define ACCEL_RADIUS_LSB_ADDR 0X67
|
---|
476 | #define ACCEL_RADIUS_MSB_ADDR 0X68
|
---|
477 | #define MAG_RADIUS_LSB_ADDR 0X69
|
---|
478 | #define MAG_RADIUS_MSB_ADDR 0X6A
|
---|
479 | /* PAGE0 REGISTERS DEFINITION END*/
|
---|
480 |
|
---|
481 | /* PAGE1 REGISTERS DEFINITION START*/
|
---|
482 | /* Configuration registers*/
|
---|
483 | #define ACCEL_CONFIG_ADDR 0X08
|
---|
484 | #define MAG_CONFIG_ADDR 0X09
|
---|
485 | #define GYRO_CONFIG_ADDR 0X0A
|
---|
486 | #define GYRO_MODE_CONFIG_ADDR 0X0B
|
---|
487 | #define ACCEL_SLEEP_CONFIG_ADDR 0X0C
|
---|
488 | #define GYRO_SLEEP_CONFIG_ADDR 0X0D
|
---|
489 | #define MAG_SLEEP_CONFIG_ADDR 0x0E
|
---|
490 |
|
---|
491 | /* Interrupt registers*/
|
---|
492 | #define INT_MASK_ADDR 0X0F
|
---|
493 | #define INT_ADDR 0X10
|
---|
494 | #define ACCEL_ANY_MOTION_THRES_ADDR 0X11
|
---|
495 | #define ACCEL_INTR_SETTINGS_ADDR 0X12
|
---|
496 | #define ACCEL_HIGH_G_DURN_ADDR 0X13
|
---|
497 | #define ACCEL_HIGH_G_THRES_ADDR 0X14
|
---|
498 | #define ACCEL_NO_MOTION_THRES_ADDR 0X15
|
---|
499 | #define ACCEL_NO_MOTION_SET_ADDR 0X16
|
---|
500 | #define GYRO_INTR_SETING_ADDR 0X17
|
---|
501 | #define GYRO_HIGHRATE_X_SET_ADDR 0X18
|
---|
502 | #define GYRO_DURN_X_ADDR 0X19
|
---|
503 | #define GYRO_HIGHRATE_Y_SET_ADDR 0X1A
|
---|
504 | #define GYRO_DURN_Y_ADDR 0X1B
|
---|
505 | #define GYRO_HIGHRATE_Z_SET_ADDR 0X1C
|
---|
506 | #define GYRO_DURN_Z_ADDR 0X1D
|
---|
507 | #define GYRO_ANY_MOTION_THRES_ADDR 0X1E
|
---|
508 | #define GYRO_ANY_MOTION_SET_ADDR 0X1F
|
---|
509 | /* PAGE1 REGISTERS DEFINITION END*/
|
---|
510 |
|
---|
511 |
|
---|
512 | #define BNO055_MDELAY_DATA_TYPE u_32
|
---|
513 |
|
---|
514 | /*< This refers BNO055 return type as s_8 */
|
---|
515 | #define BNO055_RETURN_FUNCTION_TYPE s_8
|
---|
516 |
|
---|
517 | /* Compile switch definition for Float and double*/
|
---|
518 | #define BNO055_FLOAT_ENABLE
|
---|
519 | #define BNO055_DOUBLE_ENABLE
|
---|
520 | /**************************************************************/
|
---|
521 | /**\name STRUCTURE DEFINITIONS */
|
---|
522 | /**************************************************************/
|
---|
523 | /*!
|
---|
524 | * @brief bno055 struct
|
---|
525 | */
|
---|
526 | struct bno055_t {
|
---|
527 | u_8 chip_id;/**< chip_id of bno055 */
|
---|
528 | u_16 sw_rev_id;/**< software revision id of bno055 */
|
---|
529 | u_8 page_id;/**< page_id of bno055 */
|
---|
530 | u_8 accel_rev_id;/**< accel revision id of bno055 */
|
---|
531 | u_8 mag_rev_id;/**< mag revision id of bno055 */
|
---|
532 | u_8 gyro_rev_id;/**< gyro revision id of bno055 */
|
---|
533 | u_8 bl_rev_id;/**< boot loader revision id of bno055 */
|
---|
534 | u_8 dev_addr;/**< i2c device address of bno055 */
|
---|
535 | BNO055_WR_FUNC_PTR;/**< bus write function pointer */
|
---|
536 | BNO055_RD_FUNC_PTR;/**<bus read function pointer */
|
---|
537 | void (*delay_msec)(BNO055_MDELAY_DATA_TYPE);/**< delay function pointer */
|
---|
538 | };
|
---|
539 | /*!
|
---|
540 | * @brief struct for accel data read from registers
|
---|
541 | */
|
---|
542 | struct bno055_accel_t {
|
---|
543 | s_16 x;/**< accel x data */
|
---|
544 | s_16 y;/**< accel y data */
|
---|
545 | s_16 z;/**< accel z data */
|
---|
546 | };
|
---|
547 | /*!
|
---|
548 | * @brief struct for Mag data read from registers
|
---|
549 | */
|
---|
550 | struct bno055_mag_t {
|
---|
551 | s_16 x;/**< mag x data */
|
---|
552 | s_16 y;/**< mag y data */
|
---|
553 | s_16 z;/**< mag z data */
|
---|
554 | };
|
---|
555 | /*!
|
---|
556 | * @brief struct for Gyro data read from registers
|
---|
557 | */
|
---|
558 | struct bno055_gyro_t {
|
---|
559 | s_16 x;/**< gyro x data */
|
---|
560 | s_16 y;/**< gyro y data */
|
---|
561 | s_16 z;/**< gyro z data */
|
---|
562 | };
|
---|
563 | /*!
|
---|
564 | * @brief struct for Euler data read from registers
|
---|
565 | */
|
---|
566 | struct bno055_euler_t {
|
---|
567 | s_16 h;/**< Euler h data */
|
---|
568 | s_16 r;/**< Euler r data */
|
---|
569 | s_16 p;/**< Euler p data */
|
---|
570 | };
|
---|
571 | /*!
|
---|
572 | * @brief struct for Quaternion data read from registers
|
---|
573 | */
|
---|
574 | struct bno055_quaternion_t {
|
---|
575 | s_16 w;/**< Quaternion w data */
|
---|
576 | s_16 x;/**< Quaternion x data */
|
---|
577 | s_16 y;/**< Quaternion y data */
|
---|
578 | s_16 z;/**< Quaternion z data */
|
---|
579 | };
|
---|
580 | /*!
|
---|
581 | * @brief struct for Linear Accel data read from registers
|
---|
582 | */
|
---|
583 | struct bno055_linear_accel_t {
|
---|
584 | s_16 x; /**< Linear Accel x data */
|
---|
585 | s_16 y; /**< Linear Accel y data */
|
---|
586 | s_16 z; /**< Linear Accel z data */
|
---|
587 | };
|
---|
588 | /*!
|
---|
589 | * @brief struct for Gravity data read from registers
|
---|
590 | */
|
---|
591 | struct bno055_gravity_t {
|
---|
592 | s_16 x;/**< Gravity x data */
|
---|
593 | s_16 y;/**< Gravity y data */
|
---|
594 | s_16 z;/**< Gravity z data */
|
---|
595 | };
|
---|
596 | #ifdef BNO055_DOUBLE_ENABLE
|
---|
597 | /*!
|
---|
598 | * @brief struct for Accel-output data of precision double
|
---|
599 | */
|
---|
600 | struct bno055_accel_double_t {
|
---|
601 | double x;/**< Accel x double data */
|
---|
602 | double y;/**< Accel y double data */
|
---|
603 | double z;/**< Accel z double data */
|
---|
604 | };
|
---|
605 | /*!
|
---|
606 | * @brief struct for Mag-output data of precision double
|
---|
607 | */
|
---|
608 | struct bno055_mag_double_t {
|
---|
609 | double x;/**< Mag x double data */
|
---|
610 | double y;/**< Mag y double data */
|
---|
611 | double z;/**< Mag z double data */
|
---|
612 | };
|
---|
613 | /*!
|
---|
614 | * @brief struct for Gyro-output data of precision double
|
---|
615 | */
|
---|
616 | struct bno055_gyro_double_t {
|
---|
617 | double x;/**< Gyro x double data */
|
---|
618 | double y;/**< Gyro y double data */
|
---|
619 | double z;/**< Gyro z double data */
|
---|
620 | };
|
---|
621 | /*!
|
---|
622 | * @brief struct for Euler-output data of precision double
|
---|
623 | */
|
---|
624 | struct bno055_euler_double_t {
|
---|
625 | double h;/**< Euler h double data */
|
---|
626 | double r;/**< Euler r double data */
|
---|
627 | double p;/**< Euler p double data */
|
---|
628 | };
|
---|
629 | /*!
|
---|
630 | * @brief struct for Linear Accel-output data of precision double
|
---|
631 | */
|
---|
632 | struct bno055_linear_accel_double_t {
|
---|
633 | double x;/**< linear accel x double data */
|
---|
634 | double y;/**< linear accel y double data */
|
---|
635 | double z;/**< linear accel z double data */
|
---|
636 | };
|
---|
637 | /*!
|
---|
638 | * @brief struct for Gravity-output data of precision double
|
---|
639 | */
|
---|
640 | struct bno055_gravity_double_t {
|
---|
641 | double x;/**< Gravity x double data */
|
---|
642 | double y;/**< Gravity y double data */
|
---|
643 | double z;/**< Gravity z double data */
|
---|
644 | };
|
---|
645 | #endif
|
---|
646 | #ifdef BNO055_FLOAT_ENABLE
|
---|
647 | /*!
|
---|
648 | * @brief struct for Accel-output data of precision float
|
---|
649 | */
|
---|
650 | struct bno055_accel_float_t {
|
---|
651 | float x;/**< accel x float data */
|
---|
652 | float y;/**< accel y float data */
|
---|
653 | float z;/**< accel z float data */
|
---|
654 | };
|
---|
655 | /*!
|
---|
656 | * @brief struct for Mag-output data of precision float
|
---|
657 | */
|
---|
658 | struct bno055_mag_float_t {
|
---|
659 | float x;/**< Mag x float data */
|
---|
660 | float y;/**< Mag y float data */
|
---|
661 | float z;/**< Mag z float data */
|
---|
662 | };
|
---|
663 | /*!
|
---|
664 | * @brief struct for Gyro-output data of precision float
|
---|
665 | */
|
---|
666 | struct bno055_gyro_float_t {
|
---|
667 | float x;/**< Gyro x float data */
|
---|
668 | float y;/**< Gyro y float data */
|
---|
669 | float z;/**< Gyro z float data */
|
---|
670 | };
|
---|
671 | /*!
|
---|
672 | * @brief struct for Euler-output data of precision float
|
---|
673 | */
|
---|
674 | struct bno055_euler_float_t {
|
---|
675 | float h;/**< Euler h float data */
|
---|
676 | float r;/**< Euler r float data */
|
---|
677 | float p;/**< Euler p float data */
|
---|
678 | };
|
---|
679 | /*!
|
---|
680 | * @brief struct for Linear accel-output data of precision float
|
---|
681 | */
|
---|
682 | struct bno055_linear_accel_float_t {
|
---|
683 | float x;/**< Linear accel x float data */
|
---|
684 | float y;/**< Linear accel y float data */
|
---|
685 | float z;/**< Linear accel z float data */
|
---|
686 | };
|
---|
687 | /*!
|
---|
688 | * @brief struct for Gravity-output data of precision float
|
---|
689 | */
|
---|
690 | struct bno055_gravity_float_t {
|
---|
691 | float x;/**< Gravity x float data */
|
---|
692 | float y;/**< Gravity y float data */
|
---|
693 | float z;/**< Gravity z float data */
|
---|
694 | };
|
---|
695 | #endif
|
---|
696 | /*!
|
---|
697 | * @brief struct for Accel offset
|
---|
698 | */
|
---|
699 | struct bno055_accel_offset_t {
|
---|
700 | s_16 x;/**< Accel offset x data */
|
---|
701 | s_16 y;/**< Accel offset y data */
|
---|
702 | s_16 z;/**< Accel offset z data */
|
---|
703 | s_16 r;/**< Accel radius r data */
|
---|
704 | };
|
---|
705 | /*!
|
---|
706 | * @brief struct for Gyro offset
|
---|
707 | */
|
---|
708 | struct bno055_gyro_offset_t {
|
---|
709 | s_16 x;/**< Gyro offset x data */
|
---|
710 | s_16 y;/**< Gyro offset y data */
|
---|
711 | s_16 z;/**< Gyro offset z data */
|
---|
712 | };
|
---|
713 | /*!
|
---|
714 | * @brief struct for Mag offset
|
---|
715 | */
|
---|
716 | struct bno055_mag_offset_t {
|
---|
717 | s_16 x;/**< Mag offset x data */
|
---|
718 | s_16 y;/**< Mag offset y data */
|
---|
719 | s_16 z;/**< Mag offset z data */
|
---|
720 | s_16 r;/**< Mag radius x data */
|
---|
721 | };
|
---|
722 | /*!
|
---|
723 | * @brief struct for soft iron calibration matrix
|
---|
724 | */
|
---|
725 | struct bno055_sic_matrix_t {
|
---|
726 | s_16 sic_0;/**< soft iron calibration matrix 0 data */
|
---|
727 | s_16 sic_1;/**< soft iron calibration matrix 1 data */
|
---|
728 | s_16 sic_2;/**< soft iron calibration matrix 2 data */
|
---|
729 | s_16 sic_3;/**< soft iron calibration matrix 3 data */
|
---|
730 | s_16 sic_4;/**< soft iron calibration matrix 4 data */
|
---|
731 | s_16 sic_5;/**< soft iron calibration matrix 5 data */
|
---|
732 | s_16 sic_6;/**< soft iron calibration matrix 6 data */
|
---|
733 | s_16 sic_7;/**< soft iron calibration matrix 7 data */
|
---|
734 | s_16 sic_8;/**< soft iron calibration matrix 8 data */
|
---|
735 | };
|
---|
736 | /***************************************************/
|
---|
737 | /**\name CONSTANT DEFINITIONS */
|
---|
738 | /***************************************************/
|
---|
739 | #define BNO055_ZERO_U8X ((u_8)0)
|
---|
740 | #define BNO055_ONE_U8X ((u_8)1)
|
---|
741 | #define BNO055_TWO_U8X ((u_8)2)
|
---|
742 | #define BNO055_FOUR_U8X ((u_8)4)
|
---|
743 | #define BNO055_FIVE_U8X ((u_8)5)
|
---|
744 | #define BNO055_SIX_U8X ((u_8)6)
|
---|
745 | #define BNO055_SEVEN_U8X ((u_8)7)
|
---|
746 | #define BNO055_ELEVEN_U8X ((u_8)11)
|
---|
747 | #define BNO055_SIXTEEN_U8X ((u_8)16)
|
---|
748 | #define BNO055_EIGHT_U8X ((u_8)8)
|
---|
749 | #define BNO055_TWENTY_U8X ((u_8)20)
|
---|
750 | #define BNO055_EIGHTEEN_U8X ((u_8)18)
|
---|
751 |
|
---|
752 |
|
---|
753 | #define BNO055_SHIFT_8_POSITION ((u_8)8)
|
---|
754 |
|
---|
755 |
|
---|
756 | /* BNO055 API error codes */
|
---|
757 | #define E_NULL_PTR ((s_8)-127)
|
---|
758 | #define E_BNO055_OUT_OF_RANGE ((s_8)-2)
|
---|
759 | #define SUCCESS ((u_8)0)
|
---|
760 | #define ERROR_BOSCH ((s_8)-1)
|
---|
761 |
|
---|
762 | /* Selection for bit enable and disable */
|
---|
763 | #define ENABLED 0x01
|
---|
764 | #define DISABLED 0x00
|
---|
765 |
|
---|
766 | /* Page ID */
|
---|
767 | #define PAGE_ZERO 0X00
|
---|
768 | #define PAGE_ONE 0X01
|
---|
769 |
|
---|
770 | /* Enable the temperature source */
|
---|
771 | #define ACCEL_TEMP_EN 0x00
|
---|
772 | #define GYRO_TEMP_EN 0x01
|
---|
773 | #define MCU_TEMP_EN 0x03
|
---|
774 |
|
---|
775 | /*Accel unit*/
|
---|
776 | #define ACCEL_UNIT_MSQ 0x00
|
---|
777 | #define ACCEL_UNIT_MG 0x01
|
---|
778 |
|
---|
779 | /*Gyro unit*/
|
---|
780 | #define GYRO_UNIT_DPS 0x00
|
---|
781 | #define GYRO_UNIT_RPS 0x01
|
---|
782 |
|
---|
783 | /* Euler unit*/
|
---|
784 | #define EULER_UNIT_DEG 0x00
|
---|
785 | #define EULER_UNIT_RAD 0x01
|
---|
786 |
|
---|
787 | /*Temperature unit*/
|
---|
788 | #define TEMP_UNIT_CELSIUS 0x00
|
---|
789 | #define TEMP_UNIT_FAHRENHEIT 0x01
|
---|
790 |
|
---|
791 | /*Accel division factor*/
|
---|
792 | #define ACCEL_DIV_MSQ 100.0
|
---|
793 | #define ACCEL_DIV_MG 1
|
---|
794 |
|
---|
795 | /*Mag division factor*/
|
---|
796 | #define MAG_DIV_UT 16.0
|
---|
797 |
|
---|
798 | /*Gyro division factor*/
|
---|
799 | #define GYRO_DIV_DPS 16.0
|
---|
800 | #define GYRO_DIV_RPS 900.0
|
---|
801 |
|
---|
802 | /*Euler division factor*/
|
---|
803 | #define EULER_DIV_DEG 16.0
|
---|
804 | #define EULER_DIV_RAD 900.0
|
---|
805 |
|
---|
806 | /*Linear accel division factor*/
|
---|
807 | #define LINEAR_ACCEL_DIV_MSQ 100.0
|
---|
808 |
|
---|
809 | /*Gravity accel division factor*/
|
---|
810 | #define GRAVITY_DIV_MSQ 100.0
|
---|
811 |
|
---|
812 | /* Temperature division factor*/
|
---|
813 | #define TEMP_DIV_FAHRENHEIT 0.5
|
---|
814 | #define TEMP_DIV_CELSIUS 1
|
---|
815 |
|
---|
816 | #define BNO055_SIX_HUNDRES_U8X 600
|
---|
817 |
|
---|
818 |
|
---|
819 |
|
---|
820 | /* Operation mode settings*/
|
---|
821 | #define OPERATION_MODE_CONFIG 0X00
|
---|
822 | #define OPERATION_MODE_ACCONLY 0X01
|
---|
823 | #define OPERATION_MODE_MAGONLY 0X02
|
---|
824 | #define OPERATION_MODE_GYRONLY 0X03
|
---|
825 | #define OPERATION_MODE_ACCMAG 0X04
|
---|
826 | #define OPERATION_MODE_ACCGYRO 0X05
|
---|
827 | #define OPERATION_MODE_MAGGYRO 0X06
|
---|
828 | #define OPERATION_MODE_AMG 0X07
|
---|
829 | #define OPERATION_MODE_IMUPLUS 0X08
|
---|
830 | #define OPERATION_MODE_COMPASS 0X09
|
---|
831 | #define OPERATION_MODE_M4G 0X0A
|
---|
832 | #define OPERATION_MODE_NDOF_FMC_OFF 0X0B
|
---|
833 | #define OPERATION_MODE_NDOF 0X0C
|
---|
834 |
|
---|
835 | /* Power mode*/
|
---|
836 | #define POWER_MODE_NORMAL 0X00
|
---|
837 | #define POWER_MODE_LOWPOWER 0X01
|
---|
838 | #define POWER_MODE_SUSPEND 0X02
|
---|
839 |
|
---|
840 | /* PAGE-1 definitions*/
|
---|
841 | /* Accel Range */
|
---|
842 |
|
---|
843 | #define ACCEL_RANGE_2G 0X00
|
---|
844 | #define ACCEL_RANGE_4G 0X01
|
---|
845 | #define ACCEL_RANGE_8G 0X02
|
---|
846 | #define ACCEL_RANGE_16G 0X03
|
---|
847 |
|
---|
848 | /* Accel Bandwidth*/
|
---|
849 | #define ACCEL_BW_7_81HZ 0x00
|
---|
850 | #define ACCEL_BW_15_63HZ 0x01
|
---|
851 | #define ACCEL_BW_31_25HZ 0x02
|
---|
852 | #define ACCEL_BW_62_5HZ 0X03
|
---|
853 | #define ACCEL_BW_125HZ 0X04
|
---|
854 | #define ACCEL_BW_250HZ 0X05
|
---|
855 | #define ACCEL_BW_500HZ 0X06
|
---|
856 | #define ACCEL_BW_1000HZ 0X07
|
---|
857 |
|
---|
858 | /* Accel Power mode*/
|
---|
859 | #define ACCEL_NORMAL 0X00
|
---|
860 | #define ACCEL_SUSPEND 0X01
|
---|
861 | #define ACCEL_LOWPOWER_1 0X02
|
---|
862 | #define ACCEL_STANDBY 0X03
|
---|
863 | #define ACCEL_LOWPOWER_2 0X04
|
---|
864 | #define ACCEL_DEEPSUSPEND 0X05
|
---|
865 |
|
---|
866 | /* Mag data output rate*/
|
---|
867 | #define MAG_DATA_OUTRATE_2HZ 0X00
|
---|
868 | #define MAG_DATA_OUTRATE_6HZ 0X01
|
---|
869 | #define MAG_DATA_OUTRATE_8HZ 0X02
|
---|
870 | #define MAG_DATA_OUTRATE_10HZ 0X03
|
---|
871 | #define MAG_DATA_OUTRATE_15HZ 0X04
|
---|
872 | #define MAG_DATA_OUTRATE_20HZ 0X05
|
---|
873 | #define MAG_DATA_OUTRATE_25HZ 0X06
|
---|
874 | #define MAG_DATA_OUTRATE_30HZ 0X07
|
---|
875 |
|
---|
876 | /* Mag Operation mode*/
|
---|
877 | #define MAG_OPERATION_MODE_LOWPOWER 0X00
|
---|
878 | #define MAG_OPERATION_MODE_REGULAR 0X01
|
---|
879 | #define MAG_OPERATION_MODE_ENHANCED_REGULAR 0X02
|
---|
880 | #define MAG_OPERATION_MODE_HIGH_ACCURACY 0X03
|
---|
881 |
|
---|
882 | /* Mag power mode*/
|
---|
883 | #define MAG_POWER_MODE_NORMAL 0X00
|
---|
884 | #define MAG_POWER_MODE_SLEEP 0X01
|
---|
885 | #define MAG_POWER_MODE_SUSPEND 0X02
|
---|
886 | #define MAG_POWER_MODE_FORCE_MODE 0X03
|
---|
887 |
|
---|
888 | /* Gyro range*/
|
---|
889 | #define GYRO_RANGE_2000DPS 0x00
|
---|
890 | #define GYRO_RANGE_1000DPS 0x01
|
---|
891 | #define GYRO_RANGE_500DPS 0x02
|
---|
892 | #define GYRO_RANGE_250DPS 0x03
|
---|
893 | #define GYRO_RANGE_125DPS 0x04
|
---|
894 |
|
---|
895 | /* Gyro Bandwidth*/
|
---|
896 | #define GYRO_BW_523HZ 0x00
|
---|
897 | #define GYRO_BW_230HZ 0x01
|
---|
898 | #define GYRO_BW_116HZ 0x02
|
---|
899 | #define GYRO_BW_47HZ 0x03
|
---|
900 | #define GYRO_BW_23HZ 0x04
|
---|
901 | #define GYRO_BW_12HZ 0x05
|
---|
902 | #define GYRO_BW_64HZ 0x06
|
---|
903 | #define GYRO_BW_32HZ 0x07
|
---|
904 |
|
---|
905 | /* Gyro power mode*/
|
---|
906 | #define GYRO_POWER_MODE_NORMAL 0X00
|
---|
907 | #define GYRO_POWER_MODE_FASTPOWERUP 0X01
|
---|
908 | #define GYRO_POWER_MODE_DEEPSUSPEND 0X02
|
---|
909 | #define GYRO_POWER_MODE_SUSPEND 0X03
|
---|
910 | #define GYRO_POWER_MODE_ADVANCE_POWERSAVE 0X04
|
---|
911 |
|
---|
912 | /* Accel Sleep Duration */
|
---|
913 | #define BNO055_ACCEL_SLEEP_DURN_0_5MS 0x05
|
---|
914 | /* sets sleep duration to 0.5 ms */
|
---|
915 | #define BNO055_ACCEL_SLEEP_DURN_1MS 0x06
|
---|
916 | /* sets sleep duration to 1 ms */
|
---|
917 | #define BNO055_ACCEL_SLEEP_DURN_2MS 0x07
|
---|
918 | /* sets sleep duration to 2 ms */
|
---|
919 | #define BNO055_ACCEL_SLEEP_DURN_4MS 0x08
|
---|
920 | /* sets sleep duration to 4 ms */
|
---|
921 | #define BNO055_ACCEL_SLEEP_DURN_6MS 0x09
|
---|
922 | /* sets sleep duration to 6 ms*/
|
---|
923 | #define BNO055_ACCEL_SLEEP_DURN_10MS 0x0A
|
---|
924 | /* sets sleep duration to 10 ms */
|
---|
925 | #define BNO055_ACCEL_SLEEP_DURN_25MS 0x0B
|
---|
926 | /* sets sleep duration to 25 ms */
|
---|
927 | #define BNO055_ACCEL_SLEEP_DURN_50MS 0x0C
|
---|
928 | /* sets sleep duration to 50 ms */
|
---|
929 | #define BNO055_ACCEL_SLEEP_DURN_100MS 0x0D
|
---|
930 | /* sets sleep duration to 100 ms */
|
---|
931 | #define BNO055_ACCEL_SLEEP_DURN_500MS 0x0E
|
---|
932 | /* sets sleep duration to 500 ms */
|
---|
933 | #define BNO055_ACCEL_SLEEP_DURN_1S 0x0F
|
---|
934 | /* sets sleep duration to 1 s */
|
---|
935 |
|
---|
936 | /* Gyro Auto sleep duration*/
|
---|
937 | #define BNO055_GYRO_No_AUTOSLPDUR 0x00
|
---|
938 | #define BNO055_GYRO_4MS_AUTOSLPDUR 0x01
|
---|
939 | #define BNO055_GYRO_5MS_AUTOSLPDUR 0x02
|
---|
940 | #define BNO055_GYRO_8MS_AUTOSLPDUR 0x03
|
---|
941 | #define BNO055_GYRO_10MS_AUTOSLPDUR 0x04
|
---|
942 | #define BNO055_GYRO_15MS_AUTOSLPDUR 0x05
|
---|
943 | #define BNO055_GYRO_20MS_AUTOSLPDUR 0x06
|
---|
944 | #define BNO055_GYRO_40MS_AUTOSLPDUR 0x07
|
---|
945 |
|
---|
946 | /* Accel Any/No motion axis selection*/
|
---|
947 | #define BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS 0
|
---|
948 | #define BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS 1
|
---|
949 | #define BNO055_ACCEL_ANY_MOTION_NO_MOTION_Z_AXIS 2
|
---|
950 |
|
---|
951 | /* Accel High g axis selection*/
|
---|
952 | #define BNO055_ACCEL_HIGH_G_X_AXIS 0
|
---|
953 | #define BNO055_ACCEL_HIGH_G_Y_AXIS 1
|
---|
954 | #define BNO055_ACCEL_HIGH_G_Z_AXIS 2
|
---|
955 |
|
---|
956 | /* Gyro Any motion axis selection*/
|
---|
957 | #define BNO055_GYRO_ANY_MOTION_X_AXIS 0
|
---|
958 | #define BNO055_GYRO_ANY_MOTION_Y_AXIS 1
|
---|
959 | #define BNO055_GYRO_ANY_MOTION_Z_AXIS 2
|
---|
960 |
|
---|
961 |
|
---|
962 | /* Gyro High rate axis selection*/
|
---|
963 | #define BNO055_GYRO_HIGHRATE_X_AXIS 0
|
---|
964 | #define BNO055_GYRO_HIGHRATE_Y_AXIS 1
|
---|
965 | #define BNO055_GYRO_HIGHRATE_Z_AXIS 2
|
---|
966 |
|
---|
967 | /* Axis remap values*/
|
---|
968 | #define REMAP_X_Y 0X21
|
---|
969 | #define REMAP_Y_Z 0X18
|
---|
970 | #define REMAP_Z_X 0X06
|
---|
971 | #define REMAP_X_Y_Z_TYPE0 0X12
|
---|
972 | #define REMAP_X_Y_Z_TYPE1 0X09
|
---|
973 | #define DEFAULT_AXIS 0X24
|
---|
974 |
|
---|
975 | /* Axis remap sign */
|
---|
976 | #define REMAP_AXIS_POSITIVE 0X00
|
---|
977 | #define REMAP_AXIS_NEGATIVE 0X01
|
---|
978 |
|
---|
979 | /* Gyro anymotion and high rate filter configuration */
|
---|
980 | #define FILTERED 0x00
|
---|
981 | #define UNFILTERED 0x01
|
---|
982 |
|
---|
983 | /* mask definitions*/
|
---|
984 | #define BNO055_SIC_HEX_0_0_F_F_DATA 0x00FF
|
---|
985 | /****************************************************/
|
---|
986 | /**\name ARRAY SIZE DEFINITIONS */
|
---|
987 | /***************************************************/
|
---|
988 | #define ARRAY_SIZE_TWO 2
|
---|
989 | #define ARRAY_SIZE_THREE 3
|
---|
990 | #define ARRAY_SIZE_SIX 6
|
---|
991 | #define ARRAY_SIZE_FIVE 5
|
---|
992 | #define ARRAY_SIZE_EIGHT 8
|
---|
993 | #define ARRAY_SIZE_TWELVE 12
|
---|
994 | #define ARRAY_SIZE_FOURTEEN 14
|
---|
995 | #define ARRAY_SIZE_EIGHTEEN 18
|
---|
996 | #define ARRAY_SIZE_TWENTY_SIX 26
|
---|
997 |
|
---|
998 | #define INDEX_ZERO 0
|
---|
999 | #define INDEX_ONE 1
|
---|
1000 | #define INDEX_TWO 2
|
---|
1001 | #define INDEX_THREE 3
|
---|
1002 | #define INDEX_FOUR 4
|
---|
1003 | #define INDEX_FIVE 5
|
---|
1004 | #define INDEX_SIX 6
|
---|
1005 | #define INDEX_SEVEN 7
|
---|
1006 | #define INDEX_EIGHT 8
|
---|
1007 | #define INDEX_NINE 9
|
---|
1008 | #define INDEX_TEN 10
|
---|
1009 | #define INDEX_ELEVEN 11
|
---|
1010 | #define INDEX_TWELVE 12
|
---|
1011 | #define INDEX_THIRTEEN 13
|
---|
1012 | #define INDEX_FOURTEEN 14
|
---|
1013 | #define INDEX_FIVETEEN 15
|
---|
1014 | #define INDEX_SIXTEEN 16
|
---|
1015 | #define INDEX_SEVENTEEN 17
|
---|
1016 | #define INDEX_EIGHTEEN 18
|
---|
1017 | #define INDEX_NINETEEN 19
|
---|
1018 | #define INDEX_TWENTY 20
|
---|
1019 | #define INDEX_TWENTY_ONE 21
|
---|
1020 | #define INDEX_TWENTY_TWO 22
|
---|
1021 | #define INDEX_TWENTY_THREE 23
|
---|
1022 | #define INDEX_TWENTY_FIVE 25
|
---|
1023 | /****************************************************/
|
---|
1024 | /**\name ARRAY PARAMETERS */
|
---|
1025 | /***************************************************/
|
---|
1026 | #define LSB_ZERO 0
|
---|
1027 | #define MSB_ONE 1
|
---|
1028 | #define LSB_TWO 2
|
---|
1029 | #define MSB_THREE 3
|
---|
1030 | #define LSB_FOUR 4
|
---|
1031 | #define MSB_FIVE 5
|
---|
1032 | #define LSB_SIX 6
|
---|
1033 | #define MSB_SEVEN 7
|
---|
1034 | /*********************************************************/
|
---|
1035 | /**\name PAGE0 DATA REGISTERS DEFINITION */
|
---|
1036 | /*********************************************************/
|
---|
1037 | /* Chip ID */
|
---|
1038 | #define BNO055_CHIP_ID__POS 0
|
---|
1039 | #define BNO055_CHIP_ID__MSK 0xFF
|
---|
1040 | #define BNO055_CHIP_ID__LEN 8
|
---|
1041 | #define BNO055_CHIP_ID__REG BNO055_CHIP_ID_ADDR
|
---|
1042 |
|
---|
1043 | /* Accel revision id*/
|
---|
1044 | #define BNO055_ACCEL_REV_ID__POS 0
|
---|
1045 | #define BNO055_ACCEL_REV_ID__MSK 0xFF
|
---|
1046 | #define BNO055_ACCEL_REV_ID__LEN 8
|
---|
1047 | #define BNO055_ACCEL_REV_ID__REG BNO055_ACCEL_REV_ID_ADDR
|
---|
1048 |
|
---|
1049 | /* Mag revision id*/
|
---|
1050 | #define BNO055_MAG_REV_ID__POS 0
|
---|
1051 | #define BNO055_MAG_REV_ID__MSK 0xFF
|
---|
1052 | #define BNO055_MAG_REV_ID__LEN 8
|
---|
1053 | #define BNO055_MAG_REV_ID__REG BNO055_MAG_REV_ID_ADDR
|
---|
1054 |
|
---|
1055 | /* Gyro revision id*/
|
---|
1056 | #define BNO055_GYRO_REV_ID__POS 0
|
---|
1057 | #define BNO055_GYRO_REV_ID__MSK 0xFF
|
---|
1058 | #define BNO055_GYRO_REV_ID__LEN 8
|
---|
1059 | #define BNO055_GYRO_REV_ID__REG BNO055_GYRO_REV_ID_ADDR
|
---|
1060 |
|
---|
1061 | /*Software revision id LSB*/
|
---|
1062 | #define BNO055_SW_REV_ID_LSB__POS 0
|
---|
1063 | #define BNO055_SW_REV_ID_LSB__MSK 0xFF
|
---|
1064 | #define BNO055_SW_REV_ID_LSB__LEN 8
|
---|
1065 | #define BNO055_SW_REV_ID_LSB__REG BNO055_SW_REV_ID_LSB_ADDR
|
---|
1066 |
|
---|
1067 | /*Software revision id MSB*/
|
---|
1068 | #define BNO055_SW_REV_ID_MSB__POS 0
|
---|
1069 | #define BNO055_SW_REV_ID_MSB__MSK 0xFF
|
---|
1070 | #define BNO055_SW_REV_ID_MSB__LEN 8
|
---|
1071 | #define BNO055_SW_REV_ID_MSB__REG BNO055_SW_REV_ID_MSB_ADDR
|
---|
1072 |
|
---|
1073 | /* BOOTLODER revision id*/
|
---|
1074 | #define BNO055_BL_REV_ID__POS 0
|
---|
1075 | #define BNO055_BL_REV_ID__MSK 0xFF
|
---|
1076 | #define BNO055_BL_REV_ID__LEN 8
|
---|
1077 | #define BNO055_BL_REV_ID__REG BNO055_BL_REV_ID_ADDR
|
---|
1078 |
|
---|
1079 | /*Page id*/
|
---|
1080 | #define BNO055_PAGE_ID__POS 0
|
---|
1081 | #define BNO055_PAGE_ID__MSK 0xFF
|
---|
1082 | #define BNO055_PAGE_ID__LEN 8
|
---|
1083 | #define BNO055_PAGE_ID__REG BNO055_PAGE_ID_ADDR
|
---|
1084 |
|
---|
1085 | /* Accel data X-LSB register*/
|
---|
1086 | #define BNO055_ACCEL_DATA_X_LSB_VALUEX__POS 0
|
---|
1087 | #define BNO055_ACCEL_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1088 | #define BNO055_ACCEL_DATA_X_LSB_VALUEX__LEN 8
|
---|
1089 | #define BNO055_ACCEL_DATA_X_LSB_VALUEX__REG \
|
---|
1090 | BNO055_ACCEL_DATA_X_LSB_ADDR
|
---|
1091 |
|
---|
1092 | /* Accel data X-MSB register*/
|
---|
1093 | #define BNO055_ACCEL_DATA_X_MSB_VALUEX__POS 0
|
---|
1094 | #define BNO055_ACCEL_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1095 | #define BNO055_ACCEL_DATA_X_MSB_VALUEX__LEN 8
|
---|
1096 | #define BNO055_ACCEL_DATA_X_MSB_VALUEX__REG \
|
---|
1097 | BNO055_ACCEL_DATA_X_MSB_ADDR
|
---|
1098 |
|
---|
1099 | /* Accel data Y-LSB register*/
|
---|
1100 | #define BNO055_ACCEL_DATA_Y_LSB_VALUEY__POS 0
|
---|
1101 | #define BNO055_ACCEL_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1102 | #define BNO055_ACCEL_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1103 | #define BNO055_ACCEL_DATA_Y_LSB_VALUEY__REG \
|
---|
1104 | BNO055_ACCEL_DATA_Y_LSB_ADDR
|
---|
1105 |
|
---|
1106 | /* Accel data Y-MSB register*/
|
---|
1107 | #define BNO055_ACCEL_DATA_Y_MSB_VALUEY__POS 0
|
---|
1108 | #define BNO055_ACCEL_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1109 | #define BNO055_ACCEL_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1110 | #define BNO055_ACCEL_DATA_Y_MSB_VALUEY__REG \
|
---|
1111 | BNO055_ACCEL_DATA_Y_MSB_ADDR
|
---|
1112 |
|
---|
1113 | /* Accel data Z-LSB register*/
|
---|
1114 | #define BNO055_ACCEL_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1115 | #define BNO055_ACCEL_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1116 | #define BNO055_ACCEL_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1117 | #define BNO055_ACCEL_DATA_Z_LSB_VALUEZ__REG \
|
---|
1118 | BNO055_ACCEL_DATA_Z_LSB_ADDR
|
---|
1119 |
|
---|
1120 | /* Accel data Z-MSB register*/
|
---|
1121 | #define BNO055_ACCEL_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1122 | #define BNO055_ACCEL_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1123 | #define BNO055_ACCEL_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1124 | #define BNO055_ACCEL_DATA_Z_MSB_VALUEZ__REG \
|
---|
1125 | BNO055_ACCEL_DATA_Z_MSB_ADDR
|
---|
1126 |
|
---|
1127 | /* Mag data X-LSB register*/
|
---|
1128 | #define BNO055_MAG_DATA_X_LSB_VALUEX__POS 0
|
---|
1129 | #define BNO055_MAG_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1130 | #define BNO055_MAG_DATA_X_LSB_VALUEX__LEN 8
|
---|
1131 | #define BNO055_MAG_DATA_X_LSB_VALUEX__REG \
|
---|
1132 | BNO055_MAG_DATA_X_LSB_ADDR
|
---|
1133 |
|
---|
1134 | /* Mag data X-MSB register*/
|
---|
1135 | #define BNO055_MAG_DATA_X_MSB_VALUEX__POS 0
|
---|
1136 | #define BNO055_MAG_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1137 | #define BNO055_MAG_DATA_X_MSB_VALUEX__LEN 8
|
---|
1138 | #define BNO055_MAG_DATA_X_MSB_VALUEX__REG BNO055_MAG_DATA_X_MSB_ADDR
|
---|
1139 |
|
---|
1140 | /* Mag data Y-LSB register*/
|
---|
1141 | #define BNO055_MAG_DATA_Y_LSB_VALUEY__POS 0
|
---|
1142 | #define BNO055_MAG_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1143 | #define BNO055_MAG_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1144 | #define BNO055_MAG_DATA_Y_LSB_VALUEY__REG BNO055_MAG_DATA_Y_LSB_ADDR
|
---|
1145 |
|
---|
1146 | /* Mag data Y-MSB register*/
|
---|
1147 | #define BNO055_MAG_DATA_Y_MSB_VALUEY__POS 0
|
---|
1148 | #define BNO055_MAG_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1149 | #define BNO055_MAG_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1150 | #define BNO055_MAG_DATA_Y_MSB_VALUEY__REG BNO055_MAG_DATA_Y_MSB_ADDR
|
---|
1151 |
|
---|
1152 | /* Mag data Z-LSB register*/
|
---|
1153 | #define BNO055_MAG_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1154 | #define BNO055_MAG_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1155 | #define BNO055_MAG_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1156 | #define BNO055_MAG_DATA_Z_LSB_VALUEZ__REG BNO055_MAG_DATA_Z_LSB_ADDR
|
---|
1157 |
|
---|
1158 | /* Mag data Z-MSB register*/
|
---|
1159 | #define BNO055_MAG_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1160 | #define BNO055_MAG_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1161 | #define BNO055_MAG_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1162 | #define BNO055_MAG_DATA_Z_MSB_VALUEZ__REG BNO055_MAG_DATA_Z_MSB_ADDR
|
---|
1163 |
|
---|
1164 | /* Gyro data X-LSB register*/
|
---|
1165 | #define BNO055_GYRO_DATA_X_LSB_VALUEX__POS 0
|
---|
1166 | #define BNO055_GYRO_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1167 | #define BNO055_GYRO_DATA_X_LSB_VALUEX__LEN 8
|
---|
1168 | #define BNO055_GYRO_DATA_X_LSB_VALUEX__REG BNO055_GYRO_DATA_X_LSB_ADDR
|
---|
1169 |
|
---|
1170 | /* Gyro data X-MSB register*/
|
---|
1171 | #define BNO055_GYRO_DATA_X_MSB_VALUEX__POS 0
|
---|
1172 | #define BNO055_GYRO_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1173 | #define BNO055_GYRO_DATA_X_MSB_VALUEX__LEN 8
|
---|
1174 | #define BNO055_GYRO_DATA_X_MSB_VALUEX__REG BNO055_GYRO_DATA_X_MSB_ADDR
|
---|
1175 |
|
---|
1176 | /* Gyro data Y-LSB register*/
|
---|
1177 | #define BNO055_GYRO_DATA_Y_LSB_VALUEY__POS 0
|
---|
1178 | #define BNO055_GYRO_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1179 | #define BNO055_GYRO_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1180 | #define BNO055_GYRO_DATA_Y_LSB_VALUEY__REG BNO055_GYRO_DATA_Y_LSB_ADDR
|
---|
1181 |
|
---|
1182 | /* Gyro data Y-MSB register*/
|
---|
1183 | #define BNO055_GYRO_DATA_Y_MSB_VALUEY__POS 0
|
---|
1184 | #define BNO055_GYRO_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1185 | #define BNO055_GYRO_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1186 | #define BNO055_GYRO_DATA_Y_MSB_VALUEY__REG BNO055_GYRO_DATA_Y_MSB_ADDR
|
---|
1187 |
|
---|
1188 | /* Gyro data Z-LSB register*/
|
---|
1189 | #define BNO055_GYRO_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1190 | #define BNO055_GYRO_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1191 | #define BNO055_GYRO_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1192 | #define BNO055_GYRO_DATA_Z_LSB_VALUEZ__REG BNO055_GYRO_DATA_Z_LSB_ADDR
|
---|
1193 |
|
---|
1194 | /* Gyro data Z-MSB register*/
|
---|
1195 | #define BNO055_GYRO_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1196 | #define BNO055_GYRO_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1197 | #define BNO055_GYRO_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1198 | #define BNO055_GYRO_DATA_Z_MSB_VALUEZ__REG BNO055_GYRO_DATA_Z_MSB_ADDR
|
---|
1199 |
|
---|
1200 | /* Euler data HEADING-LSB register*/
|
---|
1201 | #define BNO055_EULER_H_LSB_VALUEH__POS 0
|
---|
1202 | #define BNO055_EULER_H_LSB_VALUEH__MSK 0xFF
|
---|
1203 | #define BNO055_EULER_H_LSB_VALUEH__LEN 8
|
---|
1204 | #define BNO055_EULER_H_LSB_VALUEH__REG BNO055_EULER_H_LSB_ADDR
|
---|
1205 |
|
---|
1206 | /* Euler data HEADING-MSB register*/
|
---|
1207 | #define BNO055_EULER_H_MSB_VALUEH__POS 0
|
---|
1208 | #define BNO055_EULER_H_MSB_VALUEH__MSK 0xFF
|
---|
1209 | #define BNO055_EULER_H_MSB_VALUEH__LEN 8
|
---|
1210 | #define BNO055_EULER_H_MSB_VALUEH__REG BNO055_EULER_H_MSB_ADDR
|
---|
1211 |
|
---|
1212 | /* Euler data ROLL-LSB register*/
|
---|
1213 | #define BNO055_EULER_R_LSB_VALUER__POS 0
|
---|
1214 | #define BNO055_EULER_R_LSB_VALUER__MSK 0xFF
|
---|
1215 | #define BNO055_EULER_R_LSB_VALUER__LEN 8
|
---|
1216 | #define BNO055_EULER_R_LSB_VALUER__REG BNO055_EULER_R_LSB_ADDR
|
---|
1217 |
|
---|
1218 | /* Euler data ROLL-MSB register*/
|
---|
1219 | #define BNO055_EULER_R_MSB_VALUER__POS 0
|
---|
1220 | #define BNO055_EULER_R_MSB_VALUER__MSK 0xFF
|
---|
1221 | #define BNO055_EULER_R_MSB_VALUER__LEN 8
|
---|
1222 | #define BNO055_EULER_R_MSB_VALUER__REG BNO055_EULER_R_MSB_ADDR
|
---|
1223 |
|
---|
1224 | /* Euler data PITCH-LSB register*/
|
---|
1225 | #define BNO055_EULER_P_LSB_VALUEP__POS 0
|
---|
1226 | #define BNO055_EULER_P_LSB_VALUEP__MSK 0xFF
|
---|
1227 | #define BNO055_EULER_P_LSB_VALUEP__LEN 8
|
---|
1228 | #define BNO055_EULER_P_LSB_VALUEP__REG BNO055_EULER_P_LSB_ADDR
|
---|
1229 |
|
---|
1230 | /* Euler data HEADING-MSB register*/
|
---|
1231 | #define BNO055_EULER_P_MSB_VALUEP__POS 0
|
---|
1232 | #define BNO055_EULER_P_MSB_VALUEP__MSK 0xFF
|
---|
1233 | #define BNO055_EULER_P_MSB_VALUEP__LEN 8
|
---|
1234 | #define BNO055_EULER_P_MSB_VALUEP__REG BNO055_EULER_P_MSB_ADDR
|
---|
1235 |
|
---|
1236 | /* Quaternion data W-LSB register*/
|
---|
1237 | #define BNO055_QUATERNION_DATA_W_LSB_VALUEW__POS 0
|
---|
1238 | #define BNO055_QUATERNION_DATA_W_LSB_VALUEW__MSK 0xFF
|
---|
1239 | #define BNO055_QUATERNION_DATA_W_LSB_VALUEW__LEN 8
|
---|
1240 | #define BNO055_QUATERNION_DATA_W_LSB_VALUEW__REG \
|
---|
1241 | BNO055_QUATERNION_DATA_W_LSB_ADDR
|
---|
1242 |
|
---|
1243 | /* Quaternion data W-MSB register*/
|
---|
1244 | #define BNO055_QUATERNION_DATA_W_MSB_VALUEW__POS 0
|
---|
1245 | #define BNO055_QUATERNION_DATA_W_MSB_VALUEW__MSK 0xFF
|
---|
1246 | #define BNO055_QUATERNION_DATA_W_MSB_VALUEW__LEN 8
|
---|
1247 | #define BNO055_QUATERNION_DATA_W_MSB_VALUEW__REG \
|
---|
1248 | BNO055_QUATERNION_DATA_W_MSB_ADDR
|
---|
1249 |
|
---|
1250 | /* Quaternion data X-LSB register*/
|
---|
1251 | #define BNO055_QUATERNION_DATA_X_LSB_VALUEX__POS 0
|
---|
1252 | #define BNO055_QUATERNION_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1253 | #define BNO055_QUATERNION_DATA_X_LSB_VALUEX__LEN 8
|
---|
1254 | #define BNO055_QUATERNION_DATA_X_LSB_VALUEX__REG \
|
---|
1255 | BNO055_QUATERNION_DATA_X_LSB_ADDR
|
---|
1256 |
|
---|
1257 | /* Quaternion data X-MSB register*/
|
---|
1258 | #define BNO055_QUATERNION_DATA_X_MSB_VALUEX__POS 0
|
---|
1259 | #define BNO055_QUATERNION_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1260 | #define BNO055_QUATERNION_DATA_X_MSB_VALUEX__LEN 8
|
---|
1261 | #define BNO055_QUATERNION_DATA_X_MSB_VALUEX__REG \
|
---|
1262 | BNO055_QUATERNION_DATA_X_MSB_ADDR
|
---|
1263 |
|
---|
1264 | /* Quaternion data Y-LSB register*/
|
---|
1265 | #define BNO055_QUATERNION_DATA_Y_LSB_VALUEY__POS 0
|
---|
1266 | #define BNO055_QUATERNION_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1267 | #define BNO055_QUATERNION_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1268 | #define BNO055_QUATERNION_DATA_Y_LSB_VALUEY__REG \
|
---|
1269 | BNO055_QUATERNION_DATA_Y_LSB_ADDR
|
---|
1270 |
|
---|
1271 | /* Quaternion data Y-MSB register*/
|
---|
1272 | #define BNO055_QUATERNION_DATA_Y_MSB_VALUEY__POS 0
|
---|
1273 | #define BNO055_QUATERNION_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1274 | #define BNO055_QUATERNION_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1275 | #define BNO055_QUATERNION_DATA_Y_MSB_VALUEY__REG \
|
---|
1276 | NO055_QUATERNION_DATA_Y_MSB_ADDR
|
---|
1277 |
|
---|
1278 | /* Quaternion data Z-LSB register*/
|
---|
1279 | #define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1280 | #define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1281 | #define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1282 | #define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ__REG \
|
---|
1283 | BNO055_QUATERNION_DATA_Z_LSB_ADDR
|
---|
1284 |
|
---|
1285 | /* Quaternion data Z-MSB register*/
|
---|
1286 | #define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1287 | #define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1288 | #define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1289 | #define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ__REG \
|
---|
1290 | BNO055_QUATERNION_DATA_Z_MSB_ADDR
|
---|
1291 |
|
---|
1292 | /* Linear acceleration data X-LSB register*/
|
---|
1293 | #define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX__POS 0
|
---|
1294 | #define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1295 | #define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX__LEN 8
|
---|
1296 | #define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX__REG \
|
---|
1297 | BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR
|
---|
1298 |
|
---|
1299 | /* Linear acceleration data X-MSB register*/
|
---|
1300 | #define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX__POS 0
|
---|
1301 | #define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1302 | #define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX__LEN 8
|
---|
1303 | #define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX__REG \
|
---|
1304 | BNO055_LINEAR_ACCEL_DATA_X_MSB_ADDR
|
---|
1305 |
|
---|
1306 | /* Linear acceleration data Y-LSB register*/
|
---|
1307 | #define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY__POS 0
|
---|
1308 | #define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1309 | #define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1310 | #define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY__REG \
|
---|
1311 | BNO055_LINEAR_ACCEL_DATA_Y_LSB_ADDR
|
---|
1312 |
|
---|
1313 | /* Linear acceleration data Y-MSB register*/
|
---|
1314 | #define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY__POS 0
|
---|
1315 | #define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1316 | #define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1317 | #define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY__REG \
|
---|
1318 | BNO055_LINEAR_ACCEL_DATA_Y_MSB_ADDR
|
---|
1319 |
|
---|
1320 | /* Linear acceleration data Z-LSB register*/
|
---|
1321 | #define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1322 | #define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1323 | #define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1324 | #define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ__REG \
|
---|
1325 | BNO055_LINEAR_ACCEL_DATA_Z_LSB_ADDR
|
---|
1326 |
|
---|
1327 | /* Linear acceleration data Z-MSB register*/
|
---|
1328 | #define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1329 | #define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1330 | #define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1331 | #define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ__REG \
|
---|
1332 | BNO055_LINEAR_ACCEL_DATA_Z_MSB_ADDR
|
---|
1333 |
|
---|
1334 | /* Gravity data X-LSB register*/
|
---|
1335 | #define BNO055_GRAVITY_DATA_X_LSB_VALUEX__POS 0
|
---|
1336 | #define BNO055_GRAVITY_DATA_X_LSB_VALUEX__MSK 0xFF
|
---|
1337 | #define BNO055_GRAVITY_DATA_X_LSB_VALUEX__LEN 8
|
---|
1338 | #define BNO055_GRAVITY_DATA_X_LSB_VALUEX__REG \
|
---|
1339 | BNO055_GRAVITY_DATA_X_LSB_ADDR
|
---|
1340 |
|
---|
1341 | /* Gravity data X-MSB register*/
|
---|
1342 | #define BNO055_GRAVITY_DATA_X_MSB_VALUEX__POS 0
|
---|
1343 | #define BNO055_GRAVITY_DATA_X_MSB_VALUEX__MSK 0xFF
|
---|
1344 | #define BNO055_GRAVITY_DATA_X_MSB_VALUEX__LEN 8
|
---|
1345 | #define BNO055_GRAVITY_DATA_X_MSB_VALUEX__REG \
|
---|
1346 | BNO055_GRAVITY_DATA_X_MSB_ADDR
|
---|
1347 |
|
---|
1348 | /* Gravity data Y-LSB register*/
|
---|
1349 | #define BNO055_GRAVITY_DATA_Y_LSB_VALUEY__POS 0
|
---|
1350 | #define BNO055_GRAVITY_DATA_Y_LSB_VALUEY__MSK 0xFF
|
---|
1351 | #define BNO055_GRAVITY_DATA_Y_LSB_VALUEY__LEN 8
|
---|
1352 | #define BNO055_GRAVITY_DATA_Y_LSB_VALUEY__REG \
|
---|
1353 | BNO055_GRAVITY_DATA_Y_LSB_ADDR
|
---|
1354 |
|
---|
1355 | /* Gravity data Y-MSB register*/
|
---|
1356 | #define BNO055_GRAVITY_DATA_Y_MSB_VALUEY__POS 0
|
---|
1357 | #define BNO055_GRAVITY_DATA_Y_MSB_VALUEY__MSK 0xFF
|
---|
1358 | #define BNO055_GRAVITY_DATA_Y_MSB_VALUEY__LEN 8
|
---|
1359 | #define BNO055_GRAVITY_DATA_Y_MSB_VALUEY__REG \
|
---|
1360 | BNO055_GRAVITY_DATA_Y_MSB_ADDR
|
---|
1361 |
|
---|
1362 | /* Gravity data Z-LSB register*/
|
---|
1363 | #define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ__POS 0
|
---|
1364 | #define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ__MSK 0xFF
|
---|
1365 | #define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ__LEN 8
|
---|
1366 | #define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ__REG \
|
---|
1367 | BNO055_GRAVITY_DATA_Z_LSB_ADDR
|
---|
1368 |
|
---|
1369 | /* Gravity data Z-MSB register*/
|
---|
1370 | #define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ__POS 0
|
---|
1371 | #define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ__MSK 0xFF
|
---|
1372 | #define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ__LEN 8
|
---|
1373 | #define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ__REG \
|
---|
1374 | BNO055_GRAVITY_DATA_Z_MSB_ADDR
|
---|
1375 |
|
---|
1376 | /* Temperature register*/
|
---|
1377 | #define BNO055_TEMP__POS 0
|
---|
1378 | #define BNO055_TEMP__MSK 0xFF
|
---|
1379 | #define BNO055_TEMP__LEN 8
|
---|
1380 | #define BNO055_TEMP__REG BNO055_TEMP_ADDR
|
---|
1381 |
|
---|
1382 | /*Mag_Calib status register*/
|
---|
1383 | #define BNO055_MAG_CALIB_STAT__POS 0
|
---|
1384 | #define BNO055_MAG_CALIB_STAT__MSK 0X03
|
---|
1385 | #define BNO055_MAG_CALIB_STAT__LEN 2
|
---|
1386 | #define BNO055_MAG_CALIB_STAT__REG BNO055_CALIB_STAT_ADDR
|
---|
1387 |
|
---|
1388 | /*Acc_Calib status register*/
|
---|
1389 | #define BNO055_ACCEL_CALIB_STAT__POS 2
|
---|
1390 | #define BNO055_ACCEL_CALIB_STAT__MSK 0X0C
|
---|
1391 | #define BNO055_ACCEL_CALIB_STAT__LEN 2
|
---|
1392 | #define BNO055_ACCEL_CALIB_STAT__REG BNO055_CALIB_STAT_ADDR
|
---|
1393 |
|
---|
1394 | /*Gyro_Calib status register*/
|
---|
1395 | #define BNO055_GYRO_CALIB_STAT__POS 4
|
---|
1396 | #define BNO055_GYRO_CALIB_STAT__MSK 0X30
|
---|
1397 | #define BNO055_GYRO_CALIB_STAT__LEN 2
|
---|
1398 | #define BNO055_GYRO_CALIB_STAT__REG BNO055_CALIB_STAT_ADDR
|
---|
1399 |
|
---|
1400 | /*Sys_Calib status register*/
|
---|
1401 | #define BNO055_SYS_CALIB_STAT__POS 6
|
---|
1402 | #define BNO055_SYS_CALIB_STAT__MSK 0XC0
|
---|
1403 | #define BNO055_SYS_CALIB_STAT__LEN 2
|
---|
1404 | #define BNO055_SYS_CALIB_STAT__REG BNO055_CALIB_STAT_ADDR
|
---|
1405 |
|
---|
1406 | /*ST_ACCEL register*/
|
---|
1407 | #define BNO055_SELFTEST_ACCEL__POS 0
|
---|
1408 | #define BNO055_SELFTEST_ACCEL__MSK 0X01
|
---|
1409 | #define BNO055_SELFTEST_ACCEL__LEN 1
|
---|
1410 | #define BNO055_SELFTEST_ACCEL__REG BNO055_SELFTEST_RESULT_ADDR
|
---|
1411 |
|
---|
1412 | /*ST_MAG register*/
|
---|
1413 | #define BNO055_SELFTEST_MAG__POS 1
|
---|
1414 | #define BNO055_SELFTEST_MAG__MSK 0X02
|
---|
1415 | #define BNO055_SELFTEST_MAG__LEN 1
|
---|
1416 | #define BNO055_SELFTEST_MAG__REG BNO055_SELFTEST_RESULT_ADDR
|
---|
1417 |
|
---|
1418 | /*ST_GYRO register*/
|
---|
1419 | #define BNO055_SELFTEST_GYRO__POS 2
|
---|
1420 | #define BNO055_SELFTEST_GYRO__MSK 0X04
|
---|
1421 | #define BNO055_SELFTEST_GYRO__LEN 1
|
---|
1422 | #define BNO055_SELFTEST_GYRO__REG BNO055_SELFTEST_RESULT_ADDR
|
---|
1423 |
|
---|
1424 | /*ST_MCU register*/
|
---|
1425 | #define BNO055_SELFTEST_MCU__POS 3
|
---|
1426 | #define BNO055_SELFTEST_MCU__MSK 0X08
|
---|
1427 | #define BNO055_SELFTEST_MCU__LEN 1
|
---|
1428 | #define BNO055_SELFTEST_MCU__REG BNO055_SELFTEST_RESULT_ADDR
|
---|
1429 |
|
---|
1430 | /*Interrupt status registers*/
|
---|
1431 | #define BNO055_INTR_STAT_GYRO_ANY_MOTION__POS 2
|
---|
1432 | #define BNO055_INTR_STAT_GYRO_ANY_MOTION__MSK 0X04
|
---|
1433 | #define BNO055_INTR_STAT_GYRO_ANY_MOTION__LEN 1
|
---|
1434 | #define BNO055_INTR_STAT_GYRO_ANY_MOTION__REG BNO055_INTR_STAT_ADDR
|
---|
1435 |
|
---|
1436 | #define BNO055_INTR_STAT_GYRO_HIGHRATE__POS 3
|
---|
1437 | #define BNO055_INTR_STAT_GYRO_HIGHRATE__MSK 0X08
|
---|
1438 | #define BNO055_INTR_STAT_GYRO_HIGHRATE__LEN 1
|
---|
1439 | #define BNO055_INTR_STAT_GYRO_HIGHRATE__REG BNO055_INTR_STAT_ADDR
|
---|
1440 |
|
---|
1441 | #define BNO055_INTR_STAT_ACCEL_HIGH_G__POS 5
|
---|
1442 | #define BNO055_INTR_STAT_ACCEL_HIGH_G__MSK 0X20
|
---|
1443 | #define BNO055_INTR_STAT_ACCEL_HIGH_G__LEN 1
|
---|
1444 | #define BNO055_INTR_STAT_ACCEL_HIGH_G__REG BNO055_INTR_STAT_ADDR
|
---|
1445 |
|
---|
1446 | #define BNO055_INTR_STAT_ACCEL_ANY_MOTION__POS 6
|
---|
1447 | #define BNO055_INTR_STAT_ACCEL_ANY_MOTION__MSK 0X40
|
---|
1448 | #define BNO055_INTR_STAT_ACCEL_ANY_MOTION__LEN 1
|
---|
1449 | #define BNO055_INTR_STAT_ACCEL_ANY_MOTION__REG BNO055_INTR_STAT_ADDR
|
---|
1450 |
|
---|
1451 | #define BNO055_INTR_STAT_ACCEL_NO_MOTION__POS 7
|
---|
1452 | #define BNO055_INTR_STAT_ACCEL_NO_MOTION__MSK 0X80
|
---|
1453 | #define BNO055_INTR_STAT_ACCEL_NO_MOTION__LEN 1
|
---|
1454 | #define BNO055_INTR_STAT_ACCEL_NO_MOTION__REG BNO055_INTR_STAT_ADDR
|
---|
1455 |
|
---|
1456 | /* system clock status register*/
|
---|
1457 | #define BNO055_SYS_MAIN_CLK__POS 0
|
---|
1458 | #define BNO055_SYS_MAIN_CLK__MSK 0X10
|
---|
1459 | #define BNO055_SYS_MAIN_CLK__LEN 1
|
---|
1460 | #define BNO055_SYS_MAIN_CLK__REG BNO055_SYS_CLK_STAT_ADDR
|
---|
1461 |
|
---|
1462 | /* System registers*/
|
---|
1463 | #define BNO055_SYS_STAT_CODE__POS 0
|
---|
1464 | #define BNO055_SYS_STAT_CODE__MSK 0XFF
|
---|
1465 | #define BNO055_SYS_STAT_CODE__LEN 8
|
---|
1466 | #define BNO055_SYS_STAT_CODE__REG BNO055_SYS_STAT_ADDR
|
---|
1467 |
|
---|
1468 | #define BNO055_SYS_ERROR_CODE__POS 0
|
---|
1469 | #define BNO055_SYS_ERROR_CODE__MSK 0XFF
|
---|
1470 | #define BNO055_SYS_ERROR_CODE__LEN 8
|
---|
1471 | #define BNO055_SYS_ERROR_CODE__REG BNO055_SYS_ERR_ADDR
|
---|
1472 |
|
---|
1473 | /* Accel_Unit register*/
|
---|
1474 | #define BNO055_ACCEL_UNIT__POS 0
|
---|
1475 | #define BNO055_ACCEL_UNIT__MSK 0X01
|
---|
1476 | #define BNO055_ACCEL_UNIT__LEN 1
|
---|
1477 | #define BNO055_ACCEL_UNIT__REG BNO055_UNIT_SEL_ADDR
|
---|
1478 |
|
---|
1479 | /* Gyro_Unit register*/
|
---|
1480 | #define BNO055_GYRO_UNIT__POS 1
|
---|
1481 | #define BNO055_GYRO_UNIT__MSK 0X02
|
---|
1482 | #define BNO055_GYRO_UNIT__LEN 1
|
---|
1483 | #define BNO055_GYRO_UNIT__REG BNO055_UNIT_SEL_ADDR
|
---|
1484 |
|
---|
1485 | /* Euler_Unit register*/
|
---|
1486 | #define BNO055_EULER_UNIT__POS 2
|
---|
1487 | #define BNO055_EULER_UNIT__MSK 0X04
|
---|
1488 | #define BNO055_EULER_UNIT__LEN 1
|
---|
1489 | #define BNO055_EULER_UNIT__REG BNO055_UNIT_SEL_ADDR
|
---|
1490 |
|
---|
1491 | /* Tilt_Unit register*/
|
---|
1492 | #define BNO055_TILT_UNIT__POS 3
|
---|
1493 | #define BNO055_TILT_UNIT__MSK 0X08
|
---|
1494 | #define BNO055_TILT_UNIT__LEN 1
|
---|
1495 | #define BNO055_TILT_UNIT__REG BNO055_UNIT_SEL_ADDR
|
---|
1496 |
|
---|
1497 | /* Temperature_Unit register*/
|
---|
1498 | #define BNO055_TEMP_UNIT__POS 4
|
---|
1499 | #define BNO055_TEMP_UNIT__MSK 0X10
|
---|
1500 | #define BNO055_TEMP_UNIT__LEN 1
|
---|
1501 | #define BNO055_TEMP_UNIT__REG BNO055_UNIT_SEL_ADDR
|
---|
1502 |
|
---|
1503 | /* ORI android-windows register*/
|
---|
1504 | #define BNO055_DATA_OUTPUT_FORMAT__POS 7
|
---|
1505 | #define BNO055_DATA_OUTPUT_FORMAT__MSK 0X80
|
---|
1506 | #define BNO055_DATA_OUTPUT_FORMAT__LEN 1
|
---|
1507 | #define BNO055_DATA_OUTPUT_FORMAT__REG BNO055_UNIT_SEL_ADDR
|
---|
1508 | /*Operation Mode data register*/
|
---|
1509 | #define BNO055_OPERATION_MODE__POS 0
|
---|
1510 | #define BNO055_OPERATION_MODE__MSK 0X0F
|
---|
1511 | #define BNO055_OPERATION_MODE__LEN 4
|
---|
1512 | #define BNO055_OPERATION_MODE__REG BNO055_OPR_MODE_ADDR
|
---|
1513 | /* Power Mode register*/
|
---|
1514 | #define BNO055_POWER_MODE__POS 0
|
---|
1515 | #define BNO055_POWER_MODE__MSK 0X03
|
---|
1516 | #define BNO055_POWER_MODE__LEN 2
|
---|
1517 | #define BNO055_POWER_MODE__REG BNO055_PWR_MODE_ADDR
|
---|
1518 |
|
---|
1519 | /*Self Test register*/
|
---|
1520 | #define BNO055_SELFTEST__POS 0
|
---|
1521 | #define BNO055_SELFTEST__MSK 0X01
|
---|
1522 | #define BNO055_SELFTEST__LEN 1
|
---|
1523 | #define BNO055_SELFTEST__REG BNO055_SYS_TRIGGER_ADDR
|
---|
1524 |
|
---|
1525 | /* RST_SYS register*/
|
---|
1526 | #define BNO055_SYS_RST__POS 5
|
---|
1527 | #define BNO055_SYS_RST__MSK 0X20
|
---|
1528 | #define BNO055_SYS_RST__LEN 1
|
---|
1529 | #define BNO055_SYS_RST__REG BNO055_SYS_TRIGGER_ADDR
|
---|
1530 |
|
---|
1531 | /* RST_INT register*/
|
---|
1532 | #define BNO055_INTR_RST__POS 6
|
---|
1533 | #define BNO055_INTR_RST__MSK 0X40
|
---|
1534 | #define BNO055_INTR_RST__LEN 1
|
---|
1535 | #define BNO055_INTR_RST__REG BNO055_SYS_TRIGGER_ADDR
|
---|
1536 |
|
---|
1537 | /* CLK_SRC register*/
|
---|
1538 | #define BNO055_CLK_SRC__POS 7
|
---|
1539 | #define BNO055_CLK_SRC__MSK 0X80
|
---|
1540 | #define BNO055_CLK_SRC__LEN 1
|
---|
1541 | #define BNO055_CLK_SRC__REG BNO055_SYS_TRIGGER_ADDR
|
---|
1542 |
|
---|
1543 | /* Temp source register*/
|
---|
1544 | #define BNO055_TEMP_SOURCE__POS 0
|
---|
1545 | #define BNO055_TEMP_SOURCE__MSK 0X03
|
---|
1546 | #define BNO055_TEMP_SOURCE__LEN 2
|
---|
1547 | #define BNO055_TEMP_SOURCE__REG BNO055_TEMP_SOURCE_ADDR
|
---|
1548 |
|
---|
1549 | /* Axis remap value register*/
|
---|
1550 | #define BNO055_REMAP_AXIS_VALUE__POS 0
|
---|
1551 | #define BNO055_REMAP_AXIS_VALUE__MSK 0X3F
|
---|
1552 | #define BNO055_REMAP_AXIS_VALUE__LEN 6
|
---|
1553 | #define BNO055_REMAP_AXIS_VALUE__REG BNO055_AXIS_MAP_CONFIG_ADDR
|
---|
1554 |
|
---|
1555 | /* Axis sign value register*/
|
---|
1556 | #define BNO055_REMAP_Z_SIGN__POS 0
|
---|
1557 | #define BNO055_REMAP_Z_SIGN__MSK 0X01
|
---|
1558 | #define BNO055_REMAP_Z_SIGN__LEN 1
|
---|
1559 | #define BNO055_REMAP_Z_SIGN__REG BNO055_AXIS_MAP_SIGN_ADDR
|
---|
1560 |
|
---|
1561 | #define BNO055_REMAP_Y_SIGN__POS 1
|
---|
1562 | #define BNO055_REMAP_Y_SIGN__MSK 0X02
|
---|
1563 | #define BNO055_REMAP_Y_SIGN__LEN 1
|
---|
1564 | #define BNO055_REMAP_Y_SIGN__REG BNO055_AXIS_MAP_SIGN_ADDR
|
---|
1565 |
|
---|
1566 | #define BNO055_REMAP_X_SIGN__POS 2
|
---|
1567 | #define BNO055_REMAP_X_SIGN__MSK 0X04
|
---|
1568 | #define BNO055_REMAP_X_SIGN__LEN 1
|
---|
1569 | #define BNO055_REMAP_X_SIGN__REG BNO055_AXIS_MAP_SIGN_ADDR
|
---|
1570 |
|
---|
1571 | /* Soft Iron Calibration matrix register*/
|
---|
1572 | #define BNO055_SIC_MATRIX_0_LSB__POS 0
|
---|
1573 | #define BNO055_SIC_MATRIX_0_LSB__MSK 0XFF
|
---|
1574 | #define BNO055_SIC_MATRIX_0_LSB__LEN 8
|
---|
1575 | #define BNO055_SIC_MATRIX_0_LSB__REG BNO055_SIC_MATRIX_0_LSB_ADDR
|
---|
1576 |
|
---|
1577 | #define BNO055_SIC_MATRIX_0_MSB__POS 0
|
---|
1578 | #define BNO055_SIC_MATRIX_0_MSB__MSK 0XFF
|
---|
1579 | #define BNO055_SIC_MATRIX_0_MSB__LEN 8
|
---|
1580 | #define BNO055_SIC_MATRIX_0_MSB__REG BNO055_SIC_MATRIX_0_MSB_ADDR
|
---|
1581 |
|
---|
1582 | #define BNO055_SIC_MATRIX_1_LSB__POS 0
|
---|
1583 | #define BNO055_SIC_MATRIX_1_LSB__MSK 0XFF
|
---|
1584 | #define BNO055_SIC_MATRIX_1_LSB__LEN 8
|
---|
1585 | #define BNO055_SIC_MATRIX_1_LSB__REG BNO055_SIC_MATRIX_1_LSB_ADDR
|
---|
1586 |
|
---|
1587 | #define BNO055_SIC_MATRIX_1_MSB__POS 0
|
---|
1588 | #define BNO055_SIC_MATRIX_1_MSB__MSK 0XFF
|
---|
1589 | #define BNO055_SIC_MATRIX_1_MSB__LEN 8
|
---|
1590 | #define BNO055_SIC_MATRIX_1_MSB__REG BNO055_SIC_MATRIX_1_MSB_ADDR
|
---|
1591 |
|
---|
1592 | #define BNO055_SIC_MATRIX_2_LSB__POS 0
|
---|
1593 | #define BNO055_SIC_MATRIX_2_LSB__MSK 0XFF
|
---|
1594 | #define BNO055_SIC_MATRIX_2_LSB__LEN 8
|
---|
1595 | #define BNO055_SIC_MATRIX_2_LSB__REG BNO055_SIC_MATRIX_2_LSB_ADDR
|
---|
1596 |
|
---|
1597 | #define BNO055_SIC_MATRIX_2_MSB__POS 0
|
---|
1598 | #define BNO055_SIC_MATRIX_2_MSB__MSK 0XFF
|
---|
1599 | #define BNO055_SIC_MATRIX_2_MSB__LEN 8
|
---|
1600 | #define BNO055_SIC_MATRIX_2_MSB__REG BNO055_SIC_MATRIX_2_MSB_ADDR
|
---|
1601 |
|
---|
1602 | #define BNO055_SIC_MATRIX_3_LSB__POS 0
|
---|
1603 | #define BNO055_SIC_MATRIX_3_LSB__MSK 0XFF
|
---|
1604 | #define BNO055_SIC_MATRIX_3_LSB__LEN 8
|
---|
1605 | #define BNO055_SIC_MATRIX_3_LSB__REG BNO055_SIC_MATRIX_3_LSB_ADDR
|
---|
1606 |
|
---|
1607 | #define BNO055_SIC_MATRIX_3_MSB__POS 0
|
---|
1608 | #define BNO055_SIC_MATRIX_3_MSB__MSK 0XFF
|
---|
1609 | #define BNO055_SIC_MATRIX_3_MSB__LEN 8
|
---|
1610 | #define BNO055_SIC_MATRIX_3_MSB__REG BNO055_SIC_MATRIX_3_MSB_ADDR
|
---|
1611 |
|
---|
1612 | #define BNO055_SIC_MATRIX_4_LSB__POS 0
|
---|
1613 | #define BNO055_SIC_MATRIX_4_LSB__MSK 0XFF
|
---|
1614 | #define BNO055_SIC_MATRIX_4_LSB__LEN 8
|
---|
1615 | #define BNO055_SIC_MATRIX_4_LSB__REG BNO055_SIC_MATRIX_4_LSB_ADDR
|
---|
1616 |
|
---|
1617 | #define BNO055_SIC_MATRIX_4_MSB__POS 0
|
---|
1618 | #define BNO055_SIC_MATRIX_4_MSB__MSK 0XFF
|
---|
1619 | #define BNO055_SIC_MATRIX_4_MSB__LEN 8
|
---|
1620 | #define BNO055_SIC_MATRIX_4_MSB__REG BNO055_SIC_MATRIX_4_MSB_ADDR
|
---|
1621 |
|
---|
1622 | #define BNO055_SIC_MATRIX_5_LSB__POS 0
|
---|
1623 | #define BNO055_SIC_MATRIX_5_LSB__MSK 0XFF
|
---|
1624 | #define BNO055_SIC_MATRIX_5_LSB__LEN 8
|
---|
1625 | #define BNO055_SIC_MATRIX_5_LSB__REG BNO055_SIC_MATRIX_5_LSB_ADDR
|
---|
1626 |
|
---|
1627 | #define BNO055_SIC_MATRIX_5_MSB__POS 0
|
---|
1628 | #define BNO055_SIC_MATRIX_5_MSB__MSK 0XFF
|
---|
1629 | #define BNO055_SIC_MATRIX_5_MSB__LEN 8
|
---|
1630 | #define BNO055_SIC_MATRIX_5_MSB__REG BNO055_SIC_MATRIX_5_MSB_ADDR
|
---|
1631 |
|
---|
1632 | #define BNO055_SIC_MATRIX_6_LSB__POS 0
|
---|
1633 | #define BNO055_SIC_MATRIX_6_LSB__MSK 0XFF
|
---|
1634 | #define BNO055_SIC_MATRIX_6_LSB__LEN 8
|
---|
1635 | #define BNO055_SIC_MATRIX_6_LSB__REG BNO055_SIC_MATRIX_6_LSB_ADDR
|
---|
1636 |
|
---|
1637 | #define BNO055_SIC_MATRIX_6_MSB__POS 0
|
---|
1638 | #define BNO055_SIC_MATRIX_6_MSB__MSK 0XFF
|
---|
1639 | #define BNO055_SIC_MATRIX_6_MSB__LEN 8
|
---|
1640 | #define BNO055_SIC_MATRIX_6_MSB__REG BNO055_SIC_MATRIX_6_MSB_ADDR
|
---|
1641 |
|
---|
1642 | #define BNO055_SIC_MATRIX_7_LSB__POS 0
|
---|
1643 | #define BNO055_SIC_MATRIX_7_LSB__MSK 0XFF
|
---|
1644 | #define BNO055_SIC_MATRIX_7_LSB__LEN 8
|
---|
1645 | #define BNO055_SIC_MATRIX_7_LSB__REG BNO055_SIC_MATRIX_7_LSB_ADDR
|
---|
1646 |
|
---|
1647 | #define BNO055_SIC_MATRIX_7_MSB__POS 0
|
---|
1648 | #define BNO055_SIC_MATRIX_7_MSB__MSK 0XFF
|
---|
1649 | #define BNO055_SIC_MATRIX_7_MSB__LEN 8
|
---|
1650 | #define BNO055_SIC_MATRIX_7_MSB__REG BNO055_SIC_MATRIX_7_MSB_ADDR
|
---|
1651 |
|
---|
1652 | #define BNO055_SIC_MATRIX_8_LSB__POS 0
|
---|
1653 | #define BNO055_SIC_MATRIX_8_LSB__MSK 0XFF
|
---|
1654 | #define BNO055_SIC_MATRIX_8_LSB__LEN 8
|
---|
1655 | #define BNO055_SIC_MATRIX_8_LSB__REG BNO055_SIC_MATRIX_8_LSB_ADDR
|
---|
1656 |
|
---|
1657 | #define BNO055_SIC_MATRIX_8_MSB__POS 0
|
---|
1658 | #define BNO055_SIC_MATRIX_8_MSB__MSK 0XFF
|
---|
1659 | #define BNO055_SIC_MATRIX_8_MSB__LEN 8
|
---|
1660 | #define BNO055_SIC_MATRIX_8_MSB__REG BNO055_SIC_MATRIX_8_MSB_ADDR
|
---|
1661 |
|
---|
1662 | /*Accel Offset registers*/
|
---|
1663 | #define BNO055_ACCEL_OFFSET_X_LSB__POS 0
|
---|
1664 | #define BNO055_ACCEL_OFFSET_X_LSB__MSK 0XFF
|
---|
1665 | #define BNO055_ACCEL_OFFSET_X_LSB__LEN 8
|
---|
1666 | #define BNO055_ACCEL_OFFSET_X_LSB__REG ACCEL_OFFSET_X_LSB_ADDR
|
---|
1667 |
|
---|
1668 | #define BNO055_ACCEL_OFFSET_X_MSB__POS 0
|
---|
1669 | #define BNO055_ACCEL_OFFSET_X_MSB__MSK 0XFF
|
---|
1670 | #define BNO055_ACCEL_OFFSET_X_MSB__LEN 8
|
---|
1671 | #define BNO055_ACCEL_OFFSET_X_MSB__REG ACCEL_OFFSET_X_MSB_ADDR
|
---|
1672 |
|
---|
1673 | #define BNO055_ACCEL_OFFSET_Y_LSB__POS 0
|
---|
1674 | #define BNO055_ACCEL_OFFSET_Y_LSB__MSK 0XFF
|
---|
1675 | #define BNO055_ACCEL_OFFSET_Y_LSB__LEN 8
|
---|
1676 | #define BNO055_ACCEL_OFFSET_Y_LSB__REG ACCEL_OFFSET_Y_LSB_ADDR
|
---|
1677 |
|
---|
1678 | #define BNO055_ACCEL_OFFSET_Y_MSB__POS 0
|
---|
1679 | #define BNO055_ACCEL_OFFSET_Y_MSB__MSK 0XFF
|
---|
1680 | #define BNO055_ACCEL_OFFSET_Y_MSB__LEN 8
|
---|
1681 | #define BNO055_ACCEL_OFFSET_Y_MSB__REG ACCEL_OFFSET_Y_MSB_ADDR
|
---|
1682 |
|
---|
1683 | #define BNO055_ACCEL_OFFSET_Z_LSB__POS 0
|
---|
1684 | #define BNO055_ACCEL_OFFSET_Z_LSB__MSK 0XFF
|
---|
1685 | #define BNO055_ACCEL_OFFSET_Z_LSB__LEN 8
|
---|
1686 | #define BNO055_ACCEL_OFFSET_Z_LSB__REG ACCEL_OFFSET_Z_LSB_ADDR
|
---|
1687 |
|
---|
1688 | #define BNO055_ACCEL_OFFSET_Z_MSB__POS 0
|
---|
1689 | #define BNO055_ACCEL_OFFSET_Z_MSB__MSK 0XFF
|
---|
1690 | #define BNO055_ACCEL_OFFSET_Z_MSB__LEN 8
|
---|
1691 | #define BNO055_ACCEL_OFFSET_Z_MSB__REG ACCEL_OFFSET_Z_MSB_ADDR
|
---|
1692 |
|
---|
1693 | /*Mag Offset registers*/
|
---|
1694 | #define BNO055_MAG_OFFSET_X_LSB__POS 0
|
---|
1695 | #define BNO055_MAG_OFFSET_X_LSB__MSK 0XFF
|
---|
1696 | #define BNO055_MAG_OFFSET_X_LSB__LEN 8
|
---|
1697 | #define BNO055_MAG_OFFSET_X_LSB__REG MAG_OFFSET_X_LSB_ADDR
|
---|
1698 |
|
---|
1699 | #define BNO055_MAG_OFFSET_X_MSB__POS 0
|
---|
1700 | #define BNO055_MAG_OFFSET_X_MSB__MSK 0XFF
|
---|
1701 | #define BNO055_MAG_OFFSET_X_MSB__LEN 8
|
---|
1702 | #define BNO055_MAG_OFFSET_X_MSB__REG MAG_OFFSET_X_MSB_ADDR
|
---|
1703 |
|
---|
1704 | #define BNO055_MAG_OFFSET_Y_LSB__POS 0
|
---|
1705 | #define BNO055_MAG_OFFSET_Y_LSB__MSK 0XFF
|
---|
1706 | #define BNO055_MAG_OFFSET_Y_LSB__LEN 8
|
---|
1707 | #define BNO055_MAG_OFFSET_Y_LSB__REG MAG_OFFSET_Y_LSB_ADDR
|
---|
1708 |
|
---|
1709 | #define BNO055_MAG_OFFSET_Y_MSB__POS 0
|
---|
1710 | #define BNO055_MAG_OFFSET_Y_MSB__MSK 0XFF
|
---|
1711 | #define BNO055_MAG_OFFSET_Y_MSB__LEN 8
|
---|
1712 | #define BNO055_MAG_OFFSET_Y_MSB__REG MAG_OFFSET_Y_MSB_ADDR
|
---|
1713 |
|
---|
1714 | #define BNO055_MAG_OFFSET_Z_LSB__POS 0
|
---|
1715 | #define BNO055_MAG_OFFSET_Z_LSB__MSK 0XFF
|
---|
1716 | #define BNO055_MAG_OFFSET_Z_LSB__LEN 8
|
---|
1717 | #define BNO055_MAG_OFFSET_Z_LSB__REG MAG_OFFSET_Z_LSB_ADDR
|
---|
1718 |
|
---|
1719 | #define BNO055_MAG_OFFSET_Z_MSB__POS 0
|
---|
1720 | #define BNO055_MAG_OFFSET_Z_MSB__MSK 0XFF
|
---|
1721 | #define BNO055_MAG_OFFSET_Z_MSB__LEN 8
|
---|
1722 | #define BNO055_MAG_OFFSET_Z_MSB__REG MAG_OFFSET_Z_MSB_ADDR
|
---|
1723 |
|
---|
1724 | /* Gyro Offset registers*/
|
---|
1725 | #define BNO055_GYRO_OFFSET_X_LSB__POS 0
|
---|
1726 | #define BNO055_GYRO_OFFSET_X_LSB__MSK 0XFF
|
---|
1727 | #define BNO055_GYRO_OFFSET_X_LSB__LEN 8
|
---|
1728 | #define BNO055_GYRO_OFFSET_X_LSB__REG GYRO_OFFSET_X_LSB_ADDR
|
---|
1729 |
|
---|
1730 | #define BNO055_GYRO_OFFSET_X_MSB__POS 0
|
---|
1731 | #define BNO055_GYRO_OFFSET_X_MSB__MSK 0XFF
|
---|
1732 | #define BNO055_GYRO_OFFSET_X_MSB__LEN 8
|
---|
1733 | #define BNO055_GYRO_OFFSET_X_MSB__REG GYRO_OFFSET_X_MSB_ADDR
|
---|
1734 |
|
---|
1735 | #define BNO055_GYRO_OFFSET_Y_LSB__POS 0
|
---|
1736 | #define BNO055_GYRO_OFFSET_Y_LSB__MSK 0XFF
|
---|
1737 | #define BNO055_GYRO_OFFSET_Y_LSB__LEN 8
|
---|
1738 | #define BNO055_GYRO_OFFSET_Y_LSB__REG GYRO_OFFSET_Y_LSB_ADDR
|
---|
1739 |
|
---|
1740 | #define BNO055_GYRO_OFFSET_Y_MSB__POS 0
|
---|
1741 | #define BNO055_GYRO_OFFSET_Y_MSB__MSK 0XFF
|
---|
1742 | #define BNO055_GYRO_OFFSET_Y_MSB__LEN 8
|
---|
1743 | #define BNO055_GYRO_OFFSET_Y_MSB__REG GYRO_OFFSET_Y_MSB_ADDR
|
---|
1744 |
|
---|
1745 | #define BNO055_GYRO_OFFSET_Z_LSB__POS 0
|
---|
1746 | #define BNO055_GYRO_OFFSET_Z_LSB__MSK 0XFF
|
---|
1747 | #define BNO055_GYRO_OFFSET_Z_LSB__LEN 8
|
---|
1748 | #define BNO055_GYRO_OFFSET_Z_LSB__REG GYRO_OFFSET_Z_LSB_ADDR
|
---|
1749 |
|
---|
1750 | #define BNO055_GYRO_OFFSET_Z_MSB__POS 0
|
---|
1751 | #define BNO055_GYRO_OFFSET_Z_MSB__MSK 0XFF
|
---|
1752 | #define BNO055_GYRO_OFFSET_Z_MSB__LEN 8
|
---|
1753 | #define BNO055_GYRO_OFFSET_Z_MSB__REG GYRO_OFFSET_Z_MSB_ADDR
|
---|
1754 |
|
---|
1755 | /* Radius register definition*/
|
---|
1756 | #define BNO055_ACCEL_RADIUS_LSB__POS 0
|
---|
1757 | #define BNO055_ACCEL_RADIUS_LSB__MSK 0XFF
|
---|
1758 | #define BNO055_ACCEL_RADIUS_LSB__LEN 8
|
---|
1759 | #define BNO055_ACCEL_RADIUS_LSB__REG ACCEL_RADIUS_LSB_ADDR
|
---|
1760 |
|
---|
1761 | #define BNO055_ACCEL_RADIUS_MSB__POS 0
|
---|
1762 | #define BNO055_ACCEL_RADIUS_MSB__MSK 0XFF
|
---|
1763 | #define BNO055_ACCEL_RADIUS_MSB__LEN 8
|
---|
1764 | #define BNO055_ACCEL_RADIUS_MSB__REG ACCEL_RADIUS_MSB_ADDR
|
---|
1765 |
|
---|
1766 | #define BNO055_MAG_RADIUS_LSB__POS 0
|
---|
1767 | #define BNO055_MAG_RADIUS_LSB__MSK 0XFF
|
---|
1768 | #define BNO055_MAG_RADIUS_LSB__LEN 8
|
---|
1769 | #define BNO055_MAG_RADIUS_LSB__REG MAG_RADIUS_LSB_ADDR
|
---|
1770 |
|
---|
1771 | #define BNO055_MAG_RADIUS_MSB__POS 0
|
---|
1772 | #define BNO055_MAG_RADIUS_MSB__MSK 0XFF
|
---|
1773 | #define BNO055_MAG_RADIUS_MSB__LEN 8
|
---|
1774 | #define BNO055_MAG_RADIUS_MSB__REG MAG_RADIUS_MSB_ADDR
|
---|
1775 |
|
---|
1776 | /* PAGE0 DATA REGISTERS DEFINITION END*/
|
---|
1777 | /*************************************************/
|
---|
1778 | /**\name PAGE1 DATA REGISTERS DEFINITION */
|
---|
1779 | /*************************************************/
|
---|
1780 | /* Configuration registers*/
|
---|
1781 | /* Accel range configuration register*/
|
---|
1782 | #define BNO055_ACCEL_RANGE__POS 0
|
---|
1783 | #define BNO055_ACCEL_RANGE__MSK 0X03
|
---|
1784 | #define BNO055_ACCEL_RANGE__LEN 2
|
---|
1785 | #define BNO055_ACCEL_RANGE__REG ACCEL_CONFIG_ADDR
|
---|
1786 |
|
---|
1787 | /* Accel bandwidth configuration register*/
|
---|
1788 | #define BNO055_ACCEL_BW__POS 2
|
---|
1789 | #define BNO055_ACCEL_BW__MSK 0X1C
|
---|
1790 | #define BNO055_ACCEL_BW__LEN 3
|
---|
1791 | #define BNO055_ACCEL_BW__REG ACCEL_CONFIG_ADDR
|
---|
1792 |
|
---|
1793 | /* Accel power mode configuration register*/
|
---|
1794 | #define BNO055_ACCEL_POWER_MODE__POS 5
|
---|
1795 | #define BNO055_ACCEL_POWER_MODE__MSK 0XE0
|
---|
1796 | #define BNO055_ACCEL_POWER_MODE__LEN 3
|
---|
1797 | #define BNO055_ACCEL_POWER_MODE__REG ACCEL_CONFIG_ADDR
|
---|
1798 |
|
---|
1799 | /* Mag data output rate configuration register*/
|
---|
1800 | #define BNO055_MAG_DATA_OUTPUT_RATE__POS 0
|
---|
1801 | #define BNO055_MAG_DATA_OUTPUT_RATE__MSK 0X07
|
---|
1802 | #define BNO055_MAG_DATA_OUTPUT_RATE__LEN 3
|
---|
1803 | #define BNO055_MAG_DATA_OUTPUT_RATE__REG MAG_CONFIG_ADDR
|
---|
1804 |
|
---|
1805 | /* Mag operation mode configuration register*/
|
---|
1806 | #define BNO055_MAG_OPERATION_MODE__POS 3
|
---|
1807 | #define BNO055_MAG_OPERATION_MODE__MSK 0X18
|
---|
1808 | #define BNO055_MAG_OPERATION_MODE__LEN 2
|
---|
1809 | #define BNO055_MAG_OPERATION_MODE__REG MAG_CONFIG_ADDR
|
---|
1810 |
|
---|
1811 | /* Mag power mode configuration register*/
|
---|
1812 | #define BNO055_MAG_POWER_MODE__POS 5
|
---|
1813 | #define BNO055_MAG_POWER_MODE__MSK 0X60
|
---|
1814 | #define BNO055_MAG_POWER_MODE__LEN 2
|
---|
1815 | #define BNO055_MAG_POWER_MODE__REG MAG_CONFIG_ADDR
|
---|
1816 |
|
---|
1817 | /* Gyro range configuration register*/
|
---|
1818 | #define BNO055_GYRO_RANGE__POS 0
|
---|
1819 | #define BNO055_GYRO_RANGE__MSK 0X07
|
---|
1820 | #define BNO055_GYRO_RANGE__LEN 3
|
---|
1821 | #define BNO055_GYRO_RANGE__REG GYRO_CONFIG_ADDR
|
---|
1822 |
|
---|
1823 | /* Gyro bandwidth configuration register*/
|
---|
1824 | #define BNO055_GYRO_BW__POS 3
|
---|
1825 | #define BNO055_GYRO_BW__MSK 0X38
|
---|
1826 | #define BNO055_GYRO_BW__LEN 3
|
---|
1827 | #define BNO055_GYRO_BW__REG GYRO_CONFIG_ADDR
|
---|
1828 |
|
---|
1829 | /* Gyro power mode configuration register*/
|
---|
1830 | #define BNO055_GYRO_POWER_MODE__POS 0
|
---|
1831 | #define BNO055_GYRO_POWER_MODE__MSK 0X07
|
---|
1832 | #define BNO055_GYRO_POWER_MODE__LEN 3
|
---|
1833 | #define BNO055_GYRO_POWER_MODE__REG GYRO_MODE_CONFIG_ADDR
|
---|
1834 |
|
---|
1835 | /* Sleep configuration registers*/
|
---|
1836 | /* Accel sleep mode configuration register*/
|
---|
1837 | #define BNO055_ACCEL_SLEEP_MODE__POS 0
|
---|
1838 | #define BNO055_ACCEL_SLEEP_MODE__MSK 0X01
|
---|
1839 | #define BNO055_ACCEL_SLEEP_MODE__LEN 1
|
---|
1840 | #define BNO055_ACCEL_SLEEP_MODE__REG ACCEL_SLEEP_CONFIG_ADDR
|
---|
1841 |
|
---|
1842 | /* Accel sleep duration configuration register*/
|
---|
1843 | #define BNO055_ACCEL_SLEEP_DURN__POS 1
|
---|
1844 | #define BNO055_ACCEL_SLEEP_DURN__MSK 0X1E
|
---|
1845 | #define BNO055_ACCEL_SLEEP_DURN__LEN 4
|
---|
1846 | #define BNO055_ACCEL_SLEEP_DURN__REG ACCEL_SLEEP_CONFIG_ADDR
|
---|
1847 |
|
---|
1848 | /* Gyro sleep duration configuration register*/
|
---|
1849 | #define BNO055_GYRO_SLEEP_DURN__POS 0
|
---|
1850 | #define BNO055_GYRO_SLEEP_DURN__MSK 0X07
|
---|
1851 | #define BNO055_GYRO_SLEEP_DURN__LEN 3
|
---|
1852 | #define BNO055_GYRO_SLEEP_DURN__REG GYRO_SLEEP_CONFIG_ADDR
|
---|
1853 |
|
---|
1854 | /* Gyro auto sleep duration configuration register*/
|
---|
1855 | #define BNO055_GYRO_AUTO_SLEEP_DURN__POS 3
|
---|
1856 | #define BNO055_GYRO_AUTO_SLEEP_DURN__MSK 0X38
|
---|
1857 | #define BNO055_GYRO_AUTO_SLEEP_DURN__LEN 3
|
---|
1858 | #define BNO055_GYRO_AUTO_SLEEP_DURN__REG GYRO_SLEEP_CONFIG_ADDR
|
---|
1859 |
|
---|
1860 | /* Mag sleep mode configuration register*/
|
---|
1861 | #define BNO055_MAG_SLEEP_MODE__POS 0
|
---|
1862 | #define BNO055_MAG_SLEEP_MODE__MSK 0X01
|
---|
1863 | #define BNO055_MAG_SLEEP_MODE__LEN 1
|
---|
1864 | #define BNO055_MAG_SLEEP_MODE__REG MAG_SLEEP_CONFIG_ADDR
|
---|
1865 |
|
---|
1866 | /* Mag sleep duration configuration register*/
|
---|
1867 | #define BNO055_MAG_SLEEP_DURN__POS 1
|
---|
1868 | #define BNO055_MAG_SLEEP_DURN__MSK 0X1E
|
---|
1869 | #define BNO055_MAG_SLEEP_DURN__LEN 4
|
---|
1870 | #define BNO055_MAG_SLEEP_DURN__REG MAG_SLEEP_CONFIG_ADDR
|
---|
1871 |
|
---|
1872 | /* Interrupt registers*/
|
---|
1873 | /* Gyro any motion interrupt msk register*/
|
---|
1874 | #define BNO055_GYRO_ANY_MOTION_INTR_MASK__POS 2
|
---|
1875 | #define BNO055_GYRO_ANY_MOTION_INTR_MASK__MSK 0X04
|
---|
1876 | #define BNO055_GYRO_ANY_MOTION_INTR_MASK__LEN 1
|
---|
1877 | #define BNO055_GYRO_ANY_MOTION_INTR_MASK__REG INT_MASK_ADDR
|
---|
1878 |
|
---|
1879 | /* Gyro high rate interrupt msk register*/
|
---|
1880 | #define BNO055_GYRO_HIGHRATE_INTR_MASK__POS 3
|
---|
1881 | #define BNO055_GYRO_HIGHRATE_INTR_MASK__MSK 0X08
|
---|
1882 | #define BNO055_GYRO_HIGHRATE_INTR_MASK__LEN 1
|
---|
1883 | #define BNO055_GYRO_HIGHRATE_INTR_MASK__REG INT_MASK_ADDR
|
---|
1884 |
|
---|
1885 | /* Accel high g interrupt msk register*/
|
---|
1886 | #define BNO055_ACCEL_HIGH_G_INTR_MASK__POS 5
|
---|
1887 | #define BNO055_ACCEL_HIGH_G_INTR_MASK__MSK 0X20
|
---|
1888 | #define BNO055_ACCEL_HIGH_G_INTR_MASK__LEN 1
|
---|
1889 | #define BNO055_ACCEL_HIGH_G_INTR_MASK__REG INT_MASK_ADDR
|
---|
1890 |
|
---|
1891 | /* Accel any motion interrupt msk register*/
|
---|
1892 | #define BNO055_ACCEL_ANY_MOTION_INTR_MASK__POS 6
|
---|
1893 | #define BNO055_ACCEL_ANY_MOTION_INTR_MASK__MSK 0X40
|
---|
1894 | #define BNO055_ACCEL_ANY_MOTION_INTR_MASK__LEN 1
|
---|
1895 | #define BNO055_ACCEL_ANY_MOTION_INTR_MASK__REG INT_MASK_ADDR
|
---|
1896 |
|
---|
1897 | /* Accel any motion interrupt msk register*/
|
---|
1898 | #define BNO055_ACCEL_NO_MOTION_INTR_MASK__POS 7
|
---|
1899 | #define BNO055_ACCEL_NO_MOTION_INTR_MASK__MSK 0X80
|
---|
1900 | #define BNO055_ACCEL_NO_MOTION_INTR_MASK__LEN 1
|
---|
1901 | #define BNO055_ACCEL_NO_MOTION_INTR_MASK__REG INT_MASK_ADDR
|
---|
1902 |
|
---|
1903 | /* Gyro any motion interrupt register*/
|
---|
1904 | #define BNO055_GYRO_ANY_MOTION_INTR__POS 2
|
---|
1905 | #define BNO055_GYRO_ANY_MOTION_INTR__MSK 0X04
|
---|
1906 | #define BNO055_GYRO_ANY_MOTION_INTR__LEN 1
|
---|
1907 | #define BNO055_GYRO_ANY_MOTION_INTR__REG INT_ADDR
|
---|
1908 |
|
---|
1909 | /* Gyro high rate interrupt register*/
|
---|
1910 | #define BNO055_GYRO_HIGHRATE_INTR__POS 3
|
---|
1911 | #define BNO055_GYRO_HIGHRATE_INTR__MSK 0X08
|
---|
1912 | #define BNO055_GYRO_HIGHRATE_INTR__LEN 1
|
---|
1913 | #define BNO055_GYRO_HIGHRATE_INTR__REG INT_ADDR
|
---|
1914 |
|
---|
1915 | /* Accel high g interrupt register*/
|
---|
1916 | #define BNO055_ACCEL_HIGH_G_INTR__POS 5
|
---|
1917 | #define BNO055_ACCEL_HIGH_G_INTR__MSK 0X20
|
---|
1918 | #define BNO055_ACCEL_HIGH_G_INTR__LEN 1
|
---|
1919 | #define BNO055_ACCEL_HIGH_G_INTR__REG INT_ADDR
|
---|
1920 |
|
---|
1921 | /* Accel any motion interrupt register*/
|
---|
1922 | #define BNO055_ACCEL_ANY_MOTION_INTR__POS 6
|
---|
1923 | #define BNO055_ACCEL_ANY_MOTION_INTR__MSK 0X40
|
---|
1924 | #define BNO055_ACCEL_ANY_MOTION_INTR__LEN 1
|
---|
1925 | #define BNO055_ACCEL_ANY_MOTION_INTR__REG INT_ADDR
|
---|
1926 |
|
---|
1927 | /*Accel any motion interrupt register*/
|
---|
1928 | #define BNO055_ACCEL_NO_MOTION_INTR__POS 7
|
---|
1929 | #define BNO055_ACCEL_NO_MOTION_INTR__MSK 0X80
|
---|
1930 | #define BNO055_ACCEL_NO_MOTION_INTR__LEN 1
|
---|
1931 | #define BNO055_ACCEL_NO_MOTION_INTR__REG INT_ADDR
|
---|
1932 |
|
---|
1933 | /*Accel any motion threshold setting*/
|
---|
1934 | #define BNO055_ACCEL_ANY_MOTION_THRES__POS 0
|
---|
1935 | #define BNO055_ACCEL_ANY_MOTION_THRES__MSK 0XFF
|
---|
1936 | #define BNO055_ACCEL_ANY_MOTION_THRES__LEN 8
|
---|
1937 | #define BNO055_ACCEL_ANY_MOTION_THRES__REG ACCEL_ANY_MOTION_THRES_ADDR
|
---|
1938 |
|
---|
1939 | /*Accel interrupt setting register*/
|
---|
1940 | #define BNO055_ACCEL_ANY_MOTION_DURN_SET__POS 0
|
---|
1941 | #define BNO055_ACCEL_ANY_MOTION_DURN_SET__MSK 0X03
|
---|
1942 | #define BNO055_ACCEL_ANY_MOTION_DURN_SET__LEN 2
|
---|
1943 | #define BNO055_ACCEL_ANY_MOTION_DURN_SET__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1944 |
|
---|
1945 | /* Accel AM/NM axis selection register*/
|
---|
1946 | #define BNO055_ACCEL_ANY_MOTION_X_AXIS__POS 2
|
---|
1947 | #define BNO055_ACCEL_ANY_MOTION_X_AXIS__MSK 0X04
|
---|
1948 | #define BNO055_ACCEL_ANY_MOTION_X_AXIS__LEN 1
|
---|
1949 | #define BNO055_ACCEL_ANY_MOTION_X_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1950 |
|
---|
1951 | #define BNO055_ACCEL_ANY_MOTION_Y_AXIS__POS 3
|
---|
1952 | #define BNO055_ACCEL_ANY_MOTION_Y_AXIS__MSK 0X08
|
---|
1953 | #define BNO055_ACCEL_ANY_MOTION_Y_AXIS__LEN 1
|
---|
1954 | #define BNO055_ACCEL_ANY_MOTION_Y_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1955 |
|
---|
1956 | #define BNO055_ACCEL_ANY_MOTION_Z_AXIS__POS 4
|
---|
1957 | #define BNO055_ACCEL_ANY_MOTION_Z_AXIS__MSK 0X10
|
---|
1958 | #define BNO055_ACCEL_ANY_MOTION_Z_AXIS__LEN 1
|
---|
1959 | #define BNO055_ACCEL_ANY_MOTION_Z_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1960 |
|
---|
1961 | /* Accel high g axis selection register*/
|
---|
1962 | #define BNO055_ACCEL_HIGH_G_X_AXIS__POS 5
|
---|
1963 | #define BNO055_ACCEL_HIGH_G_X_AXIS__MSK 0X20
|
---|
1964 | #define BNO055_ACCEL_HIGH_G_X_AXIS__LEN 1
|
---|
1965 | #define BNO055_ACCEL_HIGH_G_X_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1966 |
|
---|
1967 | #define BNO055_ACCEL_HIGH_G_Y_AXIS__POS 6
|
---|
1968 | #define BNO055_ACCEL_HIGH_G_Y_AXIS__MSK 0X40
|
---|
1969 | #define BNO055_ACCEL_HIGH_G_Y_AXIS__LEN 1
|
---|
1970 | #define BNO055_ACCEL_HIGH_G_Y_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1971 |
|
---|
1972 | #define BNO055_ACCEL_HIGH_G_Z_AXIS__POS 7
|
---|
1973 | #define BNO055_ACCEL_HIGH_G_Z_AXIS__MSK 0X80
|
---|
1974 | #define BNO055_ACCEL_HIGH_G_Z_AXIS__LEN 1
|
---|
1975 | #define BNO055_ACCEL_HIGH_G_Z_AXIS__REG ACCEL_INTR_SETTINGS_ADDR
|
---|
1976 |
|
---|
1977 | /* Accel High g duration setting register*/
|
---|
1978 | #define BNO055_ACCEL_HIGH_G_DURN__POS 0
|
---|
1979 | #define BNO055_ACCEL_HIGH_G_DURN__MSK 0XFF
|
---|
1980 | #define BNO055_ACCEL_HIGH_G_DURN__LEN 8
|
---|
1981 | #define BNO055_ACCEL_HIGH_G_DURN__REG ACCEL_HIGH_G_DURN_ADDR
|
---|
1982 |
|
---|
1983 | /* Accel High g threshold setting register*/
|
---|
1984 | #define BNO055_ACCEL_HIGH_G_THRES__POS 0
|
---|
1985 | #define BNO055_ACCEL_HIGH_G_THRES__MSK 0XFF
|
---|
1986 | #define BNO055_ACCEL_HIGH_G_THRES__LEN 8
|
---|
1987 | #define BNO055_ACCEL_HIGH_G_THRES__REG ACCEL_HIGH_G_THRES_ADDR
|
---|
1988 |
|
---|
1989 | /* Accel no/slow motion threshold setting*/
|
---|
1990 | #define BNO055_ACCEL_SLOW_NO_MOTION_THRES__POS 0
|
---|
1991 | #define BNO055_ACCEL_SLOW_NO_MOTION_THRES__MSK 0XFF
|
---|
1992 | #define BNO055_ACCEL_SLOW_NO_MOTION_THRES__LEN 8
|
---|
1993 | #define BNO055_ACCEL_SLOW_NO_MOTION_THRES__REG \
|
---|
1994 | ACCEL_NO_MOTION_THRES_ADDR
|
---|
1995 |
|
---|
1996 | /* Accel no/slow motion enable setting*/
|
---|
1997 | #define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE__POS 0
|
---|
1998 | #define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE__MSK 0X01
|
---|
1999 | #define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE__LEN 1
|
---|
2000 | #define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE__REG ACCEL_NO_MOTION_SET_ADDR
|
---|
2001 |
|
---|
2002 | /* Accel no/slow motion duration setting*/
|
---|
2003 | #define BNO055_ACCEL_SLOW_NO_MOTION_DURN__POS 1
|
---|
2004 | #define BNO055_ACCEL_SLOW_NO_MOTION_DURN__MSK 0X7E
|
---|
2005 | #define BNO055_ACCEL_SLOW_NO_MOTION_DURN__LEN 6
|
---|
2006 | #define BNO055_ACCEL_SLOW_NO_MOTION_DURN__REG ACCEL_NO_MOTION_SET_ADDR
|
---|
2007 |
|
---|
2008 | /*Gyro interrupt setting register*/
|
---|
2009 | /*Gyro any motion axis setting*/
|
---|
2010 | #define BNO055_GYRO_ANY_MOTION_X_AXIS__POS 0
|
---|
2011 | #define BNO055_GYRO_ANY_MOTION_X_AXIS__MSK 0X01
|
---|
2012 | #define BNO055_GYRO_ANY_MOTION_X_AXIS__LEN 1
|
---|
2013 | #define BNO055_GYRO_ANY_MOTION_X_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2014 |
|
---|
2015 | #define BNO055_GYRO_ANY_MOTION_Y_AXIS__POS 1
|
---|
2016 | #define BNO055_GYRO_ANY_MOTION_Y_AXIS__MSK 0X02
|
---|
2017 | #define BNO055_GYRO_ANY_MOTION_Y_AXIS__LEN 1
|
---|
2018 | #define BNO055_GYRO_ANY_MOTION_Y_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2019 |
|
---|
2020 | #define BNO055_GYRO_ANY_MOTION_Z_AXIS__POS 2
|
---|
2021 | #define BNO055_GYRO_ANY_MOTION_Z_AXIS__MSK 0X04
|
---|
2022 | #define BNO055_GYRO_ANY_MOTION_Z_AXIS__LEN 1
|
---|
2023 | #define BNO055_GYRO_ANY_MOTION_Z_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2024 |
|
---|
2025 | /*Gyro high rate axis setting*/
|
---|
2026 | #define BNO055_GYRO_HIGHRATE_X_AXIS__POS 3
|
---|
2027 | #define BNO055_GYRO_HIGHRATE_X_AXIS__MSK 0X08
|
---|
2028 | #define BNO055_GYRO_HIGHRATE_X_AXIS__LEN 1
|
---|
2029 | #define BNO055_GYRO_HIGHRATE_X_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2030 |
|
---|
2031 | #define BNO055_GYRO_HIGHRATE_Y_AXIS__POS 4
|
---|
2032 | #define BNO055_GYRO_HIGHRATE_Y_AXIS__MSK 0X10
|
---|
2033 | #define BNO055_GYRO_HIGHRATE_Y_AXIS__LEN 1
|
---|
2034 | #define BNO055_GYRO_HIGHRATE_Y_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2035 |
|
---|
2036 | #define BNO055_GYRO_HIGHRATE_Z_AXIS__POS 5
|
---|
2037 | #define BNO055_GYRO_HIGHRATE_Z_AXIS__MSK 0X20
|
---|
2038 | #define BNO055_GYRO_HIGHRATE_Z_AXIS__LEN 1
|
---|
2039 | #define BNO055_GYRO_HIGHRATE_Z_AXIS__REG GYRO_INTR_SETING_ADDR
|
---|
2040 |
|
---|
2041 | /* Gyro filter setting*/
|
---|
2042 | #define BNO055_GYRO_ANY_MOTION_FILTER__POS 6
|
---|
2043 | #define BNO055_GYRO_ANY_MOTION_FILTER__MSK 0X40
|
---|
2044 | #define BNO055_GYRO_ANY_MOTION_FILTER__LEN 1
|
---|
2045 | #define BNO055_GYRO_ANY_MOTION_FILTER__REG GYRO_INTR_SETING_ADDR
|
---|
2046 |
|
---|
2047 | #define BNO055_GYRO_HIGHRATE_FILTER__POS 7
|
---|
2048 | #define BNO055_GYRO_HIGHRATE_FILTER__MSK 0X80
|
---|
2049 | #define BNO055_GYRO_HIGHRATE_FILTER__LEN 1
|
---|
2050 | #define BNO055_GYRO_HIGHRATE_FILTER__REG GYRO_INTR_SETING_ADDR
|
---|
2051 |
|
---|
2052 | /* Gyro high rate X axis settings*/
|
---|
2053 | #define BNO055_GYRO_HIGHRATE_X_THRES__POS 0
|
---|
2054 | #define BNO055_GYRO_HIGHRATE_X_THRES__MSK 0X1F
|
---|
2055 | #define BNO055_GYRO_HIGHRATE_X_THRES__LEN 5
|
---|
2056 | #define BNO055_GYRO_HIGHRATE_X_THRES__REG GYRO_HIGHRATE_X_SET_ADDR
|
---|
2057 |
|
---|
2058 | #define BNO055_GYRO_HIGHRATE_X_HYST__POS 5
|
---|
2059 | #define BNO055_GYRO_HIGHRATE_X_HYST__MSK 0X60
|
---|
2060 | #define BNO055_GYRO_HIGHRATE_X_HYST__LEN 2
|
---|
2061 | #define BNO055_GYRO_HIGHRATE_X_HYST__REG GYRO_HIGHRATE_X_SET_ADDR
|
---|
2062 |
|
---|
2063 | #define BNO055_GYRO_HIGHRATE_X_DURN__POS 0
|
---|
2064 | #define BNO055_GYRO_HIGHRATE_X_DURN__MSK 0XFF
|
---|
2065 | #define BNO055_GYRO_HIGHRATE_X_DURN__LEN 8
|
---|
2066 | #define BNO055_GYRO_HIGHRATE_X_DURN__REG GYRO_DURN_X_ADDR
|
---|
2067 |
|
---|
2068 | /* Gyro high rate Y axis settings*/
|
---|
2069 | #define BNO055_GYRO_HIGHRATE_Y_THRES__POS 0
|
---|
2070 | #define BNO055_GYRO_HIGHRATE_Y_THRES__MSK 0X1F
|
---|
2071 | #define BNO055_GYRO_HIGHRATE_Y_THRES__LEN 5
|
---|
2072 | #define BNO055_GYRO_HIGHRATE_Y_THRES__REG GYRO_HIGHRATE_Y_SET_ADDR
|
---|
2073 |
|
---|
2074 | #define BNO055_GYRO_HIGHRATE_Y_HYST__POS 5
|
---|
2075 | #define BNO055_GYRO_HIGHRATE_Y_HYST__MSK 0X60
|
---|
2076 | #define BNO055_GYRO_HIGHRATE_Y_HYST__LEN 2
|
---|
2077 | #define BNO055_GYRO_HIGHRATE_Y_HYST__REG GYRO_HIGHRATE_Y_SET_ADDR
|
---|
2078 |
|
---|
2079 | #define BNO055_GYRO_HIGHRATE_Y_DURN__POS 0
|
---|
2080 | #define BNO055_GYRO_HIGHRATE_Y_DURN__MSK 0XFF
|
---|
2081 | #define BNO055_GYRO_HIGHRATE_Y_DURN__LEN 8
|
---|
2082 | #define BNO055_GYRO_HIGHRATE_Y_DURN__REG GYRO_DURN_Y_ADDR
|
---|
2083 |
|
---|
2084 | /* Gyro high rate Z axis settings*/
|
---|
2085 | #define BNO055_GYRO_HIGHRATE_Z_THRES__POS 0
|
---|
2086 | #define BNO055_GYRO_HIGHRATE_Z_THRES__MSK 0X1F
|
---|
2087 | #define BNO055_GYRO_HIGHRATE_Z_THRES__LEN 5
|
---|
2088 | #define BNO055_GYRO_HIGHRATE_Z_THRES__REG GYRO_HIGHRATE_Z_SET_ADDR
|
---|
2089 |
|
---|
2090 | #define BNO055_GYRO_HIGHRATE_Z_HYST__POS 5
|
---|
2091 | #define BNO055_GYRO_HIGHRATE_Z_HYST__MSK 0X60
|
---|
2092 | #define BNO055_GYRO_HIGHRATE_Z_HYST__LEN 2
|
---|
2093 | #define BNO055_GYRO_HIGHRATE_Z_HYST__REG GYRO_HIGHRATE_Z_SET_ADDR
|
---|
2094 |
|
---|
2095 | #define BNO055_GYRO_HIGHRATE_Z_DURN__POS 0
|
---|
2096 | #define BNO055_GYRO_HIGHRATE_Z_DURN__MSK 0XFF
|
---|
2097 | #define BNO055_GYRO_HIGHRATE_Z_DURN__LEN 8
|
---|
2098 | #define BNO055_GYRO_HIGHRATE_Z_DURN__REG GYRO_DURN_Z_ADDR
|
---|
2099 |
|
---|
2100 | /*Gyro any motion threshold setting*/
|
---|
2101 | #define BNO055_GYRO_ANY_MOTION_THRES__POS 0
|
---|
2102 | #define BNO055_GYRO_ANY_MOTION_THRES__MSK 0X7F
|
---|
2103 | #define BNO055_GYRO_ANY_MOTION_THRES__LEN 7
|
---|
2104 | #define BNO055_GYRO_ANY_MOTION_THRES__REG \
|
---|
2105 | GYRO_ANY_MOTION_THRES_ADDR
|
---|
2106 |
|
---|
2107 | /* Gyro any motion slope sample setting*/
|
---|
2108 | #define BNO055_GYRO_SLOPE_SAMPLES__POS 0
|
---|
2109 | #define BNO055_GYRO_SLOPE_SAMPLES__MSK 0X03
|
---|
2110 | #define BNO055_GYRO_SLOPE_SAMPLES__LEN 2
|
---|
2111 | #define BNO055_GYRO_SLOPE_SAMPLES__REG GYRO_ANY_MOTION_SET_ADDR
|
---|
2112 |
|
---|
2113 | /* Gyro awake duration setting*/
|
---|
2114 | #define BNO055_GYRO_AWAKE_DURN__POS 2
|
---|
2115 | #define BNO055_GYRO_AWAKE_DURN__MSK 0X0C
|
---|
2116 | #define BNO055_GYRO_AWAKE_DURN__LEN 2
|
---|
2117 | #define BNO055_GYRO_AWAKE_DURN__REG GYRO_ANY_MOTION_SET_ADDR
|
---|
2118 |
|
---|
2119 | /* PAGE1 DATA REGISTERS DEFINITION END*/
|
---|
2120 | /*************************************************/
|
---|
2121 | /**\name GET AND SET BITSLICE FUNCTIONS */
|
---|
2122 | /*************************************************/
|
---|
2123 | #define BNO055_GET_BITSLICE(regvar, bitname)\
|
---|
2124 | ((regvar & bitname##__MSK) >> bitname##__POS)
|
---|
2125 |
|
---|
2126 |
|
---|
2127 | #define BNO055_SET_BITSLICE(regvar, bitname, val)\
|
---|
2128 | ((regvar & ~bitname##__MSK) | ((val<<bitname##__POS)&bitname##__MSK))
|
---|
2129 | /*************************************************/
|
---|
2130 | /**\name FUNCTION DECLARATION */
|
---|
2131 | /*************************************************/
|
---|
2132 | /**************************************************/
|
---|
2133 | /**\name INITIALIZATION AND REVISION ID FUNCTIONS */
|
---|
2134 | /**************************************************/
|
---|
2135 | /*!
|
---|
2136 | * @brief
|
---|
2137 | * This function is used for initialize
|
---|
2138 | * bus read, bus write function pointers,device
|
---|
2139 | * address,accel revision id, gyro revision id
|
---|
2140 | * mag revision id, software revision id, boot loader
|
---|
2141 | * revision id and page id
|
---|
2142 | *
|
---|
2143 | * @param bno055 - structure pointer
|
---|
2144 | *
|
---|
2145 | *
|
---|
2146 | * @return results of bus communication function
|
---|
2147 | * @retval 0 -> Success
|
---|
2148 | * @retval 1 -> Error
|
---|
2149 | *
|
---|
2150 | * @note While changing the parameter of the bno055_t
|
---|
2151 | * consider the following point:
|
---|
2152 | * Changing the reference value of the parameter
|
---|
2153 | * will changes the local copy or local reference
|
---|
2154 | * make sure your changes will not
|
---|
2155 | * affect the reference value of the parameter
|
---|
2156 | * (Better case don't change the reference value of the parameter)
|
---|
2157 | */
|
---|
2158 | BNO055_RETURN_FUNCTION_TYPE bno055_init(struct bno055_t *bno055);
|
---|
2159 | /*!
|
---|
2160 | * @brief
|
---|
2161 | * This API gives data to the given register and
|
---|
2162 | * the data is written in the corresponding register address
|
---|
2163 | *
|
---|
2164 | * @param v_addr_u_8 : Address of the register
|
---|
2165 | * @param p_data_u_8 : Data to be written to the register
|
---|
2166 | * @param v_len_u_8 : Length of the Data
|
---|
2167 | *
|
---|
2168 | * @return results of bus communication function
|
---|
2169 | * @retval 0 -> Success
|
---|
2170 | * @retval 1 -> Error
|
---|
2171 | *
|
---|
2172 | *
|
---|
2173 | */
|
---|
2174 | BNO055_RETURN_FUNCTION_TYPE bno055_write_register(u_8 v_addr_u_8,
|
---|
2175 | u_8 *p_data_u_8, u_8 v_len_u_8);
|
---|
2176 | /*!
|
---|
2177 | * @brief This API reads the data from
|
---|
2178 | * the given register address
|
---|
2179 | *
|
---|
2180 | * @param v_addr_u_8 : Address of the register
|
---|
2181 | * @param p_data_u_8 : address of the variable,
|
---|
2182 | * read value will be kept
|
---|
2183 | * @param v_len_u_8 : Length of the data
|
---|
2184 | *
|
---|
2185 | *
|
---|
2186 | * @return results of bus communication function
|
---|
2187 | * @retval 0 -> Success
|
---|
2188 | * @retval 1 -> Error
|
---|
2189 | *
|
---|
2190 | */
|
---|
2191 | BNO055_RETURN_FUNCTION_TYPE bno055_read_register(u_8 v_addr_u_8,
|
---|
2192 | u_8 *p_data_u_8, u_8 v_len_u_8);
|
---|
2193 | /*!
|
---|
2194 | * @brief This API reads chip id
|
---|
2195 | * from register 0x00 it is a byte of data
|
---|
2196 | *
|
---|
2197 | *
|
---|
2198 | * @param v_chip_id_u_8 : The chip id value 0xA0
|
---|
2199 | *
|
---|
2200 | * @return results of bus communication function
|
---|
2201 | * @retval 0 -> Success
|
---|
2202 | * @retval 1 -> Error
|
---|
2203 | */
|
---|
2204 | BNO055_RETURN_FUNCTION_TYPE bno055_read_chip_id(u_8 *v_chip_id_u_8);
|
---|
2205 | /*!
|
---|
2206 | * @brief This API reads software revision id
|
---|
2207 | * from register 0x04 and 0x05 it is a two byte of data
|
---|
2208 | *
|
---|
2209 | * @param v_sw_id_u_8 : The SW revision id
|
---|
2210 | *
|
---|
2211 | * @return results of bus communication function
|
---|
2212 | * @retval 0 -> Success
|
---|
2213 | * @retval 1 -> Error
|
---|
2214 | *
|
---|
2215 | *
|
---|
2216 | */
|
---|
2217 | BNO055_RETURN_FUNCTION_TYPE bno055_read_sw_rev_id(u_16 *v_sw_id_u_8);
|
---|
2218 | /*!
|
---|
2219 | * @brief This API reads page id
|
---|
2220 | * from register 0x07 it is a byte of data
|
---|
2221 | *
|
---|
2222 | *
|
---|
2223 | * @param v_page_id_u_8 : The value of page id
|
---|
2224 | *
|
---|
2225 | * PAGE_ZERO -> 0x00
|
---|
2226 | * PAGE_ONE -> 0x01
|
---|
2227 | *
|
---|
2228 | * @return results of bus communication function
|
---|
2229 | * @retval 0 -> Success
|
---|
2230 | * @retval 1 -> Error
|
---|
2231 | *
|
---|
2232 | *
|
---|
2233 | */
|
---|
2234 | BNO055_RETURN_FUNCTION_TYPE bno055_read_page_id(u_8 *v_page_id_u_8);
|
---|
2235 | /*!
|
---|
2236 | * @brief This API used to write
|
---|
2237 | * the page id register 0x07
|
---|
2238 | *
|
---|
2239 | * @param v_page_id_u_8 : The value of page id
|
---|
2240 | *
|
---|
2241 | * PAGE_ZERO -> 0x00
|
---|
2242 | * PAGE_ONE -> 0x01
|
---|
2243 | *
|
---|
2244 | * @return results of bus communication function
|
---|
2245 | * @retval 0 -> Success
|
---|
2246 | * @retval 1 -> Error
|
---|
2247 | *
|
---|
2248 | *
|
---|
2249 | */
|
---|
2250 | BNO055_RETURN_FUNCTION_TYPE bno055_write_page_id(u_8 v_page_id_u_8);
|
---|
2251 | /*!
|
---|
2252 | * @brief This API reads accel revision id
|
---|
2253 | * from register 0x01 it is a byte of value
|
---|
2254 | *
|
---|
2255 | * @param v_accel_rev_id_u_8 : The accel revision id 0xFB
|
---|
2256 | *
|
---|
2257 | * @return results of bus communication function
|
---|
2258 | * @retval 0 -> Success
|
---|
2259 | * @retval 1 -> Error
|
---|
2260 | *
|
---|
2261 | *
|
---|
2262 | */
|
---|
2263 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_rev_id(
|
---|
2264 | u_8 *v_accel_rev_id_u_8);
|
---|
2265 | /*!
|
---|
2266 | * @brief This API reads mag revision id
|
---|
2267 | * from register 0x02 it is a byte of value
|
---|
2268 | *
|
---|
2269 | * @param v_mag_rev_id_u_8 : The mag revision id 0x32
|
---|
2270 | *
|
---|
2271 | * @return results of bus communication function
|
---|
2272 | * @retval 0 -> Success
|
---|
2273 | * @retval 1 -> Error
|
---|
2274 | *
|
---|
2275 | *
|
---|
2276 | */
|
---|
2277 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_rev_id(
|
---|
2278 | u_8 *v_mag_rev_id_u_8);
|
---|
2279 | /*!
|
---|
2280 | * @brief This API reads gyro revision id
|
---|
2281 | * from register 0x03 it is a byte of value
|
---|
2282 | *
|
---|
2283 | * @param v_gyro_rev_id_u_8 : The gyro revision id 0xF0
|
---|
2284 | *
|
---|
2285 | *
|
---|
2286 | *
|
---|
2287 | * @return results of bus communication function
|
---|
2288 | * @retval 0 -> Success
|
---|
2289 | * @retval 1 -> Error
|
---|
2290 | *
|
---|
2291 | *
|
---|
2292 | */
|
---|
2293 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_rev_id(
|
---|
2294 | u_8 *v_gyro_rev_id_u_8);
|
---|
2295 | /*!
|
---|
2296 | * @brief This API used to read boot loader revision id
|
---|
2297 | * from register 0x06 it is a byte of value
|
---|
2298 | *
|
---|
2299 | * @param v_bl_rev_id_u_8 : The boot loader revision id
|
---|
2300 | *
|
---|
2301 | *
|
---|
2302 | * @return results of bus communication function
|
---|
2303 | * @retval 0 -> Success
|
---|
2304 | * @retval 1 -> Error
|
---|
2305 | *
|
---|
2306 | *
|
---|
2307 | */
|
---|
2308 | BNO055_RETURN_FUNCTION_TYPE bno055_read_bl_rev_id(
|
---|
2309 | u_8 *v_bl_rev_id_u_8);
|
---|
2310 | /**************************************************/
|
---|
2311 | /**\name ACCEL DATA READ FUNCTIONS */
|
---|
2312 | /**************************************************/
|
---|
2313 | /*!
|
---|
2314 | * @brief This API reads acceleration data X values
|
---|
2315 | * from register 0x08 and 0x09 it is a two byte data
|
---|
2316 | *
|
---|
2317 | *
|
---|
2318 | *
|
---|
2319 | *
|
---|
2320 | * @param v_accel_x_s_16 : The X raw data
|
---|
2321 | *
|
---|
2322 | *
|
---|
2323 | *
|
---|
2324 | * @return results of bus communication function
|
---|
2325 | * @retval 0 -> Success
|
---|
2326 | * @retval 1 -> Error
|
---|
2327 | *
|
---|
2328 | *
|
---|
2329 | */
|
---|
2330 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_x(s_16 *v_accel_x_s_16);
|
---|
2331 | /*!
|
---|
2332 | * @brief This API reads acceleration data Y values
|
---|
2333 | * from register 0x0A and 0x0B it is a two byte data
|
---|
2334 | *
|
---|
2335 | *
|
---|
2336 | *
|
---|
2337 | *
|
---|
2338 | * @param v_accel_y_s_16 : The Y raw data
|
---|
2339 | *
|
---|
2340 | *
|
---|
2341 | *
|
---|
2342 | * @return results of bus communication function
|
---|
2343 | * @retval 0 -> Success
|
---|
2344 | * @retval 1 -> Error
|
---|
2345 | *
|
---|
2346 | *
|
---|
2347 | */
|
---|
2348 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_y(s_16 *v_accel_y_s_16);
|
---|
2349 | /*!
|
---|
2350 | * @brief This API reads acceleration data z values
|
---|
2351 | * from register 0x0C and 0x0D it is a two byte data
|
---|
2352 | *
|
---|
2353 | *
|
---|
2354 | *
|
---|
2355 | *
|
---|
2356 | * @param v_accel_z_s_16 : The z raw data
|
---|
2357 | *
|
---|
2358 | *
|
---|
2359 | *
|
---|
2360 | * @return results of bus communication function
|
---|
2361 | * @retval 0 -> Success
|
---|
2362 | * @retval 1 -> Error
|
---|
2363 | *
|
---|
2364 | *
|
---|
2365 | */
|
---|
2366 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_z(s_16 *v_accel_z_s_16);
|
---|
2367 | /*!
|
---|
2368 | * @brief This API reads acceleration data xyz values
|
---|
2369 | * from register 0x08 to 0x0D it is a six byte data
|
---|
2370 | *
|
---|
2371 | *
|
---|
2372 | * @param accel : The value of accel xyz data
|
---|
2373 | *
|
---|
2374 | * Parameter | result
|
---|
2375 | * --------- | -----------------
|
---|
2376 | * x | The accel x data
|
---|
2377 | * y | The accel y data
|
---|
2378 | * z | The accel z data
|
---|
2379 | *
|
---|
2380 | *
|
---|
2381 | *
|
---|
2382 | * @return results of bus communication function
|
---|
2383 | * @retval 0 -> Success
|
---|
2384 | * @retval 1 -> Error
|
---|
2385 | *
|
---|
2386 | */
|
---|
2387 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_xyz(
|
---|
2388 | struct bno055_accel_t *accel);
|
---|
2389 | /**************************************************/
|
---|
2390 | /**\name MAG DATA READ FUNCTIONS */
|
---|
2391 | /**************************************************/
|
---|
2392 | /*!
|
---|
2393 | * @brief This API reads mag data x values
|
---|
2394 | * from register 0x0E and 0x0F it is a two byte data
|
---|
2395 | *
|
---|
2396 | *
|
---|
2397 | *
|
---|
2398 | *
|
---|
2399 | * @param v_mag_x_s_16 : The x raw data
|
---|
2400 | *
|
---|
2401 | *
|
---|
2402 | *
|
---|
2403 | * @return results of bus communication function
|
---|
2404 | * @retval 0 -> Success
|
---|
2405 | * @retval 1 -> Error
|
---|
2406 | *
|
---|
2407 | *
|
---|
2408 | *
|
---|
2409 | */
|
---|
2410 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_x(s_16 *v_mag_x_s_16);
|
---|
2411 | /*!
|
---|
2412 | * @brief This API reads mag data y values
|
---|
2413 | * from register 0x10 and 0x11 it is a two byte data
|
---|
2414 | *
|
---|
2415 | *
|
---|
2416 | *
|
---|
2417 | *
|
---|
2418 | * @param v_mag_y_s_16 : The y raw data
|
---|
2419 | *
|
---|
2420 | *
|
---|
2421 | *
|
---|
2422 | * @return results of bus communication function
|
---|
2423 | * @retval 0 -> Success
|
---|
2424 | * @retval 1 -> Error
|
---|
2425 | *
|
---|
2426 | *
|
---|
2427 | */
|
---|
2428 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_y(s_16 *v_mag_y_s_16);
|
---|
2429 | /*!
|
---|
2430 | * @brief This API reads mag data z values
|
---|
2431 | * from register 0x12 and 0x13 it is a two byte data
|
---|
2432 | *
|
---|
2433 | *
|
---|
2434 | *
|
---|
2435 | *
|
---|
2436 | * @param v_mag_z_s_16 : The z raw data
|
---|
2437 | *
|
---|
2438 | *
|
---|
2439 | *
|
---|
2440 | * @return results of bus communication function
|
---|
2441 | * @retval 0 -> Success
|
---|
2442 | * @retval 1 -> Error
|
---|
2443 | *
|
---|
2444 | *
|
---|
2445 | *
|
---|
2446 | */
|
---|
2447 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_z(s_16 *v_mag_z_s_16);
|
---|
2448 | /*!
|
---|
2449 | * @brief This API reads mag data xyz values
|
---|
2450 | * from register 0x0E to 0x13 it is a six byte data
|
---|
2451 | *
|
---|
2452 | *
|
---|
2453 | * @param mag : The mag xyz values
|
---|
2454 | *
|
---|
2455 | * Parameter | result
|
---|
2456 | * --------- | -----------------
|
---|
2457 | * x | The mag x data
|
---|
2458 | * y | The mag y data
|
---|
2459 | * z | The mag z data
|
---|
2460 | *
|
---|
2461 | *
|
---|
2462 | *
|
---|
2463 | * @return results of bus communication function
|
---|
2464 | * @retval 0 -> Success
|
---|
2465 | * @retval 1 -> Error
|
---|
2466 | *
|
---|
2467 | */
|
---|
2468 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_xyz(struct bno055_mag_t *mag);
|
---|
2469 | /**************************************************/
|
---|
2470 | /**\name GYRO DATA READ FUNCTIONS */
|
---|
2471 | /**************************************************/
|
---|
2472 | /*!
|
---|
2473 | * @brief This API reads gyro data x values
|
---|
2474 | * from register 0x14 and 0x15 it is a two byte data
|
---|
2475 | *
|
---|
2476 | *
|
---|
2477 | *
|
---|
2478 | *
|
---|
2479 | * @param v_gyro_x_s_16 : The x raw data
|
---|
2480 | *
|
---|
2481 | *
|
---|
2482 | *
|
---|
2483 | * @return results of bus communication function
|
---|
2484 | * @retval 0 -> Success
|
---|
2485 | * @retval 1 -> Error
|
---|
2486 | *
|
---|
2487 | *
|
---|
2488 | */
|
---|
2489 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_x(s_16 *v_gyro_x_s_16);
|
---|
2490 | /*!
|
---|
2491 | * @brief This API reads gyro data y values
|
---|
2492 | * from register 0x16 and 0x17 it is a two byte data
|
---|
2493 | *
|
---|
2494 | *
|
---|
2495 | *
|
---|
2496 | *
|
---|
2497 | * @param v_gyro_y_s_16 : The y raw data
|
---|
2498 | *
|
---|
2499 | *
|
---|
2500 | *
|
---|
2501 | * @return results of bus communication function
|
---|
2502 | * @retval 0 -> Success
|
---|
2503 | * @retval 1 -> Error
|
---|
2504 | *
|
---|
2505 | *
|
---|
2506 | */
|
---|
2507 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_y(s_16 *v_gyro_y_s_16);
|
---|
2508 | /*!
|
---|
2509 | * @brief This API reads gyro data z values
|
---|
2510 | * from register 0x18 and 0x19 it is a two byte data
|
---|
2511 | *
|
---|
2512 | * @param v_gyro_z_s_16 : The z raw data
|
---|
2513 | *
|
---|
2514 | * @return results of bus communication function
|
---|
2515 | * @retval 0 -> Success
|
---|
2516 | * @retval 1 -> Error
|
---|
2517 | *
|
---|
2518 | *
|
---|
2519 | */
|
---|
2520 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_z(s_16 *v_gyro_z_s_16);
|
---|
2521 | /*!
|
---|
2522 | * @brief This API reads gyro data xyz values
|
---|
2523 | * from register 0x14 to 0x19 it is a six byte data
|
---|
2524 | *
|
---|
2525 | *
|
---|
2526 | * @param gyro : The value of gyro xyz data's
|
---|
2527 | *
|
---|
2528 | * Parameter | result
|
---|
2529 | * --------- | -----------------
|
---|
2530 | * x | The gyro x data
|
---|
2531 | * y | The gyro y data
|
---|
2532 | * z | The gyro z data
|
---|
2533 | *
|
---|
2534 | *
|
---|
2535 | *
|
---|
2536 | * @return results of bus communication function
|
---|
2537 | * @retval 0 -> Success
|
---|
2538 | * @retval 1 -> Error
|
---|
2539 | *
|
---|
2540 | */
|
---|
2541 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_xyz(struct bno055_gyro_t *gyro);
|
---|
2542 | /**************************************************/
|
---|
2543 | /**\name EULER DATA READ FUNCTIONS */
|
---|
2544 | /**************************************************/
|
---|
2545 | /*!
|
---|
2546 | * @brief This API reads gyro data z values
|
---|
2547 | * from register 0x1A and 0x1B it is a two byte data
|
---|
2548 | *
|
---|
2549 | * @param v_euler_h_s_16 : The raw h data
|
---|
2550 | *
|
---|
2551 | * @return results of bus communication function
|
---|
2552 | * @retval 0 -> Success
|
---|
2553 | * @retval 1 -> Error
|
---|
2554 | *
|
---|
2555 | */
|
---|
2556 | BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_h(s_16 *v_euler_h_s_16);
|
---|
2557 | /*!
|
---|
2558 | * @brief This API reads Euler data r values
|
---|
2559 | * from register 0x1C and 0x1D it is a two byte data
|
---|
2560 | *
|
---|
2561 | * @param v_euler_r_s_16 : The raw r data
|
---|
2562 | *
|
---|
2563 | * @return results of bus communication function
|
---|
2564 | * @retval 0 -> Success
|
---|
2565 | * @retval 1 -> Error
|
---|
2566 | *
|
---|
2567 | */
|
---|
2568 | BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_r(s_16 *v_euler_r_s_16);
|
---|
2569 | /*!
|
---|
2570 | * @brief This API reads Euler data p values
|
---|
2571 | * from register 0x1E and 0x1F it is a two byte data
|
---|
2572 | *
|
---|
2573 | * @param v_euler_p_s_16 : The raw p data
|
---|
2574 | *
|
---|
2575 | * @return results of bus communication function
|
---|
2576 | * @retval 0 -> Success
|
---|
2577 | * @retval 1 -> Error
|
---|
2578 | *
|
---|
2579 | *
|
---|
2580 | */
|
---|
2581 | BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_p(s_16 *v_euler_p_s_16);
|
---|
2582 | /*!
|
---|
2583 | * @brief This API reads Euler data hrp values
|
---|
2584 | * from register 0x1A to 0x1F it is a six byte data
|
---|
2585 | *
|
---|
2586 | *
|
---|
2587 | * @param euler : The Euler hrp data's
|
---|
2588 | *
|
---|
2589 | * Parameter | result
|
---|
2590 | * --------- | -----------------
|
---|
2591 | * h | The Euler h data
|
---|
2592 | * r | The Euler r data
|
---|
2593 | * p | The Euler p data
|
---|
2594 | *
|
---|
2595 | *
|
---|
2596 | * @return results of bus communication function
|
---|
2597 | * @retval 0 -> Success
|
---|
2598 | * @retval 1 -> Error
|
---|
2599 | *
|
---|
2600 | */
|
---|
2601 | BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_hrp(
|
---|
2602 | struct bno055_euler_t *euler);
|
---|
2603 | /**************************************************/
|
---|
2604 | /**\name QUATERNION DATA READ FUNCTIONS */
|
---|
2605 | /**************************************************/
|
---|
2606 | /*!
|
---|
2607 | * @brief This API reads quaternion data w values
|
---|
2608 | * from register 0x20 and 0x21 it is a two byte data
|
---|
2609 | *
|
---|
2610 | * @param v_quaternion_w_s_16 : The raw w data
|
---|
2611 | *
|
---|
2612 | * @return results of bus communication function
|
---|
2613 | * @retval 0 -> Success
|
---|
2614 | * @retval 1 -> Error
|
---|
2615 | *
|
---|
2616 | *
|
---|
2617 | */
|
---|
2618 | BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_w(
|
---|
2619 | s_16 *v_quaternion_w_s_16);
|
---|
2620 | /*!
|
---|
2621 | * @brief This API reads quaternion data x values
|
---|
2622 | * from register 0x22 and 0x23 it is a two byte data
|
---|
2623 | *
|
---|
2624 | * @param v_quaternion_x_s_16 : The raw x data
|
---|
2625 | *
|
---|
2626 | * @return results of bus communication function
|
---|
2627 | * @retval 0 -> Success
|
---|
2628 | * @retval 1 -> Error
|
---|
2629 | *
|
---|
2630 | *
|
---|
2631 | */
|
---|
2632 | BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_x(
|
---|
2633 | s_16 *v_quaternion_x_s_16);
|
---|
2634 | /*!
|
---|
2635 | * @brief This API reads quaternion data y values
|
---|
2636 | * from register 0x24 and 0x25 it is a two byte data
|
---|
2637 | *
|
---|
2638 | * @param v_quaternion_y_s_16 : The raw y data
|
---|
2639 | *
|
---|
2640 | * @return results of bus communication function
|
---|
2641 | * @retval 0 -> Success
|
---|
2642 | * @retval 1 -> Error
|
---|
2643 | *
|
---|
2644 | *
|
---|
2645 | */
|
---|
2646 | BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_y(
|
---|
2647 | s_16 *v_quaternion_y_s_16);
|
---|
2648 | /*!
|
---|
2649 | * @brief This API reads quaternion data z values
|
---|
2650 | * from register 0x26 and 0x27 it is a two byte data
|
---|
2651 | *
|
---|
2652 | * @param v_quaternion_z_s_16 : The raw z data
|
---|
2653 | *
|
---|
2654 | * @return results of bus communication function
|
---|
2655 | * @retval 0 -> Success
|
---|
2656 | * @retval 1 -> Error
|
---|
2657 | *
|
---|
2658 | *
|
---|
2659 | */
|
---|
2660 | BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_z(
|
---|
2661 | s_16 *v_quaternion_z_s_16);
|
---|
2662 | /*!
|
---|
2663 | * @brief This API reads Quaternion data wxyz values
|
---|
2664 | * from register 0x20 to 0x27 it is a six byte data
|
---|
2665 | *
|
---|
2666 | *
|
---|
2667 | * @param quaternion : The value of quaternion wxyz data's
|
---|
2668 | *
|
---|
2669 | * Parameter | result
|
---|
2670 | * --------- | -----------------
|
---|
2671 | * w | The quaternion w data
|
---|
2672 | * x | The quaternion x data
|
---|
2673 | * y | The quaternion y data
|
---|
2674 | * z | The quaternion z data
|
---|
2675 | *
|
---|
2676 | *
|
---|
2677 | *
|
---|
2678 | * @return results of bus communication function
|
---|
2679 | * @retval 0 -> Success
|
---|
2680 | * @retval 1 -> Error
|
---|
2681 | *
|
---|
2682 | */
|
---|
2683 | BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_wxyz(
|
---|
2684 | struct bno055_quaternion_t *quaternion);
|
---|
2685 | /**************************************************/
|
---|
2686 | /**\name LINEAR ACCEL DATA READ FUNCTIONS */
|
---|
2687 | /**************************************************/
|
---|
2688 | /*!
|
---|
2689 | * @brief This API reads Linear accel data x values
|
---|
2690 | * from register 0x29 and 0x2A it is a two byte data
|
---|
2691 | *
|
---|
2692 | * @param v_linear_accel_x_s_16 : The raw x data
|
---|
2693 | *
|
---|
2694 | * @return results of bus communication function
|
---|
2695 | * @retval 0 -> Success
|
---|
2696 | * @retval 1 -> Error
|
---|
2697 | *
|
---|
2698 | *
|
---|
2699 | */
|
---|
2700 | BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_x(
|
---|
2701 | s_16 *v_linear_accel_x_s_16);
|
---|
2702 | /*!
|
---|
2703 | * @brief This API reads Linear accel data x values
|
---|
2704 | * from register 0x2B and 0x2C it is a two byte data
|
---|
2705 | *
|
---|
2706 | * @param v_linear_accel_y_s_16 : The raw y data
|
---|
2707 | *
|
---|
2708 | * @return results of bus communication function
|
---|
2709 | * @retval 0 -> Success
|
---|
2710 | * @retval 1 -> Error
|
---|
2711 | *
|
---|
2712 | *
|
---|
2713 | */
|
---|
2714 | BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_y(
|
---|
2715 | s_16 *v_linear_accel_y_s_16);
|
---|
2716 | /*!
|
---|
2717 | * @brief This API reads Linear accel data x values
|
---|
2718 | * from register 0x2C and 0x2D it is a two byte data
|
---|
2719 | *
|
---|
2720 | * @param v_linear_accel_z_s_16 : The raw z data
|
---|
2721 | *
|
---|
2722 | * @return results of bus communication function
|
---|
2723 | * @retval 0 -> Success
|
---|
2724 | * @retval 1 -> Error
|
---|
2725 | *
|
---|
2726 | *
|
---|
2727 | */
|
---|
2728 | BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_z(
|
---|
2729 | s_16 *v_linear_accel_z_s_16);
|
---|
2730 | /*!
|
---|
2731 | * @brief This API reads Linear accel data xyz values
|
---|
2732 | * from register 0x28 to 0x2D it is a six byte data
|
---|
2733 | *
|
---|
2734 | *
|
---|
2735 | * @param linear_accel : The value of linear accel xyz data's
|
---|
2736 | *
|
---|
2737 | * Parameter | result
|
---|
2738 | * --------- | -----------------
|
---|
2739 | * x | The linear accel x data
|
---|
2740 | * y | The linear accel y data
|
---|
2741 | * z | The linear accel z data
|
---|
2742 | *
|
---|
2743 | *
|
---|
2744 | * @return results of bus communication function
|
---|
2745 | * @retval 0 -> Success
|
---|
2746 | * @retval 1 -> Error
|
---|
2747 | */
|
---|
2748 | BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_xyz(
|
---|
2749 | struct bno055_linear_accel_t *linear_accel);
|
---|
2750 | /**************************************************/
|
---|
2751 | /**\name GRAVITY DATA READ FUNCTIONS */
|
---|
2752 | /**************************************************/
|
---|
2753 | /*!
|
---|
2754 | * @brief This API reads gravity data x values
|
---|
2755 | * from register 0x2E and 0x2F it is a two byte data
|
---|
2756 | *
|
---|
2757 | * @param v_gravity_x_s_16 : The raw x data
|
---|
2758 | *
|
---|
2759 | * @return results of bus communication function
|
---|
2760 | * @retval 0 -> Success
|
---|
2761 | * @retval 1 -> Error
|
---|
2762 | *
|
---|
2763 | *
|
---|
2764 | */
|
---|
2765 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_x(
|
---|
2766 | s_16 *v_gravity_x_s_16);
|
---|
2767 | /*!
|
---|
2768 | * @brief This API reads gravity data y values
|
---|
2769 | * from register 0x30 and 0x31 it is a two byte data
|
---|
2770 | *
|
---|
2771 | * @param v_gravity_y_s_16 : The raw y data
|
---|
2772 | *
|
---|
2773 | * @return results of bus communication function
|
---|
2774 | * @retval 0 -> Success
|
---|
2775 | * @retval 1 -> Error
|
---|
2776 | *
|
---|
2777 | *
|
---|
2778 | */
|
---|
2779 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_y(
|
---|
2780 | s_16 *v_gravity_y_s_16);
|
---|
2781 | /*!
|
---|
2782 | * @brief This API reads gravity data z values
|
---|
2783 | * from register 0x32 and 0x33 it is a two byte data
|
---|
2784 | *
|
---|
2785 | * @param v_gravity_z_s_16 : The raw z data
|
---|
2786 | *
|
---|
2787 | * @return results of bus communication function
|
---|
2788 | * @retval 0 -> Success
|
---|
2789 | * @retval 1 -> Error
|
---|
2790 | *
|
---|
2791 | *
|
---|
2792 | */
|
---|
2793 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_z(
|
---|
2794 | s_16 *v_gravity_z_s_16);
|
---|
2795 | /*!
|
---|
2796 | * @brief This API reads gravity data xyz values
|
---|
2797 | * from register 0x2E to 0x33 it is a six byte data
|
---|
2798 | *
|
---|
2799 | *
|
---|
2800 | * @param gravity : The value of gravity xyz data's
|
---|
2801 | *
|
---|
2802 | * Parameter | result
|
---|
2803 | * --------- | -----------------
|
---|
2804 | * x | The gravity x data
|
---|
2805 | * y | The gravity y data
|
---|
2806 | * z | The gravity z data
|
---|
2807 | *
|
---|
2808 | *
|
---|
2809 | * @return results of bus communication function
|
---|
2810 | * @retval 0 -> Success
|
---|
2811 | * @retval 1 -> Error
|
---|
2812 | *
|
---|
2813 | */
|
---|
2814 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_xyz(
|
---|
2815 | struct bno055_gravity_t *gravity);
|
---|
2816 | /**************************************************/
|
---|
2817 | /**\name TEMPERATURE DATA READ FUNCTIONS */
|
---|
2818 | /**************************************************/
|
---|
2819 | /*!
|
---|
2820 | * @brief This API reads temperature values
|
---|
2821 | * from register 0x33 it is a byte data
|
---|
2822 | *
|
---|
2823 | * @param v_temp_s_8 : The raw temperature data
|
---|
2824 | *
|
---|
2825 | * @return results of bus communication function
|
---|
2826 | * @retval 0 -> Success
|
---|
2827 | * @retval 1 -> Error
|
---|
2828 | *
|
---|
2829 | *
|
---|
2830 | */
|
---|
2831 | BNO055_RETURN_FUNCTION_TYPE bno055_read_temp_data(s_8 *v_temp_s_8);
|
---|
2832 | #ifdef BNO055_FLOAT_ENABLE
|
---|
2833 | /********************************************************************/
|
---|
2834 | /**\name FUNCTIONS FOR READING ACCEL DATA OUTPUT AS FLOAT PRECISION */
|
---|
2835 | /********************************************************************/
|
---|
2836 | /*!
|
---|
2837 | * @brief This API is used to convert the accel x raw data
|
---|
2838 | * to meterpersecseq output as float
|
---|
2839 | *
|
---|
2840 | * @param v_accel_x_f : The accel x meterpersecseq data
|
---|
2841 | *
|
---|
2842 | *
|
---|
2843 | *
|
---|
2844 | * @return results of bus communication function
|
---|
2845 | * @retval 0 -> Success
|
---|
2846 | * @retval 1 -> Error
|
---|
2847 | *
|
---|
2848 | *
|
---|
2849 | */
|
---|
2850 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_x_msq(
|
---|
2851 | float *v_accel_x_f);
|
---|
2852 | /*!
|
---|
2853 | * @brief This API is used to convert the accel x raw data
|
---|
2854 | * to meterpersecseq output as float
|
---|
2855 | *
|
---|
2856 | * @param v_accel_y_f : The accel y meterpersecseq data
|
---|
2857 | *
|
---|
2858 | *
|
---|
2859 | *
|
---|
2860 | * @return results of bus communication function
|
---|
2861 | * @retval 0 -> Success
|
---|
2862 | * @retval 1 -> Error
|
---|
2863 | *
|
---|
2864 | *
|
---|
2865 | */
|
---|
2866 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_y_msq(
|
---|
2867 | float *v_accel_y_f);
|
---|
2868 | /*!
|
---|
2869 | * @brief This API is used to convert the accel z raw data
|
---|
2870 | * to meterpersecseq output as float
|
---|
2871 | *
|
---|
2872 | * @param v_accel_z_f : The accel z meterpersecseq data
|
---|
2873 | *
|
---|
2874 | *
|
---|
2875 | *
|
---|
2876 | * @return results of bus communication function
|
---|
2877 | * @retval 0 -> Success
|
---|
2878 | * @retval 1 -> Error
|
---|
2879 | *
|
---|
2880 | *
|
---|
2881 | */
|
---|
2882 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_z_msq(
|
---|
2883 | float *v_accel_z_f);
|
---|
2884 | /*!
|
---|
2885 | * @brief This API is used to convert the accel y raw data
|
---|
2886 | * to millig output as float
|
---|
2887 | *
|
---|
2888 | * @param v_accel_x_f : The accel y millig data
|
---|
2889 | *
|
---|
2890 | *
|
---|
2891 | *
|
---|
2892 | * @return results of bus communication function
|
---|
2893 | * @retval 0 -> Success
|
---|
2894 | * @retval 1 -> Error
|
---|
2895 | *
|
---|
2896 | */
|
---|
2897 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_x_mg(
|
---|
2898 | float *v_accel_x_f);
|
---|
2899 | /*!
|
---|
2900 | * @brief This API is used to convert the accel y raw data
|
---|
2901 | * to millig output as float
|
---|
2902 | *
|
---|
2903 | * @param v_accel_y_f : The accel y millig data
|
---|
2904 | *
|
---|
2905 | *
|
---|
2906 | *
|
---|
2907 | * @return results of bus communication function
|
---|
2908 | * @retval 0 -> Success
|
---|
2909 | * @retval 1 -> Error
|
---|
2910 | *
|
---|
2911 | */
|
---|
2912 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_y_mg(
|
---|
2913 | float *v_accel_y_f);
|
---|
2914 | /*!
|
---|
2915 | * @brief This API is used to convert the accel z raw data
|
---|
2916 | * to millig output as float
|
---|
2917 | *
|
---|
2918 | * @param v_accel_z_f : The accel z millig data
|
---|
2919 | *
|
---|
2920 | *
|
---|
2921 | *
|
---|
2922 | * @return results of bus communication function
|
---|
2923 | * @retval 0 -> Success
|
---|
2924 | * @retval 1 -> Error
|
---|
2925 | *
|
---|
2926 | *
|
---|
2927 | */
|
---|
2928 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_z_mg(
|
---|
2929 | float *v_accel_z_f);
|
---|
2930 | /*!
|
---|
2931 | * @brief This API is used to convert the accel xyz raw data
|
---|
2932 | * to meterpersecseq output as float
|
---|
2933 | *
|
---|
2934 | * @param accel_xyz : The meterpersecseq data of accel xyz
|
---|
2935 | *
|
---|
2936 | * Parameter | result
|
---|
2937 | * --------- | -----------------
|
---|
2938 | * x | meterpersecseq data of accel
|
---|
2939 | * y | meterpersecseq data of accel
|
---|
2940 | * z | meterpersecseq data of accel
|
---|
2941 | *
|
---|
2942 | * @return results of bus communication function
|
---|
2943 | * @retval 0 -> Success
|
---|
2944 | * @retval 1 -> Error
|
---|
2945 | *
|
---|
2946 | *
|
---|
2947 | */
|
---|
2948 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_xyz_msq(
|
---|
2949 | struct bno055_accel_float_t *accel_xyz);
|
---|
2950 | /*!
|
---|
2951 | * @brief This API is used to convert the accel xyz raw data
|
---|
2952 | * to millig output as float
|
---|
2953 | *
|
---|
2954 | * @param accel_xyz : The millig data of accel xyz
|
---|
2955 | *
|
---|
2956 | * Parameter | result
|
---|
2957 | * --------- | -----------------
|
---|
2958 | * x | millig data of accel
|
---|
2959 | * y | millig data of accel
|
---|
2960 | * z | millig data of accel
|
---|
2961 | *
|
---|
2962 | *
|
---|
2963 | * @return results of bus communication function
|
---|
2964 | * @retval 0 -> Success
|
---|
2965 | * @retval 1 -> Error
|
---|
2966 | *
|
---|
2967 | *
|
---|
2968 | */
|
---|
2969 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_xyz_mg(
|
---|
2970 | struct bno055_accel_float_t *accel_xyz);
|
---|
2971 | /********************************************************************/
|
---|
2972 | /**\name FUNCTIONS FOR READING MAG DATA OUTPUT AS FLOAT PRECISION */
|
---|
2973 | /********************************************************************/
|
---|
2974 | /*!
|
---|
2975 | * @brief This API is used to convert the mag x raw data
|
---|
2976 | * to microTesla output as float
|
---|
2977 | *
|
---|
2978 | * @param v_mag_x_f : The mag x microTesla data
|
---|
2979 | *
|
---|
2980 | *
|
---|
2981 | *
|
---|
2982 | * @return results of bus communication function
|
---|
2983 | * @retval 0 -> Success
|
---|
2984 | * @retval 1 -> Error
|
---|
2985 | *
|
---|
2986 | *
|
---|
2987 | */
|
---|
2988 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_x_uT(
|
---|
2989 | float *v_mag_x_f);
|
---|
2990 | /*!
|
---|
2991 | * @brief This API is used to convert the mag y raw data
|
---|
2992 | * to microTesla output as float
|
---|
2993 | *
|
---|
2994 | * @param v_mag_y_f : The mag y microTesla data
|
---|
2995 | *
|
---|
2996 | *
|
---|
2997 | *
|
---|
2998 | * @return results of bus communication function
|
---|
2999 | * @retval 0 -> Success
|
---|
3000 | * @retval 1 -> Error
|
---|
3001 | *
|
---|
3002 | */
|
---|
3003 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_y_uT(
|
---|
3004 | float *v_mag_y_f);
|
---|
3005 | /*!
|
---|
3006 | * @brief This API is used to convert the mag z raw data
|
---|
3007 | * to microTesla output as float
|
---|
3008 | *
|
---|
3009 | * @param v_mag_z_f : The mag z microTesla data
|
---|
3010 | *
|
---|
3011 | *
|
---|
3012 | *
|
---|
3013 | * @return results of bus communication function
|
---|
3014 | * @retval 0 -> Success
|
---|
3015 | * @retval 1 -> Error
|
---|
3016 | *
|
---|
3017 | */
|
---|
3018 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_z_uT(
|
---|
3019 | float *v_mag_z_f);
|
---|
3020 | /*!
|
---|
3021 | * @brief This API is used to convert the mag yz raw data
|
---|
3022 | * to microTesla output as float
|
---|
3023 | *
|
---|
3024 | * @param mag_xyz_data : The microTesla data of mag xyz
|
---|
3025 | *
|
---|
3026 | * Parameter | result
|
---|
3027 | * --------- | -----------------
|
---|
3028 | * x | microTesla data of mag
|
---|
3029 | * y | microTesla data of mag
|
---|
3030 | * z | microTesla data of mag
|
---|
3031 | *
|
---|
3032 | *
|
---|
3033 | * @return results of bus communication function
|
---|
3034 | * @retval 0 -> Success
|
---|
3035 | * @retval 1 -> Error
|
---|
3036 | *
|
---|
3037 | */
|
---|
3038 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_xyz_uT(
|
---|
3039 | struct bno055_mag_float_t *mag_xyz_data);
|
---|
3040 | /********************************************************************/
|
---|
3041 | /**\name FUNCTIONS FOR READING GYRO DATA OUTPUT AS FLOAT PRECISION */
|
---|
3042 | /********************************************************************/
|
---|
3043 | /*!
|
---|
3044 | * @brief This API is used to convert the gyro x raw data
|
---|
3045 | * to dps output as float
|
---|
3046 | *
|
---|
3047 | * @param v_gyro_x_f : The gyro x dps float data
|
---|
3048 | *
|
---|
3049 | *
|
---|
3050 | *
|
---|
3051 | * @return results of bus communication function
|
---|
3052 | * @retval 0 -> Success
|
---|
3053 | * @retval 1 -> Error
|
---|
3054 | */
|
---|
3055 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_x_dps(
|
---|
3056 | float *v_gyro_x_f);
|
---|
3057 | /*!
|
---|
3058 | * @brief This API is used to convert the gyro x raw data
|
---|
3059 | * to rps output as float
|
---|
3060 | *
|
---|
3061 | * @param v_gyro_x_f : The gyro x dps float data
|
---|
3062 | *
|
---|
3063 | *
|
---|
3064 | *
|
---|
3065 | * @return results of bus communication function
|
---|
3066 | * @retval 0 -> Success
|
---|
3067 | * @retval 1 -> Error
|
---|
3068 | *
|
---|
3069 | */
|
---|
3070 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_x_rps(
|
---|
3071 | float *v_gyro_x_f);
|
---|
3072 | /*!
|
---|
3073 | * @brief This API is used to convert the gyro y raw data
|
---|
3074 | * to dps output as float
|
---|
3075 | *
|
---|
3076 | * @param v_gyro_y_f : The gyro y dps float data
|
---|
3077 | *
|
---|
3078 | *
|
---|
3079 | *
|
---|
3080 | * @return results of bus communication function
|
---|
3081 | * @retval 0 -> Success
|
---|
3082 | * @retval 1 -> Error
|
---|
3083 | *
|
---|
3084 | */
|
---|
3085 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_y_dps(
|
---|
3086 | float *v_gyro_y_f);
|
---|
3087 | /*!
|
---|
3088 | * @brief This API is used to convert the gyro y raw data
|
---|
3089 | * to rps output as float
|
---|
3090 | *
|
---|
3091 | * @param v_gyro_y_f : The gyro y dps float data
|
---|
3092 | *
|
---|
3093 | *
|
---|
3094 | *
|
---|
3095 | * @return results of bus communication function
|
---|
3096 | * @retval 0 -> Success
|
---|
3097 | * @retval 1 -> Error
|
---|
3098 | *
|
---|
3099 | *
|
---|
3100 | */
|
---|
3101 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_y_rps(
|
---|
3102 | float *v_gyro_y_f);
|
---|
3103 | /*!
|
---|
3104 | * @brief This API is used to convert the gyro z raw data
|
---|
3105 | * to dps output as float
|
---|
3106 | *
|
---|
3107 | * @param v_gyro_z_f : The gyro z dps float data
|
---|
3108 | *
|
---|
3109 | *
|
---|
3110 | *
|
---|
3111 | * @return results of bus communication function
|
---|
3112 | * @retval 0 -> Success
|
---|
3113 | * @retval 1 -> Error
|
---|
3114 | *
|
---|
3115 | */
|
---|
3116 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_z_dps(
|
---|
3117 | float *v_gyro_z_f);
|
---|
3118 | /*!
|
---|
3119 | * @brief This API is used to convert the gyro z raw data
|
---|
3120 | * to rps output as float
|
---|
3121 | *
|
---|
3122 | * @param v_gyro_z_f : The gyro z rps float data
|
---|
3123 | *
|
---|
3124 | *
|
---|
3125 | *
|
---|
3126 | * @return results of bus communication function
|
---|
3127 | * @retval 0 -> Success
|
---|
3128 | * @retval 1 -> Error
|
---|
3129 | *
|
---|
3130 | */
|
---|
3131 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_z_rps(
|
---|
3132 | float *v_gyro_z_f);
|
---|
3133 | /*!
|
---|
3134 | * @brief This API is used to convert the gyro xyz raw data
|
---|
3135 | * to dps output as float
|
---|
3136 | *
|
---|
3137 | * @param gyro_xyz_data : The dps data of gyro xyz
|
---|
3138 | *
|
---|
3139 | * Parameter | result
|
---|
3140 | * --------- | -----------------
|
---|
3141 | * x | dps data of gyro
|
---|
3142 | * y | dps data of gyro
|
---|
3143 | * z | dps data of gyro
|
---|
3144 | *
|
---|
3145 | *
|
---|
3146 | * @return results of bus communication function
|
---|
3147 | * @retval 0 -> Success
|
---|
3148 | * @retval 1 -> Error
|
---|
3149 | *
|
---|
3150 | *
|
---|
3151 | */
|
---|
3152 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_xyz_dps(
|
---|
3153 | struct bno055_gyro_float_t *gyro_xyz_data);
|
---|
3154 | /*!
|
---|
3155 | * @brief This API is used to convert the gyro xyz raw data
|
---|
3156 | * to rps output as float
|
---|
3157 | *
|
---|
3158 | * @param gyro_xyz_data : The rps data of gyro xyz
|
---|
3159 | *
|
---|
3160 | * Parameter | result
|
---|
3161 | * --------- | -----------------
|
---|
3162 | * x | rps data of gyro
|
---|
3163 | * y | rps data of gyro
|
---|
3164 | * z | rps data of gyro
|
---|
3165 | *
|
---|
3166 | *
|
---|
3167 | * @return results of bus communication function
|
---|
3168 | * @retval 0 -> Success
|
---|
3169 | * @retval 1 -> Error
|
---|
3170 | *
|
---|
3171 | *
|
---|
3172 | */
|
---|
3173 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_xyz_rps(
|
---|
3174 | struct bno055_gyro_float_t *gyro_xyz_data);
|
---|
3175 | /********************************************************************/
|
---|
3176 | /**\name FUNCTIONS FOR READING EULER DATA OUTPUT AS FLOAT PRECISION */
|
---|
3177 | /********************************************************************/
|
---|
3178 | /*!
|
---|
3179 | * @brief This API is used to convert the Euler h raw data
|
---|
3180 | * to degree output as float
|
---|
3181 | *
|
---|
3182 | * @param v_euler_h_f : The float value of Euler h degree
|
---|
3183 | *
|
---|
3184 | * @return results of bus communication function
|
---|
3185 | * @retval 0 -> Success
|
---|
3186 | * @retval 1 -> Error
|
---|
3187 | *
|
---|
3188 | *
|
---|
3189 | */
|
---|
3190 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_h_deg(
|
---|
3191 | float *v_euler_h_f);
|
---|
3192 | /*!
|
---|
3193 | * @brief This API is used to convert the Euler h raw data
|
---|
3194 | * to radians output as float
|
---|
3195 | *
|
---|
3196 | * @param v_euler_h_f : The float value of Euler h radians
|
---|
3197 | *
|
---|
3198 | * @return results of bus communication function
|
---|
3199 | * @retval 0 -> Success
|
---|
3200 | * @retval 1 -> Error
|
---|
3201 | *
|
---|
3202 | *
|
---|
3203 | */
|
---|
3204 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_h_rad(
|
---|
3205 | float *v_euler_h_f);
|
---|
3206 | /*!
|
---|
3207 | * @brief This API is used to convert the Euler r raw data
|
---|
3208 | * to degree output as float
|
---|
3209 | *
|
---|
3210 | * @param v_euler_r_f : The float value of Euler r degree
|
---|
3211 | *
|
---|
3212 | * @return results of bus communication function
|
---|
3213 | * @retval 0 -> Success
|
---|
3214 | * @retval 1 -> Error
|
---|
3215 | *
|
---|
3216 | */
|
---|
3217 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_r_deg(
|
---|
3218 | float *v_euler_r_f);
|
---|
3219 | /*!
|
---|
3220 | * @brief This API is used to convert the Euler r raw data
|
---|
3221 | * to radians output as float
|
---|
3222 | *
|
---|
3223 | * @param v_euler_r_f : The float value of Euler r radians
|
---|
3224 | *
|
---|
3225 | * @return results of bus communication function
|
---|
3226 | * @retval 0 -> Success
|
---|
3227 | * @retval 1 -> Error
|
---|
3228 | *
|
---|
3229 | */
|
---|
3230 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_r_rad(
|
---|
3231 | float *v_euler_r_f);
|
---|
3232 | /*!
|
---|
3233 | * @brief This API is used to convert the Euler p raw data
|
---|
3234 | * to degree output as float
|
---|
3235 | *
|
---|
3236 | * @param v_euler_p_f : The float value of Euler p degree
|
---|
3237 | *
|
---|
3238 | * @return results of bus communication function
|
---|
3239 | * @retval 0 -> Success
|
---|
3240 | * @retval 1 -> Error
|
---|
3241 | *
|
---|
3242 | */
|
---|
3243 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_p_deg(
|
---|
3244 | float *v_euler_p_f);
|
---|
3245 | /*!
|
---|
3246 | * @brief This API is used to convert the Euler p raw data
|
---|
3247 | * to radians output as float
|
---|
3248 | *
|
---|
3249 | * @param v_euler_p_f : The float value of Euler p radians
|
---|
3250 | *
|
---|
3251 | * @return results of bus communication function
|
---|
3252 | * @retval 0 -> Success
|
---|
3253 | * @retval 1 -> Error
|
---|
3254 | *
|
---|
3255 | *
|
---|
3256 | */
|
---|
3257 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_p_rad(
|
---|
3258 | float *v_euler_p_f);
|
---|
3259 | /*!
|
---|
3260 | * @brief This API is used to convert the Euler hrp raw data
|
---|
3261 | * to degree output as float
|
---|
3262 | *
|
---|
3263 | * @param euler_hpr : The degree data of Euler hrp
|
---|
3264 | *
|
---|
3265 | * Parameter | result
|
---|
3266 | * --------- | -----------------
|
---|
3267 | * h | degree data of Euler
|
---|
3268 | * r | degree data of Euler
|
---|
3269 | * p | degree data of Euler
|
---|
3270 | *
|
---|
3271 | *
|
---|
3272 | * @return results of bus communication function
|
---|
3273 | * @retval 0 -> Success
|
---|
3274 | * @retval 1 -> Error
|
---|
3275 | *
|
---|
3276 | */
|
---|
3277 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_hpr_deg(
|
---|
3278 | struct bno055_euler_float_t *euler_hpr);
|
---|
3279 | /*!
|
---|
3280 | * @brief This API is used to convert the Euler xyz raw data
|
---|
3281 | * to radians output as float
|
---|
3282 | *
|
---|
3283 | * @param euler_hpr : The radians data of Euler hrp
|
---|
3284 | *
|
---|
3285 | * Parameter | result
|
---|
3286 | * --------- | -----------------
|
---|
3287 | * h | radians data of Euler
|
---|
3288 | * r | radians data of Euler
|
---|
3289 | * p | radians data of Euler
|
---|
3290 | *
|
---|
3291 | *
|
---|
3292 | * @return results of bus communication function
|
---|
3293 | * @retval 0 -> Success
|
---|
3294 | * @retval 1 -> Error
|
---|
3295 | *
|
---|
3296 | */
|
---|
3297 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_hpr_rad(
|
---|
3298 | struct bno055_euler_float_t *euler_hpr);
|
---|
3299 | /***************************************************************************/
|
---|
3300 | /**\name FUNCTIONS FOR READING LINEAR ACCEL DATA OUTPUT AS FLOAT PRECISION */
|
---|
3301 | /**************************************************************************/
|
---|
3302 | /*!
|
---|
3303 | * @brief This API is used to convert the linear
|
---|
3304 | * accel x raw data to meterpersecseq output as float
|
---|
3305 | *
|
---|
3306 | * @param v_linear_accel_x_f : The float value of linear accel x meterpersecseq
|
---|
3307 | *
|
---|
3308 | * @return results of bus communication function
|
---|
3309 | * @retval 0 -> Success
|
---|
3310 | * @retval 1 -> Error
|
---|
3311 | */
|
---|
3312 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_x_msq(
|
---|
3313 | float *v_linear_accel_x_f);
|
---|
3314 | /*!
|
---|
3315 | * @brief This API is used to convert the linear
|
---|
3316 | * accel y raw data to meterpersecseq output as float
|
---|
3317 | *
|
---|
3318 | * @param v_linear_accel_y_f : The float value of linear accel y meterpersecseq
|
---|
3319 | *
|
---|
3320 | * @return results of bus communication function
|
---|
3321 | * @retval 0 -> Success
|
---|
3322 | * @retval 1 -> Error
|
---|
3323 | */
|
---|
3324 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_y_msq(
|
---|
3325 | float *v_linear_accel_y_f);
|
---|
3326 | /*!
|
---|
3327 | * @brief This API is used to convert the linear
|
---|
3328 | * accel z raw data to meterpersecseq output as float
|
---|
3329 | *
|
---|
3330 | * @param v_linear_accel_z_f : The float value of linear accel z meterpersecseq
|
---|
3331 | *
|
---|
3332 | * @return results of bus communication function
|
---|
3333 | * @retval 0 -> Success
|
---|
3334 | * @retval 1 -> Error
|
---|
3335 | *
|
---|
3336 | */
|
---|
3337 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_z_msq(
|
---|
3338 | float *v_linear_accel_z_f);
|
---|
3339 | /*!
|
---|
3340 | * @brief This API is used to convert the linear accel xyz raw data
|
---|
3341 | * to meterpersecseq output as float
|
---|
3342 | *
|
---|
3343 | * @param linear_accel_xyz : The meterpersecseq data of linear accel xyz
|
---|
3344 | *
|
---|
3345 | * Parameter | result
|
---|
3346 | * --------- | -----------------
|
---|
3347 | * x | meterpersecseq data of linear accel
|
---|
3348 | * y | meterpersecseq data of linear accel
|
---|
3349 | * z | meterpersecseq data of linear accel
|
---|
3350 | *
|
---|
3351 | *
|
---|
3352 | * @return results of bus communication function
|
---|
3353 | * @retval 0 -> Success
|
---|
3354 | * @retval 1 -> Error
|
---|
3355 | *
|
---|
3356 | *
|
---|
3357 | */
|
---|
3358 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_xyz_msq(
|
---|
3359 | struct bno055_linear_accel_float_t *linear_accel_xyz);
|
---|
3360 | /********************************************************************/
|
---|
3361 | /**\name FUNCTIONS FOR READING GRAVITY DATA OUTPUT AS FLOAT PRECISION */
|
---|
3362 | /********************************************************************/
|
---|
3363 | /*!
|
---|
3364 | * @brief This API is used to convert the gravity
|
---|
3365 | * x raw data to meterpersecseq output as float
|
---|
3366 | *
|
---|
3367 | * @param v_gravity_x_f : The float value of gravity x meterpersecseq
|
---|
3368 | *
|
---|
3369 | * @return results of bus communication function
|
---|
3370 | * @retval 0 -> Success
|
---|
3371 | * @retval 1 -> Error
|
---|
3372 | *
|
---|
3373 | *
|
---|
3374 | */
|
---|
3375 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_x_msq(
|
---|
3376 | float *v_gravity_x_f);
|
---|
3377 | /*!
|
---|
3378 | * @brief This API is used to convert the gravity
|
---|
3379 | * y raw data to meterpersecseq output as float
|
---|
3380 | *
|
---|
3381 | * @param v_gravity_y_f : The float value of gravity y meterpersecseq
|
---|
3382 | *
|
---|
3383 | * @return results of bus communication function
|
---|
3384 | * @retval 0 -> Success
|
---|
3385 | * @retval 1 -> Error
|
---|
3386 | *
|
---|
3387 | *
|
---|
3388 | */
|
---|
3389 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_y_msq(
|
---|
3390 | float *v_gravity_y_f);
|
---|
3391 | /*!
|
---|
3392 | * @brief This API is used to convert the gravity
|
---|
3393 | * z raw data to meterpersecseq output as float
|
---|
3394 | *
|
---|
3395 | * @param v_gravity_z_f : The float value of gravity z meterpersecseq
|
---|
3396 | *
|
---|
3397 | * @return results of bus communication function
|
---|
3398 | * @retval 0 -> Success
|
---|
3399 | * @retval 1 -> Error
|
---|
3400 | *
|
---|
3401 | */
|
---|
3402 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_z_msq(
|
---|
3403 | float *gravity_z);
|
---|
3404 | /*!
|
---|
3405 | * @brief This API is used to convert the gravity xyz raw data
|
---|
3406 | * to meterpersecseq output as float
|
---|
3407 | *
|
---|
3408 | * @param gravity_xyz : The meterpersecseq data of gravity xyz
|
---|
3409 | *
|
---|
3410 | * Parameter | result
|
---|
3411 | * --------- | -----------------
|
---|
3412 | * x | meterpersecseq data of gravity
|
---|
3413 | * y | meterpersecseq data of gravity
|
---|
3414 | * z | meterpersecseq data of gravity
|
---|
3415 | *
|
---|
3416 | *
|
---|
3417 | * @return results of bus communication function
|
---|
3418 | * @retval 0 -> Success
|
---|
3419 | * @retval 1 -> Error
|
---|
3420 | *
|
---|
3421 | *
|
---|
3422 | */
|
---|
3423 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gravity_xyz_msq(
|
---|
3424 | struct bno055_gravity_float_t *gravity_xyz);
|
---|
3425 | /**************************************************************************/
|
---|
3426 | /**\name FUNCTIONS FOR READING TEMPERATURE DATA OUTPUT AS FLOAT PRECISION */
|
---|
3427 | /*************************************************************************/
|
---|
3428 | /*!
|
---|
3429 | * @brief This API is used to convert the temperature
|
---|
3430 | * data to Fahrenheit output as float
|
---|
3431 | *
|
---|
3432 | * @param v_temp_f : The float value of temperature Fahrenheit
|
---|
3433 | *
|
---|
3434 | * @return results of bus communication function
|
---|
3435 | * @retval 0 -> Success
|
---|
3436 | * @retval 1 -> Error
|
---|
3437 | *
|
---|
3438 | *
|
---|
3439 | */
|
---|
3440 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_temp_fahrenheit(
|
---|
3441 | float *v_temp_f);
|
---|
3442 | /*!
|
---|
3443 | * @brief This API is used to convert the temperature
|
---|
3444 | * data to Celsius output as float
|
---|
3445 | *
|
---|
3446 | * @param v_temp_f : The float value of temperature Celsius
|
---|
3447 | *
|
---|
3448 | * @return results of bus communication function
|
---|
3449 | * @retval 0 -> Success
|
---|
3450 | * @retval 1 -> Error
|
---|
3451 | *
|
---|
3452 | *
|
---|
3453 | *
|
---|
3454 | */
|
---|
3455 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_temp_celsius(
|
---|
3456 | float *v_temp_f);
|
---|
3457 | #endif
|
---|
3458 | #ifdef BNO055_DOUBLE_ENABLE
|
---|
3459 | /**************************************************************************/
|
---|
3460 | /**\name FUNCTIONS FOR READING ACCEL DATA OUTPUT AS DOUBLE PRECISION */
|
---|
3461 | /*************************************************************************/
|
---|
3462 | /*!
|
---|
3463 | * @brief This API is used to convert the accel x raw data
|
---|
3464 | * to meterpersecseq output as double
|
---|
3465 | *
|
---|
3466 | * @param v_accel_x_d : The accel x meterpersecseq data
|
---|
3467 | *
|
---|
3468 | *
|
---|
3469 | *
|
---|
3470 | * @return results of bus communication function
|
---|
3471 | * @retval 0 -> Success
|
---|
3472 | * @retval 1 -> Error
|
---|
3473 | *
|
---|
3474 | *
|
---|
3475 | */
|
---|
3476 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_x_msq(
|
---|
3477 | double *v_accel_x_d);
|
---|
3478 | /*!
|
---|
3479 | * @brief This API is used to convert the accel y raw data
|
---|
3480 | * to meterpersecseq output as double
|
---|
3481 | *
|
---|
3482 | * @param v_accel_y_d : The accel y meterpersecseq data
|
---|
3483 | *
|
---|
3484 | *
|
---|
3485 | *
|
---|
3486 | * @return results of bus communication function
|
---|
3487 | * @retval 0 -> Success
|
---|
3488 | * @retval 1 -> Error
|
---|
3489 | *
|
---|
3490 | *
|
---|
3491 | *
|
---|
3492 | */
|
---|
3493 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_y_msq(
|
---|
3494 | double *v_accel_y_d);
|
---|
3495 | /*!
|
---|
3496 | * @brief This API is used to convert the accel z raw data
|
---|
3497 | * to meterpersecseq output as double
|
---|
3498 | *
|
---|
3499 | * @param v_accel_z_d : The accel z meterpersecseq data
|
---|
3500 | *
|
---|
3501 | *
|
---|
3502 | *
|
---|
3503 | * @return results of bus communication function
|
---|
3504 | * @retval 0 -> Success
|
---|
3505 | * @retval 1 -> Error
|
---|
3506 | */
|
---|
3507 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_z_msq(
|
---|
3508 | double *v_accel_z_d);
|
---|
3509 | /*!
|
---|
3510 | * @brief This API is used to convert the accel x raw data
|
---|
3511 | * to millig output as double
|
---|
3512 | *
|
---|
3513 | * @param v_accel_x_d : The accel x millig data
|
---|
3514 | *
|
---|
3515 | *
|
---|
3516 | *
|
---|
3517 | * @return results of bus communication function
|
---|
3518 | * @retval 0 -> Success
|
---|
3519 | * @retval 1 -> Error
|
---|
3520 | *
|
---|
3521 | *
|
---|
3522 | *
|
---|
3523 | */
|
---|
3524 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_x_mg(
|
---|
3525 | double *v_accel_x_d);
|
---|
3526 | /*!
|
---|
3527 | * @brief This API is used to convert the accel y raw data
|
---|
3528 | * to millig output as double
|
---|
3529 | *
|
---|
3530 | * @param v_accel_y_d : The accel y millig data
|
---|
3531 | *
|
---|
3532 | *
|
---|
3533 | *
|
---|
3534 | * @return results of bus communication function
|
---|
3535 | * @retval 0 -> Success
|
---|
3536 | * @retval 1 -> Error
|
---|
3537 | *
|
---|
3538 | *
|
---|
3539 | */
|
---|
3540 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_y_mg(
|
---|
3541 | double *v_accel_y_d);
|
---|
3542 | /*!
|
---|
3543 | * @brief This API is used to convert the accel z raw data
|
---|
3544 | * to millig output as double
|
---|
3545 | *
|
---|
3546 | * @param v_accel_z_d : The accel z millig data
|
---|
3547 | *
|
---|
3548 | *
|
---|
3549 | *
|
---|
3550 | * @return results of bus communication function
|
---|
3551 | * @retval 0 -> Success
|
---|
3552 | * @retval 1 -> Error
|
---|
3553 | *
|
---|
3554 | */
|
---|
3555 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_z_mg(
|
---|
3556 | double *v_accel_z_d);
|
---|
3557 | /*!
|
---|
3558 | * @brief This API is used to convert the accel xyz raw data
|
---|
3559 | * to meterpersecseq output as double
|
---|
3560 | *
|
---|
3561 | * @param accel_xyz : The meterpersecseq data of accel xyz
|
---|
3562 | *
|
---|
3563 | * Parameter | result
|
---|
3564 | * --------- | -----------------
|
---|
3565 | * x | meterpersecseq data of accel
|
---|
3566 | * y | meterpersecseq data of accel
|
---|
3567 | * z | meterpersecseq data of accel
|
---|
3568 | *
|
---|
3569 | *
|
---|
3570 | * @return results of bus communication function
|
---|
3571 | * @retval 0 -> Success
|
---|
3572 | * @retval 1 -> Error
|
---|
3573 | *
|
---|
3574 | *
|
---|
3575 | */
|
---|
3576 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_xyz_msq(
|
---|
3577 | struct bno055_accel_double_t *accel_xyz);
|
---|
3578 | /*!
|
---|
3579 | * @brief This API is used to convert the accel xyz raw data
|
---|
3580 | * to millig output as double
|
---|
3581 | *
|
---|
3582 | * @param accel_xyz : The millig data of accel xyz
|
---|
3583 | *
|
---|
3584 | * Parameter | result
|
---|
3585 | * --------- | -----------------
|
---|
3586 | * x | millig data of accel
|
---|
3587 | * y | millig data of accel
|
---|
3588 | * z | millig data of accel
|
---|
3589 | *
|
---|
3590 | *
|
---|
3591 | * @return results of bus communication function
|
---|
3592 | * @retval 0 -> Success
|
---|
3593 | * @retval 1 -> Error
|
---|
3594 | *
|
---|
3595 | */
|
---|
3596 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_xyz_mg(
|
---|
3597 | struct bno055_accel_double_t *accel_xyz);
|
---|
3598 | /**************************************************************************/
|
---|
3599 | /**\name FUNCTIONS FOR READING MAG DATA OUTPUT AS DOUBLE PRECISION */
|
---|
3600 | /*************************************************************************/
|
---|
3601 | /*!
|
---|
3602 | * @brief This API is used to convert the mag x raw data
|
---|
3603 | * to microTesla output as double
|
---|
3604 | *
|
---|
3605 | * @param v_mag_x_d : The mag x microTesla data
|
---|
3606 | *
|
---|
3607 | *
|
---|
3608 | *
|
---|
3609 | * @return results of bus communication function
|
---|
3610 | * @retval 0 -> Success
|
---|
3611 | * @retval 1 -> Error
|
---|
3612 | *
|
---|
3613 | *
|
---|
3614 | *
|
---|
3615 | */
|
---|
3616 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_x_uT(
|
---|
3617 | double *v_mag_x_d);
|
---|
3618 | /*!
|
---|
3619 | * @brief This API is used to convert the mag x raw data
|
---|
3620 | * to microTesla output as double
|
---|
3621 | *
|
---|
3622 | * @param v_mag_y_d : The mag x microTesla data
|
---|
3623 | *
|
---|
3624 | *
|
---|
3625 | *
|
---|
3626 | * @return results of bus communication function
|
---|
3627 | * @retval 0 -> Success
|
---|
3628 | * @retval 1 -> Error
|
---|
3629 | *
|
---|
3630 | *
|
---|
3631 | *
|
---|
3632 | */
|
---|
3633 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_y_uT(
|
---|
3634 | double *v_mag_y_d);
|
---|
3635 | /*!
|
---|
3636 | * @brief This API is used to convert the mag z raw data
|
---|
3637 | * to microTesla output as double
|
---|
3638 | *
|
---|
3639 | * @param v_mag_z_d : The mag z microTesla data
|
---|
3640 | *
|
---|
3641 | *
|
---|
3642 | *
|
---|
3643 | * @return results of bus communication function
|
---|
3644 | * @retval 0 -> Success
|
---|
3645 | * @retval 1 -> Error
|
---|
3646 | *
|
---|
3647 | *
|
---|
3648 | */
|
---|
3649 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_z_uT(
|
---|
3650 | double *v_mag_z_d);
|
---|
3651 | /*!
|
---|
3652 | * @brief This API is used to convert the mag yz raw data
|
---|
3653 | * to microTesla output as double
|
---|
3654 | *
|
---|
3655 | * @param mag_xyz : The microTesla data of mag xyz
|
---|
3656 | *
|
---|
3657 | * Parameter | result
|
---|
3658 | * --------- | -----------------
|
---|
3659 | * x | microTesla data of mag
|
---|
3660 | * y | microTesla data of mag
|
---|
3661 | * z | microTesla data of mag
|
---|
3662 | *
|
---|
3663 | *
|
---|
3664 | * @return results of bus communication function
|
---|
3665 | * @retval 0 -> Success
|
---|
3666 | * @retval 1 -> Error
|
---|
3667 | *
|
---|
3668 | */
|
---|
3669 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_xyz_uT(
|
---|
3670 | struct bno055_mag_double_t *mag_xyz);
|
---|
3671 | /**************************************************************************/
|
---|
3672 | /**\name FUNCTIONS FOR READING GYRO DATA OUTPUT AS DOUBLE PRECISION */
|
---|
3673 | /*************************************************************************/
|
---|
3674 | /*!
|
---|
3675 | * @brief This API is used to convert the gyro x raw data
|
---|
3676 | * to dps output as double
|
---|
3677 | *
|
---|
3678 | * @param v_gyro_x_d : The gyro x dps double data
|
---|
3679 | *
|
---|
3680 | *
|
---|
3681 | *
|
---|
3682 | * @return results of bus communication function
|
---|
3683 | * @retval 0 -> Success
|
---|
3684 | * @retval 1 -> Error
|
---|
3685 | *
|
---|
3686 | *
|
---|
3687 | */
|
---|
3688 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_x_dps(
|
---|
3689 | double *v_gyro_x_d);
|
---|
3690 | /*!
|
---|
3691 | * @brief This API is used to convert the gyro y raw data
|
---|
3692 | * to dps output as double
|
---|
3693 | *
|
---|
3694 | * @param v_gyro_y_d : The gyro y dps double data
|
---|
3695 | *
|
---|
3696 | *
|
---|
3697 | *
|
---|
3698 | * @return results of bus communication function
|
---|
3699 | * @retval 0 -> Success
|
---|
3700 | * @retval 1 -> Error
|
---|
3701 | *
|
---|
3702 | *
|
---|
3703 | */
|
---|
3704 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_y_dps(
|
---|
3705 | double *v_gyro_y_d);
|
---|
3706 | /*!
|
---|
3707 | * @brief This API is used to convert the gyro z raw data
|
---|
3708 | * to dps output as double
|
---|
3709 | *
|
---|
3710 | * @param v_gyro_z_d : The gyro z dps double data
|
---|
3711 | *
|
---|
3712 | *
|
---|
3713 | *
|
---|
3714 | * @return results of bus communication function
|
---|
3715 | * @retval 0 -> Success
|
---|
3716 | * @retval 1 -> Error
|
---|
3717 | *
|
---|
3718 | *
|
---|
3719 | */
|
---|
3720 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_z_dps(
|
---|
3721 | double *v_gyro_z_d);
|
---|
3722 | /*!
|
---|
3723 | * @brief This API is used to convert the gyro x raw data
|
---|
3724 | * to rps output as double
|
---|
3725 | *
|
---|
3726 | * @param v_gyro_x_d : The gyro x dps double data
|
---|
3727 | *
|
---|
3728 | *
|
---|
3729 | *
|
---|
3730 | * @return results of bus communication function
|
---|
3731 | * @retval 0 -> Success
|
---|
3732 | * @retval 1 -> Error
|
---|
3733 | *
|
---|
3734 | *
|
---|
3735 | */
|
---|
3736 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_x_rps(
|
---|
3737 | double *v_gyro_x_d);
|
---|
3738 | /*!
|
---|
3739 | * @brief This API is used to convert the gyro y raw data
|
---|
3740 | * to rps output as double
|
---|
3741 | *
|
---|
3742 | * @param v_gyro_y_d : The gyro y dps double data
|
---|
3743 | *
|
---|
3744 | *
|
---|
3745 | *
|
---|
3746 | * @return results of bus communication function
|
---|
3747 | * @retval 0 -> Success
|
---|
3748 | * @retval 1 -> Error
|
---|
3749 | *
|
---|
3750 | *
|
---|
3751 | */
|
---|
3752 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_y_rps(
|
---|
3753 | double *v_gyro_y_d);
|
---|
3754 | /*!
|
---|
3755 | * @brief This API is used to convert the gyro z raw data
|
---|
3756 | * to rps output as double
|
---|
3757 | *
|
---|
3758 | * @param v_gyro_z_d : The gyro z rps double data
|
---|
3759 | *
|
---|
3760 | *
|
---|
3761 | *
|
---|
3762 | * @return results of bus communication function
|
---|
3763 | * @retval 0 -> Success
|
---|
3764 | * @retval 1 -> Error
|
---|
3765 | *
|
---|
3766 | *
|
---|
3767 | */
|
---|
3768 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_z_rps(
|
---|
3769 | double *v_gyro_z_d);
|
---|
3770 | /*!
|
---|
3771 | * @brief This API is used to convert the gyro xyz raw data
|
---|
3772 | * to dps output as double
|
---|
3773 | *
|
---|
3774 | * @param gyro_xyz : The dps data of gyro xyz
|
---|
3775 | *
|
---|
3776 | * Parameter | result
|
---|
3777 | * --------- | -----------------
|
---|
3778 | * x | dps data of gyro
|
---|
3779 | * y | dps data of gyro
|
---|
3780 | * z | dps data of gyro
|
---|
3781 | *
|
---|
3782 | *
|
---|
3783 | * @return results of bus communication function
|
---|
3784 | * @retval 0 -> Success
|
---|
3785 | * @retval 1 -> Error
|
---|
3786 | *
|
---|
3787 | */
|
---|
3788 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_xyz_dps(
|
---|
3789 | struct bno055_gyro_double_t *gyro_xyz);
|
---|
3790 | /*!
|
---|
3791 | * @brief This API is used to convert the gyro xyz raw data
|
---|
3792 | * to rps output as double
|
---|
3793 | *
|
---|
3794 | * @param gyro_xyz : The rps data of gyro xyz
|
---|
3795 | *
|
---|
3796 | * Parameter | result
|
---|
3797 | * --------- | -----------------
|
---|
3798 | * x | rps data of gyro
|
---|
3799 | * y | rps data of gyro
|
---|
3800 | * z | rps data of gyro
|
---|
3801 | *
|
---|
3802 | *
|
---|
3803 | * @return results of bus communication function
|
---|
3804 | * @retval 0 -> Success
|
---|
3805 | * @retval 1 -> Error
|
---|
3806 | *
|
---|
3807 | */
|
---|
3808 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_xyz_rps(
|
---|
3809 | struct bno055_gyro_double_t *gyro_xyz);
|
---|
3810 | /**************************************************************************/
|
---|
3811 | /**\name FUNCTIONS FOR READING EULER DATA OUTPUT AS DOUBLE PRECISION */
|
---|
3812 | /*************************************************************************/
|
---|
3813 | /*!
|
---|
3814 | * @brief This API is used to convert the Euler h raw data
|
---|
3815 | * to degree output as double
|
---|
3816 | *
|
---|
3817 | * @param v_euler_h_d : The double value of Euler h degree
|
---|
3818 | *
|
---|
3819 | * @return results of bus communication function
|
---|
3820 | * @retval 0 -> Success
|
---|
3821 | * @retval 1 -> Error
|
---|
3822 | *
|
---|
3823 | *
|
---|
3824 | */
|
---|
3825 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_h_deg(
|
---|
3826 | double *v_euler_h_d);
|
---|
3827 | /*!
|
---|
3828 | * @brief This API is used to convert the Euler p raw data
|
---|
3829 | * to degree output as double
|
---|
3830 | *
|
---|
3831 | * @param v_euler_p_d : The double value of Euler p degree
|
---|
3832 | *
|
---|
3833 | * @return results of bus communication function
|
---|
3834 | * @retval 0 -> Success
|
---|
3835 | * @retval 1 -> Error
|
---|
3836 | *
|
---|
3837 | *
|
---|
3838 | */
|
---|
3839 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_p_deg(
|
---|
3840 | double *v_euler_p_d);
|
---|
3841 | /*!
|
---|
3842 | * @brief This API is used to convert the Euler r raw data
|
---|
3843 | * to degree output as double
|
---|
3844 | *
|
---|
3845 | * @param v_euler_r_d : The double value of Euler r degree
|
---|
3846 | *
|
---|
3847 | * @return results of bus communication function
|
---|
3848 | * @retval 0 -> Success
|
---|
3849 | * @retval 1 -> Error
|
---|
3850 | *
|
---|
3851 | *
|
---|
3852 | */
|
---|
3853 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_r_deg(
|
---|
3854 | double *v_euler_r_d);
|
---|
3855 | /*!
|
---|
3856 | * @brief This API is used to convert the Euler h raw data
|
---|
3857 | * to radians output as double
|
---|
3858 | *
|
---|
3859 | * @param v_euler_h_d : The double value of Euler h radians
|
---|
3860 | *
|
---|
3861 | * @return results of bus communication function
|
---|
3862 | * @retval 0 -> Success
|
---|
3863 | * @retval 1 -> Error
|
---|
3864 | *
|
---|
3865 | *
|
---|
3866 | */
|
---|
3867 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_h_rad(
|
---|
3868 | double *v_euler_h_d);
|
---|
3869 | /*!
|
---|
3870 | * @brief This API is used to convert the Euler p raw data
|
---|
3871 | * to radians output as double
|
---|
3872 | *
|
---|
3873 | * @param v_euler_p_d : The double value of Euler p radians
|
---|
3874 | *
|
---|
3875 | * @return results of bus communication function
|
---|
3876 | * @retval 0 -> Success
|
---|
3877 | * @retval 1 -> Error
|
---|
3878 | *
|
---|
3879 | *
|
---|
3880 | */
|
---|
3881 |
|
---|
3882 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_p_rad(
|
---|
3883 | double *v_euler_p_d);
|
---|
3884 | /*!
|
---|
3885 | * @brief This API is used to convert the Euler r raw data
|
---|
3886 | * to radians output as double
|
---|
3887 | *
|
---|
3888 | * @param v_euler_r_d : The double value of Euler r radians
|
---|
3889 | *
|
---|
3890 | * @return results of bus communication function
|
---|
3891 | * @retval 0 -> Success
|
---|
3892 | * @retval 1 -> Error
|
---|
3893 | *
|
---|
3894 | *
|
---|
3895 | */
|
---|
3896 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_r_rad(
|
---|
3897 | double *v_euler_r_d);
|
---|
3898 | /*!
|
---|
3899 | * @brief This API is used to convert the Euler hpr raw data
|
---|
3900 | * to degree output as double
|
---|
3901 | *
|
---|
3902 | * @param euler_hpr : The degree data of Euler hpr
|
---|
3903 | *
|
---|
3904 | * Parameter | result
|
---|
3905 | * --------- | -----------------
|
---|
3906 | * h | degree data of Euler
|
---|
3907 | * r | degree data of Euler
|
---|
3908 | * p | degree data of Euler
|
---|
3909 | *
|
---|
3910 | *
|
---|
3911 | * @return results of bus communication function
|
---|
3912 | * @retval 0 -> Success
|
---|
3913 | * @retval 1 -> Error
|
---|
3914 | *
|
---|
3915 | */
|
---|
3916 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_hpr_deg(
|
---|
3917 | struct bno055_euler_double_t *euler_hpr);
|
---|
3918 | /*!
|
---|
3919 | * @brief This API is used to convert the Euler hpr raw data
|
---|
3920 | * to radians output as double
|
---|
3921 | *
|
---|
3922 | * @param euler_hpr : The radians data of Euler hpr
|
---|
3923 | *
|
---|
3924 | * Parameter | result
|
---|
3925 | * --------- | -----------------
|
---|
3926 | * h | radians data of Euler
|
---|
3927 | * r | radians data of Euler
|
---|
3928 | * p | radians data of Euler
|
---|
3929 | *
|
---|
3930 | *
|
---|
3931 | * @return results of bus communication function
|
---|
3932 | * @retval 0 -> Success
|
---|
3933 | * @retval 1 -> Error
|
---|
3934 | *
|
---|
3935 | */
|
---|
3936 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_hpr_rad(
|
---|
3937 | struct bno055_euler_double_t *euler_hpr);
|
---|
3938 | /****************************************************************************/
|
---|
3939 | /**\name FUNCTIONS FOR READING LINEAR ACCEL DATA OUTPUT AS DOUBLE PRECISION */
|
---|
3940 | /****************************************************************************/
|
---|
3941 | /*!
|
---|
3942 | * @brief This API is used to convert the linear
|
---|
3943 | * accel x raw data to meterpersecseq output as double
|
---|
3944 | *
|
---|
3945 | * @param v_linear_accel_x_d : The double value of
|
---|
3946 | * linear accel x meterpersecseq
|
---|
3947 | *
|
---|
3948 | * @return results of bus communication function
|
---|
3949 | * @retval 0 -> Success
|
---|
3950 | * @retval 1 -> Error
|
---|
3951 | *
|
---|
3952 | *
|
---|
3953 | */
|
---|
3954 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_x_msq(
|
---|
3955 | double *v_linear_accel_x_d);
|
---|
3956 | /*!
|
---|
3957 | * @brief This API is used to convert the linear
|
---|
3958 | * accel y raw data to meterpersecseq output as double
|
---|
3959 | *
|
---|
3960 | * @param v_linear_accel_y_d : The double value of
|
---|
3961 | * linear accel y meterpersecseq
|
---|
3962 | *
|
---|
3963 | * @return results of bus communication function
|
---|
3964 | * @retval 0 -> Success
|
---|
3965 | * @retval 1 -> Error
|
---|
3966 | *
|
---|
3967 | *
|
---|
3968 | */
|
---|
3969 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_y_msq(
|
---|
3970 | double *v_linear_accel_y_d);
|
---|
3971 | /*!
|
---|
3972 | * @brief This API is used to convert the linear
|
---|
3973 | * accel z raw data to meterpersecseq output as double
|
---|
3974 | *
|
---|
3975 | * @param v_linear_accel_z_d : The double value of
|
---|
3976 | * linear accel z meterpersecseq
|
---|
3977 | *
|
---|
3978 | * @return results of bus communication function
|
---|
3979 | * @retval 0 -> Success
|
---|
3980 | * @retval 1 -> Error
|
---|
3981 | *
|
---|
3982 | *
|
---|
3983 | */
|
---|
3984 |
|
---|
3985 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_z_msq(
|
---|
3986 | double *v_linear_accel_z_d);
|
---|
3987 | /*!
|
---|
3988 | * @brief This API is used to convert the linear accel xyz raw data
|
---|
3989 | * to meterpersecseq output as double
|
---|
3990 | *
|
---|
3991 | * @param linear_accel_xyz : The meterpersecseq data of linear accel xyz
|
---|
3992 | *
|
---|
3993 | * Parameter | result
|
---|
3994 | * --------- | -----------------
|
---|
3995 | * x | meterpersecseq data of linear accel
|
---|
3996 | * y | meterpersecseq data of linear accel
|
---|
3997 | * z | meterpersecseq data of linear accel
|
---|
3998 | *
|
---|
3999 | *
|
---|
4000 | * @return results of bus communication function
|
---|
4001 | * @retval 0 -> Success
|
---|
4002 | * @retval 1 -> Error
|
---|
4003 | *
|
---|
4004 | */
|
---|
4005 |
|
---|
4006 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_xyz_msq(
|
---|
4007 | struct bno055_linear_accel_double_t *linear_accel_xyz);
|
---|
4008 | /**************************************************************************/
|
---|
4009 | /**\name FUNCTIONS FOR READING GRAVITY DATA OUTPUT AS DOUBLE PRECISION */
|
---|
4010 | /*************************************************************************/
|
---|
4011 | /*!
|
---|
4012 | * @brief This API is used to convert the gravity
|
---|
4013 | * x raw data to meterpersecseq output as double
|
---|
4014 | *
|
---|
4015 | * @param v_gravity_x_d : The double value of gravity x meterpersecseq
|
---|
4016 | *
|
---|
4017 | * @return results of bus communication function
|
---|
4018 | * @retval 0 -> Success
|
---|
4019 | * @retval 1 -> Error
|
---|
4020 | *
|
---|
4021 | *
|
---|
4022 | */
|
---|
4023 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_x_msq(
|
---|
4024 | double *v_gravity_x_d);
|
---|
4025 | /*!
|
---|
4026 | * @brief This API is used to convert the gravity
|
---|
4027 | * y raw data to meterpersecseq output as double
|
---|
4028 | *
|
---|
4029 | * @param v_gravity_y_d : The double value of gravity y meterpersecseq
|
---|
4030 | *
|
---|
4031 | * @return results of bus communication function
|
---|
4032 | * @retval 0 -> Success
|
---|
4033 | * @retval 1 -> Error
|
---|
4034 | *
|
---|
4035 | *
|
---|
4036 | */
|
---|
4037 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_y_msq(
|
---|
4038 | double *v_gravity_y_d);
|
---|
4039 | /*!
|
---|
4040 | * @brief This API is used to convert the gravity
|
---|
4041 | * z raw data to meterpersecseq output as double
|
---|
4042 | *
|
---|
4043 | * @param v_gravity_z_d : The double value of gravity z meterpersecseq
|
---|
4044 | *
|
---|
4045 | * @return results of bus communication function
|
---|
4046 | * @retval 0 -> Success
|
---|
4047 | * @retval 1 -> Error
|
---|
4048 | *
|
---|
4049 | *
|
---|
4050 | */
|
---|
4051 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_z_msq(
|
---|
4052 | double *v_gravity_z_d);
|
---|
4053 | /*!
|
---|
4054 | * @brief This API is used to convert the gravity xyz raw data
|
---|
4055 | * to meterpersecseq output as double
|
---|
4056 | *
|
---|
4057 | * @param gravity_xyz : The meterpersecseq data of gravity xyz
|
---|
4058 | *
|
---|
4059 | * Parameter | result
|
---|
4060 | * --------- | -----------------
|
---|
4061 | * x | meterpersecseq data of gravity
|
---|
4062 | * y | meterpersecseq data of gravity
|
---|
4063 | * z | meterpersecseq data of gravity
|
---|
4064 | *
|
---|
4065 | *
|
---|
4066 | * @return results of bus communication function
|
---|
4067 | * @retval 0 -> Success
|
---|
4068 | * @retval 1 -> Error
|
---|
4069 | *
|
---|
4070 | */
|
---|
4071 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gravity_xyz_msq(
|
---|
4072 | struct bno055_gravity_double_t *gravity_xyz);
|
---|
4073 | /**************************************************************************/
|
---|
4074 | /**\name FUNCTIONS FOR READING TEMPERATURE DATA OUTPUT AS DOUBLE PRECISION*/
|
---|
4075 | /*************************************************************************/
|
---|
4076 | /*!
|
---|
4077 | * @brief This API is used to convert the temperature
|
---|
4078 | * data to Fahrenheit output as double
|
---|
4079 | *
|
---|
4080 | * @param v_temp_d : The double value of temperature Fahrenheit
|
---|
4081 | *
|
---|
4082 | * @return results of bus communication function
|
---|
4083 | * @retval 0 -> Success
|
---|
4084 | * @retval 1 -> Error
|
---|
4085 | *
|
---|
4086 | *
|
---|
4087 | */
|
---|
4088 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_fahrenheit(
|
---|
4089 | double *v_temp_d);
|
---|
4090 | /*!
|
---|
4091 | * @brief This API is used to convert the temperature
|
---|
4092 | * data to Celsius output as double
|
---|
4093 | *
|
---|
4094 | * @param v_temp_d : The double value of temperature Celsius
|
---|
4095 | *
|
---|
4096 | * @return results of bus communication function
|
---|
4097 | * @retval 0 -> Success
|
---|
4098 | * @retval 1 -> Error
|
---|
4099 | *
|
---|
4100 | *
|
---|
4101 | */
|
---|
4102 | BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_celsius(
|
---|
4103 | double *v_temp_d);
|
---|
4104 | #endif
|
---|
4105 | /**************************************************************************/
|
---|
4106 | /**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM CALIBRATION STATUS*/
|
---|
4107 | /*************************************************************************/
|
---|
4108 | /*!
|
---|
4109 | * @brief This API used to read
|
---|
4110 | * mag calibration status from register from 0x35 bit 0 and 1
|
---|
4111 | *
|
---|
4112 | * @param v_mag_calib_u_8 : The value of mag calib status
|
---|
4113 | *
|
---|
4114 | *
|
---|
4115 | * @return results of bus communication function
|
---|
4116 | * @retval 0 -> Success
|
---|
4117 | * @retval 1 -> Error
|
---|
4118 | *
|
---|
4119 | */
|
---|
4120 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_calib_stat(
|
---|
4121 | u_8 *v_mag_calib_u_8);
|
---|
4122 | /*!
|
---|
4123 | * @brief This API used to read
|
---|
4124 | * accel calibration status from register from 0x35 bit 2 and 3
|
---|
4125 | *
|
---|
4126 | * @param v_accel_calib_u_8 : The value of accel calib status
|
---|
4127 | *
|
---|
4128 | *
|
---|
4129 | * @return results of bus communication function
|
---|
4130 | * @retval 0 -> Success
|
---|
4131 | * @retval 1 -> Error
|
---|
4132 | *
|
---|
4133 | */
|
---|
4134 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_calib_stat(
|
---|
4135 | u_8 *v_accel_calib_u_8);
|
---|
4136 | /*!
|
---|
4137 | * @brief This API used to read
|
---|
4138 | * gyro calibration status from register from 0x35 bit 4 and 5
|
---|
4139 | *
|
---|
4140 | * @param v_gyro_calib_u_8 : The value of gyro calib status
|
---|
4141 | *
|
---|
4142 | *
|
---|
4143 | * @return results of bus communication function
|
---|
4144 | * @retval 0 -> Success
|
---|
4145 | * @retval 1 -> Error
|
---|
4146 | *
|
---|
4147 | */
|
---|
4148 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_calib_stat(
|
---|
4149 | u_8 *v_gyro_calib_u_8);
|
---|
4150 | /*!
|
---|
4151 | * @brief This API used to read
|
---|
4152 | * system calibration status from register from 0x35 bit 6 and 7
|
---|
4153 | *
|
---|
4154 | * @param v_sys_calib_u_8 : The value of system calib status
|
---|
4155 | *
|
---|
4156 | *
|
---|
4157 | * @return results of bus communication function
|
---|
4158 | * @retval 0 -> Success
|
---|
4159 | * @retval 1 -> Error
|
---|
4160 | *
|
---|
4161 | */
|
---|
4162 | BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_calib_stat(
|
---|
4163 | u_8 *v_sys_calib_u_8);
|
---|
4164 | /******************************************************************/
|
---|
4165 | /**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYTEM SELF TEST */
|
---|
4166 | /******************************************************************/
|
---|
4167 | /*!
|
---|
4168 | * @brief This API used to read
|
---|
4169 | * self test of accel from register from 0x36 bit 0
|
---|
4170 | *
|
---|
4171 | * @param v_selftest_accel_u_8 : The value of self test of accel
|
---|
4172 | *
|
---|
4173 | * v_selftest_accel_u_8 | result
|
---|
4174 | * -------------------- | ---------------------
|
---|
4175 | * 0x00 | indicates test failed
|
---|
4176 | * 0x01 | indicated test passed
|
---|
4177 | *
|
---|
4178 | * @return results of bus communication function
|
---|
4179 | * @retval 0 -> Success
|
---|
4180 | * @retval 1 -> Error
|
---|
4181 | *
|
---|
4182 | */
|
---|
4183 | BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_accel(
|
---|
4184 | u_8 *v_selftest_accel_u_8);
|
---|
4185 | /*!
|
---|
4186 | * @brief This API used to read
|
---|
4187 | * self test of mag from register from 0x36 bit 1
|
---|
4188 | *
|
---|
4189 | * @param v_selftest_mag_u_8 : The value of self test of mag
|
---|
4190 | *
|
---|
4191 | * v_selftest_mag_u_8 | result
|
---|
4192 | * -------------------- | ---------------------
|
---|
4193 | * 0x00 | indicates test failed
|
---|
4194 | * 0x01 | indicated test passed
|
---|
4195 | *
|
---|
4196 | * @return results of bus communication function
|
---|
4197 | * @retval 0 -> Success
|
---|
4198 | * @retval 1 -> Error
|
---|
4199 | *
|
---|
4200 | */
|
---|
4201 | BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_mag(
|
---|
4202 | u_8 *v_selftest_mag_u_8);
|
---|
4203 | /*!
|
---|
4204 | * @brief This API used to read
|
---|
4205 | * self test of gyro from register from 0x36 bit 2
|
---|
4206 | *
|
---|
4207 | * @param v_selftest_gyro_u_8 : The value of self test of gyro
|
---|
4208 | *
|
---|
4209 | * v_selftest_gyro_u_8 | result
|
---|
4210 | * -------------------- | ---------------------
|
---|
4211 | * 0x00 | indicates test failed
|
---|
4212 | * 0x01 | indicated test passed
|
---|
4213 | *
|
---|
4214 | * @return results of bus communication function
|
---|
4215 | * @retval 0 -> Success
|
---|
4216 | * @retval 1 -> Error
|
---|
4217 | *
|
---|
4218 | */
|
---|
4219 | BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_gyro(
|
---|
4220 | u_8 *v_selftest_gyro_u_8);
|
---|
4221 | /*!
|
---|
4222 | * @brief This API used to read
|
---|
4223 | * self test of micro controller from register from 0x36 bit 3
|
---|
4224 | *
|
---|
4225 | * @param v_selftest_mcu_u_8 : The value of self test of micro controller
|
---|
4226 | *
|
---|
4227 | * v_selftest_mcu_u_8 | result
|
---|
4228 | * -------------------- | ---------------------
|
---|
4229 | * 0x00 | indicates test failed
|
---|
4230 | * 0x01 | indicated test passed
|
---|
4231 | *
|
---|
4232 | * @return results of bus communication function
|
---|
4233 | * @retval 0 -> Success
|
---|
4234 | * @retval 1 -> Error
|
---|
4235 | *
|
---|
4236 | */
|
---|
4237 | BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_mcu(
|
---|
4238 | u_8 *v_selftest_mcu_u_8);
|
---|
4239 | /*****************************************************/
|
---|
4240 | /**\name FUNCTIONS FOR READING GYRO INTERRUPT STATUS */
|
---|
4241 | /*****************************************************/
|
---|
4242 | /*!
|
---|
4243 | * @brief This API used to read the v_stat_s_8 of
|
---|
4244 | * gyro anymotion interrupt from register from 0x37 bit 2
|
---|
4245 | *
|
---|
4246 | * @param v_gyro_any_motion_u_8 : The value of gyro anymotion interrupt
|
---|
4247 | *
|
---|
4248 | * v_gyro_any_motion_u_8 | result
|
---|
4249 | * -------------------- | ---------------------
|
---|
4250 | * 0x00 | indicates no interrupt triggered
|
---|
4251 | * 0x01 | indicates interrupt triggered
|
---|
4252 | *
|
---|
4253 | * @return results of bus communication function
|
---|
4254 | * @retval 0 -> Success
|
---|
4255 | * @retval 1 -> Error
|
---|
4256 | *
|
---|
4257 | * @note Gyro anymotion interrupt can be enabled
|
---|
4258 | * by the following APIs
|
---|
4259 | *
|
---|
4260 | * bno055_set_intr_mask_gyro_any_motion()
|
---|
4261 | *
|
---|
4262 | * bno055_set_intr_gyro_any_motion()
|
---|
4263 | *
|
---|
4264 | */
|
---|
4265 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_gyro_any_motion(
|
---|
4266 | u_8 *v_gyro_any_motion_u_8);
|
---|
4267 | /*!
|
---|
4268 | * @brief This API used to read the v_stat_s_8 of
|
---|
4269 | * gyro highrate interrupt from register from 0x37 bit 3
|
---|
4270 | *
|
---|
4271 | * @param v_gyro_highrate_u_8 : The value of gyro highrate interrupt
|
---|
4272 | *
|
---|
4273 | * v_gyro_highrate_u_8 | result
|
---|
4274 | * ------------------- | ---------------------
|
---|
4275 | * 0x00 | indicates no interrupt triggered
|
---|
4276 | * 0x01 | indicates interrupt triggered
|
---|
4277 | *
|
---|
4278 | * @return results of bus communication function
|
---|
4279 | * @retval 0 -> Success
|
---|
4280 | * @retval 1 -> Error
|
---|
4281 | *
|
---|
4282 | * @note Gyro highrate interrupt can be configured
|
---|
4283 | * by the following APIs
|
---|
4284 | *
|
---|
4285 | * bno055_set_intr_mask_gyro_highrate()
|
---|
4286 | *
|
---|
4287 | * bno055_set_intr_gyro_highrate()
|
---|
4288 | */
|
---|
4289 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_gyro_highrate(
|
---|
4290 | u_8 *v_gyro_highrate_u_8);
|
---|
4291 | /*****************************************************/
|
---|
4292 | /**\name FUNCTIONS FOR READING ACCEL INTERRUPT STATUS */
|
---|
4293 | /*****************************************************/
|
---|
4294 | /*!
|
---|
4295 | * @brief This API used to read the status of
|
---|
4296 | * accel highg interrupt from register from 0x37 bit 5
|
---|
4297 | *
|
---|
4298 | * @param v_accel_high_g_u_8 : The value of accel highg interrupt
|
---|
4299 | *
|
---|
4300 | * v_accel_high_g_u_8 | result
|
---|
4301 | * ------------------- | ---------------------
|
---|
4302 | * 0x00 | indicates no interrupt triggered
|
---|
4303 | * 0x01 | indicates interrupt triggered
|
---|
4304 | *
|
---|
4305 | * @return results of bus communication function
|
---|
4306 | * @retval 0 -> Success
|
---|
4307 | * @retval 1 -> Error
|
---|
4308 | *
|
---|
4309 | * @note Accel highg interrupt can be configured
|
---|
4310 | * by the following APIs
|
---|
4311 | *
|
---|
4312 | * bno055_set_intr_mask_accel_high_g()
|
---|
4313 | *
|
---|
4314 | * bno055_set_intr_accel_high_g()
|
---|
4315 | *
|
---|
4316 | */
|
---|
4317 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_high_g(
|
---|
4318 | u_8 *v_accel_high_g_u_8);
|
---|
4319 | /*!
|
---|
4320 | * @brief This API used to read the v_stat_s_8 of
|
---|
4321 | * accel anymotion interrupt from register from 0x37 bit 6
|
---|
4322 | *
|
---|
4323 | * @param v_accel_any_motion_u_8 : The value of accel anymotion interrupt
|
---|
4324 | *
|
---|
4325 | * v_accel_any_motion_u_8 | result
|
---|
4326 | * ------------------- | ---------------------
|
---|
4327 | * 0x00 | indicates no interrupt triggered
|
---|
4328 | * 0x01 | indicates interrupt triggered
|
---|
4329 | *
|
---|
4330 | * @return results of bus communication function
|
---|
4331 | * @retval 0 -> Success
|
---|
4332 | * @retval 1 -> Error
|
---|
4333 | *
|
---|
4334 | * @note Accel anymotion interrupt can be configured
|
---|
4335 | * by the following APIs
|
---|
4336 | *
|
---|
4337 | * bno055_set_intr_mask_accel_any_motion()
|
---|
4338 | *
|
---|
4339 | * bno055_set_intr_accel_any_motion()
|
---|
4340 | */
|
---|
4341 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_any_motion(
|
---|
4342 | u_8 *v_accel_any_motion_u_8);
|
---|
4343 | /*!
|
---|
4344 | * @brief This API used to read the v_stat_s_8 of
|
---|
4345 | * accel nomotion/slowmotion interrupt from register from 0x37 bit 6
|
---|
4346 | *
|
---|
4347 | * @param v_accel_no_motion_u_8 :
|
---|
4348 | * The value of accel nomotion/slowmotion interrupt
|
---|
4349 | *
|
---|
4350 | * v_accel_no_motion_u_8 | result
|
---|
4351 | * ------------------- | ---------------------
|
---|
4352 | * 0x00 | indicates no interrupt triggered
|
---|
4353 | * 0x01 | indicates interrupt triggered
|
---|
4354 | *
|
---|
4355 | * @return results of bus communication function
|
---|
4356 | * @retval 0 -> Success
|
---|
4357 | * @retval 1 -> Error
|
---|
4358 | *
|
---|
4359 | * @note Accel nomotion/slowmotion interrupt can be configured
|
---|
4360 | * by the following APIs
|
---|
4361 | *
|
---|
4362 | * bno055_set_intr_mask_accel_nomotion()
|
---|
4363 | *
|
---|
4364 | * bno055_set_intr_accel_nomotion()
|
---|
4365 | */
|
---|
4366 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_no_motion(
|
---|
4367 | u_8 *v_accel_no_motion_u_8);
|
---|
4368 | /**************************************************************************/
|
---|
4369 | /**\name FUNCTIONS FOR READING SYSTEM CLOCK, STATUS AND ERROR CODE */
|
---|
4370 | /*************************************************************************/
|
---|
4371 | /*!
|
---|
4372 | * @brief This API is used to read status of main clock
|
---|
4373 | * from the register 0x38 bit 0
|
---|
4374 | *
|
---|
4375 | * @param v_stat_main_clk_u_8 : the status of main clock
|
---|
4376 | *
|
---|
4377 | *
|
---|
4378 | * @return results of bus communication function
|
---|
4379 | * @retval 0 -> Success
|
---|
4380 | * @retval 1 -> Error
|
---|
4381 | *
|
---|
4382 | */
|
---|
4383 | BNO055_RETURN_FUNCTION_TYPE bno055_get_stat_main_clk(
|
---|
4384 | u_8 *v_stat_main_clk_u_8);
|
---|
4385 | /*!
|
---|
4386 | * @brief This API is used to read system status
|
---|
4387 | * code from the register 0x39 it is a byte of data
|
---|
4388 | *
|
---|
4389 | * @param v_sys_stat_u_8 : the status of system
|
---|
4390 | *
|
---|
4391 | *
|
---|
4392 | * @return results of bus communication function
|
---|
4393 | * @retval 0 -> Success
|
---|
4394 | * @retval 1 -> Error
|
---|
4395 | *
|
---|
4396 | */
|
---|
4397 | BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_stat_code(
|
---|
4398 | u_8 *v_sys_stat_u_8);
|
---|
4399 | /*!
|
---|
4400 | * @brief This API is used to read system error
|
---|
4401 | * code from the register 0x3A it is a byte of data
|
---|
4402 | *
|
---|
4403 | * @param v_sys_error_u_8 : The value of system error code
|
---|
4404 | *
|
---|
4405 | *
|
---|
4406 | * @return results of bus communication function
|
---|
4407 | * @retval 0 -> Success
|
---|
4408 | * @retval 1 -> Error
|
---|
4409 | *
|
---|
4410 | *
|
---|
4411 | */
|
---|
4412 | BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_error_code(
|
---|
4413 | u_8 *v_sys_error_u_8);
|
---|
4414 | /********************************************/
|
---|
4415 | /**\name FUNCTIONS FOR ACCEL UNIT SELECTION */
|
---|
4416 | /********************************************/
|
---|
4417 | /*!
|
---|
4418 | * @brief This API used to read the accel unit
|
---|
4419 | * from register from 0x3B bit 0
|
---|
4420 | *
|
---|
4421 | * @param v_accel_unit_u_8 : The value of accel unit
|
---|
4422 | *
|
---|
4423 | * v_accel_unit_u_8 | result
|
---|
4424 | * ------------- | ---------------
|
---|
4425 | * 0x00 | ACCEL_UNIT_MSQ
|
---|
4426 | * 0x01 | ACCEL_UNIT_MG
|
---|
4427 | *
|
---|
4428 | * @return results of bus communication function
|
---|
4429 | * @retval 0 -> Success
|
---|
4430 | * @retval 1 -> Error
|
---|
4431 | *
|
---|
4432 | */
|
---|
4433 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_unit(
|
---|
4434 | u_8 *v_accel_unit_u_8);
|
---|
4435 | /*!
|
---|
4436 | * @brief This API used to write the accel unit
|
---|
4437 | * from register from 0x3B bit 0
|
---|
4438 | *
|
---|
4439 | * @param v_accel_unit_u_8 : The value of accel unit
|
---|
4440 | *
|
---|
4441 | * v_accel_unit_u_8 | result
|
---|
4442 | * ------------- | ---------------
|
---|
4443 | * 0x00 | ACCEL_UNIT_MSQ
|
---|
4444 | * 0x01 | ACCEL_UNIT_MG
|
---|
4445 | *
|
---|
4446 | * @return results of bus communication function
|
---|
4447 | * @retval 0 -> Success
|
---|
4448 | * @retval 1 -> Error
|
---|
4449 | *
|
---|
4450 | *
|
---|
4451 | */
|
---|
4452 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_unit(
|
---|
4453 | u_8 v_accel_unit_u_8);
|
---|
4454 | /********************************************/
|
---|
4455 | /**\name FUNCTIONS FOR GYRO UNIT SELECTION */
|
---|
4456 | /********************************************/
|
---|
4457 | /*!
|
---|
4458 | * @brief This API used to read the gyro unit
|
---|
4459 | * from register from 0x3B bit 1
|
---|
4460 | *
|
---|
4461 | * @param v_gyro_unit_u_8 : The value of accel unit
|
---|
4462 | *
|
---|
4463 | * v_gyro_unit_u_8 | result
|
---|
4464 | * ------------- | -----------
|
---|
4465 | * 0x00 | GYRO_UNIT_DPS
|
---|
4466 | * 0x01 | GYRO_UNIT_RPS
|
---|
4467 | *
|
---|
4468 | * @return results of bus communication function
|
---|
4469 | * @retval 0 -> Success
|
---|
4470 | * @retval 1 -> Error
|
---|
4471 | *
|
---|
4472 | *
|
---|
4473 | */
|
---|
4474 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_unit(
|
---|
4475 | u_8 *v_gyro_unit_u_8);
|
---|
4476 | /*!
|
---|
4477 | * @brief This API used to write the gyro unit
|
---|
4478 | * from register from 0x3B bit 1
|
---|
4479 | *
|
---|
4480 | * @param v_gyro_unit_u_8 : The value of accel unit
|
---|
4481 | *
|
---|
4482 | * v_gyro_unit_u_8 | result
|
---|
4483 | * ------------- | -----------
|
---|
4484 | * 0x00 | GYRO_UNIT_DPS
|
---|
4485 | * 0x01 | GYRO_UNIT_RPS
|
---|
4486 | *
|
---|
4487 | * @return results of bus communication function
|
---|
4488 | * @retval 0 -> Success
|
---|
4489 | * @retval 1 -> Error
|
---|
4490 | *
|
---|
4491 | *
|
---|
4492 | */
|
---|
4493 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_unit(u_8 v_gyro_unit_u_8);
|
---|
4494 | /********************************************/
|
---|
4495 | /**\name FUNCTIONS FOR EULER UNIT SELECTION */
|
---|
4496 | /********************************************/
|
---|
4497 | /*!
|
---|
4498 | * @brief This API used to read the Euler unit
|
---|
4499 | * from register from 0x3B bit 2
|
---|
4500 | *
|
---|
4501 | * @param v_euler_unit_u_8 : The value of accel unit
|
---|
4502 | *
|
---|
4503 | * v_euler_unit_u_8 | result
|
---|
4504 | * -------------- | -----------
|
---|
4505 | * 0x00 | EULER_UNIT_DEG
|
---|
4506 | * 0x01 | EULER_UNIT_RAD
|
---|
4507 | *
|
---|
4508 | * @return results of bus communication function
|
---|
4509 | * @retval 0 -> Success
|
---|
4510 | * @retval 1 -> Error
|
---|
4511 | *
|
---|
4512 | *
|
---|
4513 | */
|
---|
4514 | BNO055_RETURN_FUNCTION_TYPE bno055_get_euler_unit(
|
---|
4515 | u_8 *v_euler_unit_u_8);
|
---|
4516 | /*!
|
---|
4517 | * @brief This API used to write the Euler unit
|
---|
4518 | * from register from 0x3B bit 2
|
---|
4519 | *
|
---|
4520 | * @param v_euler_unit_u_8 : The value of Euler unit
|
---|
4521 | *
|
---|
4522 | * v_euler_unit_u_8 | result
|
---|
4523 | * -------------- | -----------
|
---|
4524 | * 0x00 | EULER_UNIT_DEG
|
---|
4525 | * 0x01 | EULER_UNIT_RAD
|
---|
4526 | *
|
---|
4527 | * @return results of bus communication function
|
---|
4528 | * @retval 0 -> Success
|
---|
4529 | * @retval 1 -> Error
|
---|
4530 | *
|
---|
4531 | *
|
---|
4532 | */
|
---|
4533 | BNO055_RETURN_FUNCTION_TYPE bno055_set_euler_unit(u_8 v_euler_unit_u_8);
|
---|
4534 | /********************************************/
|
---|
4535 | /**\name FUNCTIONS FOR TILT UNIT SELECTION */
|
---|
4536 | /********************************************/
|
---|
4537 | /*!
|
---|
4538 | * @brief This API used to write the tilt unit
|
---|
4539 | * from register from 0x3B bit 3
|
---|
4540 | *
|
---|
4541 | * @param v_tilt_unit_u_8 : The value of tilt unit
|
---|
4542 | *
|
---|
4543 | * v_tilt_unit_u_8 | result
|
---|
4544 | * --------------- | ---------
|
---|
4545 | * 0x00 | degrees
|
---|
4546 | * 0x01 | radians
|
---|
4547 | *
|
---|
4548 | * @return results of bus communication function
|
---|
4549 | * @retval 0 -> Success
|
---|
4550 | * @retval 1 -> Error
|
---|
4551 | *
|
---|
4552 | *
|
---|
4553 | */
|
---|
4554 | BNO055_RETURN_FUNCTION_TYPE bno055_get_tilt_unit(
|
---|
4555 | u_8 *v_tilt_unit_u_8);
|
---|
4556 | /*!
|
---|
4557 | * @brief This API used to write the tilt unit
|
---|
4558 | * from register from 0x3B bit 3
|
---|
4559 | *
|
---|
4560 | * @param v_tilt_unit_u_8 : The value of tilt unit
|
---|
4561 | *
|
---|
4562 | * v_tilt_unit_u_8 | result
|
---|
4563 | * --------------- | ---------
|
---|
4564 | * 0x00 | degrees
|
---|
4565 | * 0x01 | radians
|
---|
4566 | *
|
---|
4567 | * @return results of bus communication function
|
---|
4568 | * @retval 0 -> Success
|
---|
4569 | * @retval 1 -> Error
|
---|
4570 | *
|
---|
4571 | *
|
---|
4572 | *
|
---|
4573 | * \return Communication results
|
---|
4574 | *
|
---|
4575 | *
|
---|
4576 | */
|
---|
4577 | BNO055_RETURN_FUNCTION_TYPE bno055_set_tilt_unit(
|
---|
4578 | u_8 v_tilt_unit_u_8);
|
---|
4579 | /**************************************************/
|
---|
4580 | /**\name FUNCTIONS FOR TEMPERATURE UNIT SELECTION */
|
---|
4581 | /**************************************************/
|
---|
4582 | /*!
|
---|
4583 | * @brief This API used to read the temperature unit
|
---|
4584 | * from register from 0x3B bit 4
|
---|
4585 | *
|
---|
4586 | * @param v_temp_unit_u_8 : The value of temperature unit
|
---|
4587 | *
|
---|
4588 | * v_temp_unit_u_8 | result
|
---|
4589 | * ----------- | --------------
|
---|
4590 | * 0x00 | TEMP_UNIT_CELCIUS
|
---|
4591 | * 0x01 | TEMP_UNIT_FAHRENHEIT
|
---|
4592 | *
|
---|
4593 | * @return results of bus communication function
|
---|
4594 | * @retval 0 -> Success
|
---|
4595 | * @retval 1 -> Error
|
---|
4596 | *
|
---|
4597 | */
|
---|
4598 | BNO055_RETURN_FUNCTION_TYPE bno055_get_temp_unit(
|
---|
4599 | u_8 *v_temp_unit_u_8);
|
---|
4600 | /*!
|
---|
4601 | * @brief This API used to write the temperature unit
|
---|
4602 | * from register from 0x3B bit 4
|
---|
4603 | *
|
---|
4604 | * @param v_temp_unit_u_8 : The value of temperature unit
|
---|
4605 | *
|
---|
4606 | * v_temp_unit_u_8 | result
|
---|
4607 | * ----------- | --------------
|
---|
4608 | * 0x00 | TEMP_UNIT_CELCIUS
|
---|
4609 | * 0x01 | TEMP_UNIT_FAHRENHEIT
|
---|
4610 | *
|
---|
4611 | * @return results of bus communication function
|
---|
4612 | * @retval 0 -> Success
|
---|
4613 | * @retval 1 -> Error
|
---|
4614 | *
|
---|
4615 | *
|
---|
4616 | */
|
---|
4617 | BNO055_RETURN_FUNCTION_TYPE bno055_set_temp_unit(
|
---|
4618 | u_8 v_temp_unit_u_8);
|
---|
4619 | /**************************************************/
|
---|
4620 | /**\name FUNCTIONS FOR DATA OUTPUT FORMAT SELECT */
|
---|
4621 | /**************************************************/
|
---|
4622 | /*!
|
---|
4623 | * @brief This API used to read the current selected orientation mode
|
---|
4624 | * from register from 0x3B bit 7
|
---|
4625 | *
|
---|
4626 | * @param v_data_output_format_u_8 : The value of data output format
|
---|
4627 | *
|
---|
4628 | * v_data_output_format_u_8 | result
|
---|
4629 | * -------------------- | --------
|
---|
4630 | * 0x00 | Windows
|
---|
4631 | * 0x01 | Android
|
---|
4632 | *
|
---|
4633 | * @return results of bus communication function
|
---|
4634 | * @retval 0 -> Success
|
---|
4635 | * @retval 1 -> Error
|
---|
4636 | *
|
---|
4637 | */
|
---|
4638 | BNO055_RETURN_FUNCTION_TYPE bno055_get_data_output_format(
|
---|
4639 | u_8 *v_data_output_format_u_8);
|
---|
4640 | /*!
|
---|
4641 | * @brief This API used to read the current selected orientation mode
|
---|
4642 | * from register from 0x3B bit 7
|
---|
4643 | *
|
---|
4644 | * @param v_data_output_format_u_8 : The value of data output format
|
---|
4645 | *
|
---|
4646 | * v_data_output_format_u_8 | result
|
---|
4647 | * -------------------- | --------
|
---|
4648 | * 0x00 | Windows
|
---|
4649 | * 0x01 | Android
|
---|
4650 | *
|
---|
4651 | * @return results of bus communication function
|
---|
4652 | * @retval 0 -> Success
|
---|
4653 | * @retval 1 -> Error
|
---|
4654 | *
|
---|
4655 | */
|
---|
4656 | BNO055_RETURN_FUNCTION_TYPE bno055_set_data_output_format(
|
---|
4657 | u_8 v_data_output_format_u_8);
|
---|
4658 | /**************************************************/
|
---|
4659 | /**\name FUNCTIONS FOR DATA OPERATION MODE */
|
---|
4660 | /**************************************************/
|
---|
4661 | /*! @brief This API used to read the operation mode
|
---|
4662 | * from register from 0x3D bit 0 to 3
|
---|
4663 | *
|
---|
4664 | * @param v_operation_mode_u_8 : The value of operation mode
|
---|
4665 | *
|
---|
4666 | * v_operation_mode_u_8 | result | comments
|
---|
4667 | * ----------|----------------------------|----------------------------
|
---|
4668 | * 0x00 | OPERATION_MODE_CONFIG | Configuration mode
|
---|
4669 | * 0x01 | OPERATION_MODE_ACCONLY | Reads accel data alone
|
---|
4670 | * 0x02 | OPERATION_MODE_MAGONLY | Reads mag data alone
|
---|
4671 | * 0x03 | OPERATION_MODE_GYRONLY | Reads gyro data alone
|
---|
4672 | * 0x04 | OPERATION_MODE_ACCMAG | Reads accel and mag data
|
---|
4673 | * 0x05 | OPERATION_MODE_ACCGYRO | Reads accel and gyro data
|
---|
4674 | * 0x06 | OPERATION_MODE_MAGGYRO | Reads accel and mag data
|
---|
4675 | * 0x07 | OPERATION_MODE_ANY_MOTION | Reads accel mag and gyro data
|
---|
4676 | * 0x08 | OPERATION_MODE_IMUPLUS | Inertial measurement unit
|
---|
4677 | * - | - | Reads accel,gyro and fusion data
|
---|
4678 | * 0x09 | OPERATION_MODE_COMPASS | Reads accel, mag data
|
---|
4679 | * - | - | and fusion data
|
---|
4680 | * 0x0A | OPERATION_MODE_M4G | Reads accel, mag data
|
---|
4681 | * - | - | and fusion data
|
---|
4682 | * 0x0B | OPERATION_MODE_NDOF_FMC_OFF| Nine degrees of freedom with
|
---|
4683 | * - | - | fast magnetic calibration
|
---|
4684 | * - | - | Reads accel,mag, gyro
|
---|
4685 | * - | - | and fusion data
|
---|
4686 | * 0x0C | OPERATION_MODE_NDOF | Nine degrees of freedom
|
---|
4687 | * - | - | Reads accel,mag, gyro
|
---|
4688 | * - | - | and fusion data
|
---|
4689 | *
|
---|
4690 | * @return results of bus communication function
|
---|
4691 | * @retval 0 -> Success
|
---|
4692 | * @retval 1 -> Error
|
---|
4693 | *
|
---|
4694 | * @note In the config mode, all sensor and fusion data
|
---|
4695 | * becomes zero and it is mainly derived
|
---|
4696 | * to configure the various settings of the BNO
|
---|
4697 | *
|
---|
4698 | */
|
---|
4699 | BNO055_RETURN_FUNCTION_TYPE bno055_get_operation_mode(
|
---|
4700 | u_8 *v_operation_mode_u_8);
|
---|
4701 | /*! @brief This API used to write the operation mode
|
---|
4702 | * from register from 0x3D bit 0 to 3
|
---|
4703 | *
|
---|
4704 | * @param v_operation_mode_u_8 : The value of operation mode
|
---|
4705 | *
|
---|
4706 | * v_operation_mode_u_8 | result | comments
|
---|
4707 | * ----------|----------------------------|----------------------------
|
---|
4708 | * 0x00 | OPERATION_MODE_CONFIG | Configuration mode
|
---|
4709 | * 0x01 | OPERATION_MODE_ACCONLY | Reads accel data alone
|
---|
4710 | * 0x02 | OPERATION_MODE_MAGONLY | Reads mag data alone
|
---|
4711 | * 0x03 | OPERATION_MODE_GYRONLY | Reads gyro data alone
|
---|
4712 | * 0x04 | OPERATION_MODE_ACCMAG | Reads accel and mag data
|
---|
4713 | * 0x05 | OPERATION_MODE_ACCGYRO | Reads accel and gyro data
|
---|
4714 | * 0x06 | OPERATION_MODE_MAGGYRO | Reads accel and mag data
|
---|
4715 | * 0x07 | OPERATION_MODE_ANY_MOTION | Reads accel mag and gyro data
|
---|
4716 | * 0x08 | OPERATION_MODE_IMUPLUS | Inertial measurement unit
|
---|
4717 | * - | - | Reads accel,gyro and fusion data
|
---|
4718 | * 0x09 | OPERATION_MODE_COMPASS | Reads accel, mag data
|
---|
4719 | * - | - | and fusion data
|
---|
4720 | * 0x0A | OPERATION_MODE_M4G | Reads accel, mag data
|
---|
4721 | * - | - | and fusion data
|
---|
4722 | * 0x0B | OPERATION_MODE_NDOF_FMC_OFF| Nine degrees of freedom with
|
---|
4723 | * - | - | fast magnetic calibration
|
---|
4724 | * - | - | Reads accel,mag, gyro
|
---|
4725 | * - | - | and fusion data
|
---|
4726 | * 0x0C | OPERATION_MODE_NDOF | Nine degrees of freedom
|
---|
4727 | * - | - | Reads accel,mag, gyro
|
---|
4728 | * - | - | and fusion data
|
---|
4729 | *
|
---|
4730 | * @return results of bus communication function
|
---|
4731 | * @retval 0 -> Success
|
---|
4732 | * @retval 1 -> Error
|
---|
4733 | *
|
---|
4734 | * @note In the config mode, all sensor and fusion data
|
---|
4735 | * becomes zero and it is mainly derived
|
---|
4736 | * to configure the various settings of the BNO
|
---|
4737 | *
|
---|
4738 | */
|
---|
4739 | BNO055_RETURN_FUNCTION_TYPE bno055_set_operation_mode(u_8 v_operation_mode_u_8);
|
---|
4740 | /**************************************************/
|
---|
4741 | /**\name FUNCTIONS FOR POWER MODE */
|
---|
4742 | /**************************************************/
|
---|
4743 | /*! @brief This API used to read the power mode
|
---|
4744 | * from register from 0x3E bit 0 to 1
|
---|
4745 | *
|
---|
4746 | * @param v_power_mode_u_8 : The value of power mode
|
---|
4747 | *
|
---|
4748 | * v_power_mode_u_8| result | comments
|
---|
4749 | * ----------|---------------------|-------------------------------------
|
---|
4750 | * 0x00 | POWER_MODE_NORMAL | In the NORMAL mode the register
|
---|
4751 | * - | - | map and the internal peripherals
|
---|
4752 | * - | - | of the MCU are always
|
---|
4753 | * - | - | operative in this mode
|
---|
4754 | * 0x01 | POWER_MODE_LOWPOWER | This is first level of power saving mode
|
---|
4755 | * 0x02 | POWER_MODE_SUSPEND | In suspend mode the system is
|
---|
4756 | * - | - | paused and all the sensors and
|
---|
4757 | * - | - | the micro controller are
|
---|
4758 | * - | - | put into sleep mode.
|
---|
4759 | *
|
---|
4760 | * @return results of bus communication function
|
---|
4761 | * @retval 0 -> Success
|
---|
4762 | * @retval 1 -> Error
|
---|
4763 | *
|
---|
4764 | * @note For detailed about LOWPOWER mode
|
---|
4765 | * refer data sheet 3.4.2
|
---|
4766 | *
|
---|
4767 | */
|
---|
4768 | BNO055_RETURN_FUNCTION_TYPE bno055_get_power_mode(
|
---|
4769 | u_8 *v_power_mode_u_8);
|
---|
4770 | /*! @brief This API used to write the power mode
|
---|
4771 | * from register from 0x3E bit 0 to 1
|
---|
4772 | *
|
---|
4773 | * @param v_power_mode_u_8 : The value of power mode
|
---|
4774 | *
|
---|
4775 | * v_power_mode_u_8 | result | comments
|
---|
4776 | * ----------|---------------------|-------------------------------------
|
---|
4777 | * 0x00 | POWER_MODE_NORMAL | In the NORMAL mode the register
|
---|
4778 | * - | - | map and the internal peripherals
|
---|
4779 | * - | - | of the MCU are always
|
---|
4780 | * - | - | operative in this mode
|
---|
4781 | * 0x01 | POWER_MODE_LOWPOWER | This is first level of power saving mode
|
---|
4782 | * 0x02 | POWER_MODE_SUSPEND | In suspend mode the system is
|
---|
4783 | * - | - | paused and all the sensors and
|
---|
4784 | * - | - | the micro controller are
|
---|
4785 | * - | - | put into sleep mode.
|
---|
4786 | *
|
---|
4787 | * @return results of bus communication function
|
---|
4788 | * @retval 0 -> Success
|
---|
4789 | * @retval 1 -> Error
|
---|
4790 | *
|
---|
4791 | * @note For detailed about LOWPOWER mode
|
---|
4792 | * refer data sheet 3.4.2
|
---|
4793 | *
|
---|
4794 | */
|
---|
4795 | BNO055_RETURN_FUNCTION_TYPE bno055_set_power_mode(u_8 v_power_mode_u_8);
|
---|
4796 | /**************************************************/
|
---|
4797 | /**\name FUNCTIONS FOR RESET INTERRUPT */
|
---|
4798 | /**************************************************/
|
---|
4799 | /*!
|
---|
4800 | * @brief This API used to read the reset interrupt
|
---|
4801 | * from register from 0x3F bit 6
|
---|
4802 | * It resets all the interrupt bit and interrupt output
|
---|
4803 | *
|
---|
4804 | * @param v_intr_rst_u_8 : The value of reset interrupt
|
---|
4805 | *
|
---|
4806 | * v_intr_rst_u_8 | result
|
---|
4807 | * -------------- |----------
|
---|
4808 | * 0x01 | ENABLED
|
---|
4809 | * 0x00 | DISABLED
|
---|
4810 | *
|
---|
4811 | * @return results of bus communication function
|
---|
4812 | * @retval 0 -> Success
|
---|
4813 | * @retval 1 -> Error
|
---|
4814 | *
|
---|
4815 | */
|
---|
4816 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_rst(
|
---|
4817 | u_8 *v_intr_rst_u_8);
|
---|
4818 | /*!
|
---|
4819 | * @brief This API used to write the reset interrupt
|
---|
4820 | * from register from 0x3F bit 6
|
---|
4821 | * It resets all the interrupt bit and interrupt output
|
---|
4822 | *
|
---|
4823 | * @param v_intr_rst_u_8 : The value of reset interrupt
|
---|
4824 | *
|
---|
4825 | * v_intr_rst_u_8 | result
|
---|
4826 | * -------------- |----------
|
---|
4827 | * 0x01 | ENABLED
|
---|
4828 | * 0x00 | DISABLED
|
---|
4829 | *
|
---|
4830 | * @return results of bus communication function
|
---|
4831 | * @retval 0 -> Success
|
---|
4832 | * @retval 1 -> Error
|
---|
4833 | *
|
---|
4834 | */
|
---|
4835 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_rst(u_8 v_intr_rst_u_8);
|
---|
4836 | /**************************************************/
|
---|
4837 | /**\name FUNCTIONS FOR CLOCK SOURCE */
|
---|
4838 | /**************************************************/
|
---|
4839 | /*!
|
---|
4840 | * @brief This API used to read the clk source
|
---|
4841 | * from register from 0x3F bit 7
|
---|
4842 | *
|
---|
4843 | * @param v_clk_src_u_8 : The value of clk source
|
---|
4844 | *
|
---|
4845 | * v_clk_src_u_8 | result
|
---|
4846 | * -------------- |----------
|
---|
4847 | * 0x01 | ENABLED
|
---|
4848 | * 0x00 | DISABLED
|
---|
4849 | *
|
---|
4850 | * @return results of bus communication function
|
---|
4851 | * @retval 0 -> Success
|
---|
4852 | * @retval 1 -> Error
|
---|
4853 | *
|
---|
4854 | */
|
---|
4855 | BNO055_RETURN_FUNCTION_TYPE bno055_get_clk_src(
|
---|
4856 | u_8 *v_clk_src_u_8);
|
---|
4857 | /*!
|
---|
4858 | * @brief This API used to write the clk source
|
---|
4859 | * from register from 0x3F bit 7
|
---|
4860 | *
|
---|
4861 | * @param v_clk_src_u_8 : The value of clk source
|
---|
4862 | *
|
---|
4863 | * v_clk_src_u_8 | result
|
---|
4864 | * -------------- |----------
|
---|
4865 | * 0x01 | ENABLED
|
---|
4866 | * 0x00 | DISABLED
|
---|
4867 | *
|
---|
4868 | * @return results of bus communication function
|
---|
4869 | * @retval 0 -> Success
|
---|
4870 | * @retval 1 -> Error
|
---|
4871 | *
|
---|
4872 | */
|
---|
4873 | BNO055_RETURN_FUNCTION_TYPE bno055_set_clk_src(u_8 v_clk_src_u_8);
|
---|
4874 | /**************************************************/
|
---|
4875 | /**\name FUNCTIONS FOR RESET SYSTEM */
|
---|
4876 | /**************************************************/
|
---|
4877 | /*!
|
---|
4878 | * @brief This API used to read the reset system
|
---|
4879 | * from register from 0x3F bit 5
|
---|
4880 | *
|
---|
4881 | * @param v_sys_rst_u_8 : The value of reset system
|
---|
4882 | *
|
---|
4883 | * v_sys_rst_u_8 | result
|
---|
4884 | * -------------- |----------
|
---|
4885 | * 0x01 | ENABLED
|
---|
4886 | * 0x00 | DISABLED
|
---|
4887 | *
|
---|
4888 | * @return results of bus communication function
|
---|
4889 | * @retval 0 -> Success
|
---|
4890 | * @retval 1 -> Error
|
---|
4891 | *
|
---|
4892 | * @note It resets the whole system
|
---|
4893 | */
|
---|
4894 | BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_rst(
|
---|
4895 | u_8 *v_sys_rst_u_8);
|
---|
4896 | /*!
|
---|
4897 | * @brief This API used to write the reset system
|
---|
4898 | * from register from 0x3F bit 5
|
---|
4899 | *
|
---|
4900 | * @param v_sys_rst_u_8 : The value of reset system
|
---|
4901 | *
|
---|
4902 | * v_sys_rst_u_8 | result
|
---|
4903 | * -------------- |----------
|
---|
4904 | * 0x01 | ENABLED
|
---|
4905 | * 0x00 | DISABLED
|
---|
4906 | *
|
---|
4907 | * @return results of bus communication function
|
---|
4908 | * @retval 0 -> Success
|
---|
4909 | * @retval 1 -> Error
|
---|
4910 | *
|
---|
4911 | * @note It resets the whole system
|
---|
4912 | */
|
---|
4913 | BNO055_RETURN_FUNCTION_TYPE bno055_set_sys_rst(u_8 v_sys_rst_u_8);
|
---|
4914 | /**************************************************/
|
---|
4915 | /**\name FUNCTIONS FOR SELF TEST */
|
---|
4916 | /**************************************************/
|
---|
4917 | /*!
|
---|
4918 | * @brief This API used to read the self test
|
---|
4919 | * from register from 0x3F bit 0
|
---|
4920 | *
|
---|
4921 | * @param v_selftest_u_8 : The value of self test
|
---|
4922 | *
|
---|
4923 | * v_selftest_u_8 | result
|
---|
4924 | * -------------- |----------
|
---|
4925 | * 0x01 | ENABLED
|
---|
4926 | * 0x00 | DISABLED
|
---|
4927 | *
|
---|
4928 | * @return results of bus communication function
|
---|
4929 | * @retval 0 -> Success
|
---|
4930 | * @retval 1 -> Error
|
---|
4931 | *
|
---|
4932 | * @note It triggers the self test
|
---|
4933 | */
|
---|
4934 | BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest(
|
---|
4935 | u_8 *v_selftest_u_8);
|
---|
4936 | /*!
|
---|
4937 | * @brief This API used to write the self test
|
---|
4938 | * from register from 0x3F bit 0
|
---|
4939 | *
|
---|
4940 | * @param v_selftest_u_8 : The value of self test
|
---|
4941 | *
|
---|
4942 | * v_selftest_u_8 | result
|
---|
4943 | * -------------- |----------
|
---|
4944 | * 0x01 | ENABLED
|
---|
4945 | * 0x00 | DISABLED
|
---|
4946 | *
|
---|
4947 | * @return results of bus communication function
|
---|
4948 | * @retval 0 -> Success
|
---|
4949 | * @retval 1 -> Error
|
---|
4950 | *
|
---|
4951 | * @note It triggers the self test
|
---|
4952 | *
|
---|
4953 | *
|
---|
4954 | */
|
---|
4955 | BNO055_RETURN_FUNCTION_TYPE bno055_set_selftest(u_8 v_selftest_u_8);
|
---|
4956 | /**************************************************/
|
---|
4957 | /**\name FUNCTIONS FOR TEMPERATURE SOURCE */
|
---|
4958 | /**************************************************/
|
---|
4959 | /*!
|
---|
4960 | * @brief This API used to read the temperature source
|
---|
4961 | * from register from 0x40 bit 0 and 1
|
---|
4962 | *
|
---|
4963 | * @param v_temp_source_u_8 : The value of selected temperature source
|
---|
4964 | *
|
---|
4965 | * v_temp_source_u_8 | result
|
---|
4966 | * ---------------- |---------------
|
---|
4967 | * 0x00 | ACCEL_TEMP_EN
|
---|
4968 | * 0X01 | GYRO_TEMP_EN
|
---|
4969 | * 0X03 | MCU_TEMP_EN
|
---|
4970 | *
|
---|
4971 | * @return results of bus communication function
|
---|
4972 | * @retval 0 -> Success
|
---|
4973 | * @retval 1 -> Error
|
---|
4974 | *
|
---|
4975 | */
|
---|
4976 | BNO055_RETURN_FUNCTION_TYPE bno055_get_temp_source(
|
---|
4977 | u_8 *v_temp_source_u_8);
|
---|
4978 | /*!
|
---|
4979 | * @brief This API used to write the temperature source
|
---|
4980 | * from register from 0x40 bit 0 and 1
|
---|
4981 | *
|
---|
4982 | * @param v_temp_source_u_8 : The value of selected temperature source
|
---|
4983 | *
|
---|
4984 | * v_temp_source_u_8 | result
|
---|
4985 | * ---------------- |---------------
|
---|
4986 | * 0x00 | ACCEL_TEMP_EN
|
---|
4987 | * 0X01 | GYRO_TEMP_EN
|
---|
4988 | * 0X03 | MCU_TEMP_EN
|
---|
4989 | *
|
---|
4990 | * @return results of bus communication function
|
---|
4991 | * @retval 0 -> Success
|
---|
4992 | * @retval 1 -> Error
|
---|
4993 | *
|
---|
4994 | */
|
---|
4995 | BNO055_RETURN_FUNCTION_TYPE bno055_set_temp_source(u_8 v_temp_source_u_8);
|
---|
4996 | /**************************************************/
|
---|
4997 | /**\name FUNCTIONS FOR AXIS REMAP */
|
---|
4998 | /**************************************************/
|
---|
4999 | /*!
|
---|
5000 | * @brief This API used to read the axis remap value
|
---|
5001 | * from register from 0x41 bit 0 and 5
|
---|
5002 | *
|
---|
5003 | * @param v_remap_axis_u_8 : The value of axis remapping
|
---|
5004 | *
|
---|
5005 | * v_remap_axis_u_8 | result | comments
|
---|
5006 | * ------------|-------------------|------------
|
---|
5007 | * 0X21 | REMAP_X_Y | Z=Z;X=Y;Y=X
|
---|
5008 | * 0X18 | REMAP_Y_Z | X=X;Y=Z;Z=Y
|
---|
5009 | * 0X06 | REMAP_Z_X | Y=Y;X=Z;Z=X
|
---|
5010 | * 0X12 | REMAP_X_Y_Z_TYPE0 | X=Z;Y=X;Z=Y
|
---|
5011 | * 0X09 | REMAP_X_Y_Z_TYPE1 | X=Y;Y=Z;Z=X
|
---|
5012 | * 0X24 | DEFAULT_AXIS | X=X;Y=Y;Z=Z
|
---|
5013 | *
|
---|
5014 | * @return results of bus communication function
|
---|
5015 | * @retval 0 -> Success
|
---|
5016 | * @retval 1 -> Error
|
---|
5017 | *
|
---|
5018 | * @note : For axis sign remap refer the following functions
|
---|
5019 | * x-axis :
|
---|
5020 | *
|
---|
5021 | * bno055_set_x_remap_sign()
|
---|
5022 | *
|
---|
5023 | * y-axis :
|
---|
5024 | *
|
---|
5025 | * bno055_set_y_remap_sign()
|
---|
5026 | *
|
---|
5027 | * z-axis :
|
---|
5028 | *
|
---|
5029 | * bno055_set_z_remap_sign()
|
---|
5030 | *
|
---|
5031 | */
|
---|
5032 | BNO055_RETURN_FUNCTION_TYPE bno055_get_axis_remap_value(
|
---|
5033 | u_8 *v_remap_axis_u_8);
|
---|
5034 | /*!
|
---|
5035 | * @brief This API used to write the axis remap value
|
---|
5036 | * from register from 0x41 bit 0 and 5
|
---|
5037 | *
|
---|
5038 | * @param v_remap_axis_u_8 : The value of axis remapping
|
---|
5039 | *
|
---|
5040 | * v_remap_axis_u_8 | result | comments
|
---|
5041 | * ------------|-------------------|------------
|
---|
5042 | * 0X21 | REMAP_X_Y | Z=Z;X=Y;Y=X
|
---|
5043 | * 0X18 | REMAP_Y_Z | X=X;Y=Z;Z=Y
|
---|
5044 | * 0X06 | REMAP_Z_X | Y=Y;X=Z;Z=X
|
---|
5045 | * 0X12 | REMAP_X_Y_Z_TYPE0 | X=Z;Y=X;Z=Y
|
---|
5046 | * 0X09 | REMAP_X_Y_Z_TYPE1 | X=Y;Y=Z;Z=X
|
---|
5047 | * 0X24 | DEFAULT_AXIS | X=X;Y=Y;Z=Z
|
---|
5048 | *
|
---|
5049 | * @return results of bus communication function
|
---|
5050 | * @retval 0 -> Success
|
---|
5051 | * @retval 1 -> Error
|
---|
5052 | *
|
---|
5053 | * @note : For axis sign remap refer the following functions
|
---|
5054 | * x-axis :
|
---|
5055 | *
|
---|
5056 | * bno055_set_x_remap_sign()
|
---|
5057 | *
|
---|
5058 | * y-axis :
|
---|
5059 | *
|
---|
5060 | * bno055_set_y_remap_sign()
|
---|
5061 | *
|
---|
5062 | * z-axis :
|
---|
5063 | *
|
---|
5064 | * bno055_set_z_remap_sign()
|
---|
5065 | *
|
---|
5066 | */
|
---|
5067 | BNO055_RETURN_FUNCTION_TYPE bno055_set_axis_remap_value(
|
---|
5068 | u_8 v_remap_axis_u_8);
|
---|
5069 | /**************************************************/
|
---|
5070 | /**\name FUNCTIONS FOR AXIS REMAP SIGN */
|
---|
5071 | /**************************************************/
|
---|
5072 | /*!
|
---|
5073 | * @brief This API used to read the x-axis remap
|
---|
5074 | * sign from register from 0x42 bit 2
|
---|
5075 | *
|
---|
5076 | * @param v_remap_x_sign_u_8 : The value of x-axis remap sign
|
---|
5077 | *
|
---|
5078 | * v_remap_x_sign_u_8 | result
|
---|
5079 | * ------------------- |--------------------
|
---|
5080 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5081 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5082 | *
|
---|
5083 | * @return results of bus communication function
|
---|
5084 | * @retval 0 -> Success
|
---|
5085 | * @retval 1 -> Error
|
---|
5086 | *
|
---|
5087 | */
|
---|
5088 | BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_x_sign(
|
---|
5089 | u_8 *v_remap_x_sign_u_8);
|
---|
5090 | /*!
|
---|
5091 | * @brief This API used to write the x-axis remap
|
---|
5092 | * sign from register from 0x42 bit 2
|
---|
5093 | *
|
---|
5094 | * @param v_remap_x_sign_u_8 : The value of x-axis remap sign
|
---|
5095 | *
|
---|
5096 | * v_remap_x_sign_u_8 | result
|
---|
5097 | * ------------------- |--------------------
|
---|
5098 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5099 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5100 | *
|
---|
5101 | * @return results of bus communication function
|
---|
5102 | * @retval 0 -> Success
|
---|
5103 | * @retval 1 -> Error
|
---|
5104 | *
|
---|
5105 | */
|
---|
5106 | BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_x_sign(
|
---|
5107 | u_8 v_remap_x_sign_u_8);
|
---|
5108 | /*!
|
---|
5109 | * @brief This API used to read the y-axis remap
|
---|
5110 | * sign from register from 0x42 bit 1
|
---|
5111 | *
|
---|
5112 | * @param v_remap_y_sign_u_8 : The value of y-axis remap sign
|
---|
5113 | *
|
---|
5114 | * v_remap_y_sign_u_8 | result
|
---|
5115 | * ------------------- |--------------------
|
---|
5116 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5117 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5118 | *
|
---|
5119 | * @return results of bus communication function
|
---|
5120 | * @retval 0 -> Success
|
---|
5121 | * @retval 1 -> Error
|
---|
5122 | *
|
---|
5123 | */
|
---|
5124 | BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_y_sign(
|
---|
5125 | u_8 *v_remap_y_sign_u_8);
|
---|
5126 | /*!
|
---|
5127 | * @brief This API used to write the y-axis remap
|
---|
5128 | * sign from register from 0x42 bit 1
|
---|
5129 | *
|
---|
5130 | * @param v_remap_y_sign_u_8 : The value of y-axis remap sign
|
---|
5131 | *
|
---|
5132 | * v_remap_y_sign_u_8 | result
|
---|
5133 | * ------------------- |--------------------
|
---|
5134 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5135 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5136 | *
|
---|
5137 | * @return results of bus communication function
|
---|
5138 | * @retval 0 -> Success
|
---|
5139 | * @retval 1 -> Error
|
---|
5140 | *
|
---|
5141 | */
|
---|
5142 | BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_y_sign(
|
---|
5143 | u_8 v_remap_y_sign_u_8);
|
---|
5144 | /*!
|
---|
5145 | * @brief This API used to read the z-axis remap
|
---|
5146 | * sign from register from 0x42 bit 0
|
---|
5147 | *
|
---|
5148 | * @param v_remap_z_sign_u_8 : The value of z-axis remap sign
|
---|
5149 | *
|
---|
5150 | * v_remap_z_sign_u_8 | result
|
---|
5151 | * ------------------- |--------------------
|
---|
5152 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5153 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5154 | *
|
---|
5155 | * @return results of bus communication function
|
---|
5156 | * @retval 0 -> Success
|
---|
5157 | * @retval 1 -> Error
|
---|
5158 | *
|
---|
5159 | */
|
---|
5160 | BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_z_sign(
|
---|
5161 | u_8 *v_remap_z_sign_u_8);
|
---|
5162 | /*!
|
---|
5163 | * @brief This API used to write the z-axis remap
|
---|
5164 | * sign from register from 0x42 bit 0
|
---|
5165 | *
|
---|
5166 | * @param v_remap_z_sign_u_8 : The value of z-axis remap sign
|
---|
5167 | *
|
---|
5168 | * v_remap_z_sign_u_8 | result
|
---|
5169 | * ------------------- |--------------------
|
---|
5170 | * 0X00 | REMAP_AXIS_POSITIVE
|
---|
5171 | * 0X01 | REMAP_AXIS_NEGATIVE
|
---|
5172 | *
|
---|
5173 | * @return results of bus communication function
|
---|
5174 | * @retval 0 -> Success
|
---|
5175 | * @retval 1 -> Error
|
---|
5176 | *
|
---|
5177 | */
|
---|
5178 | BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_z_sign(
|
---|
5179 | u_8 v_remap_z_sign_u_8);
|
---|
5180 | /*****************************************************/
|
---|
5181 | /**\name FUNCTIONS FOR SOFT IRON CALIBRATION MATRIX */
|
---|
5182 | /*****************************************************/
|
---|
5183 | /*!
|
---|
5184 | * @brief This API is used to read soft iron calibration matrix
|
---|
5185 | * from the register 0x43 to 0x53 it is a 18 bytes of data
|
---|
5186 | *
|
---|
5187 | * @param sic_matrix : The value of soft iron calibration matrix
|
---|
5188 | *
|
---|
5189 | * sic_matrix | result
|
---|
5190 | * --------------------|----------------------------------
|
---|
5191 | * sic_0 | soft iron calibration matrix zero
|
---|
5192 | * sic_1 | soft iron calibration matrix one
|
---|
5193 | * sic_2 | soft iron calibration matrix two
|
---|
5194 | * sic_3 | soft iron calibration matrix three
|
---|
5195 | * sic_4 | soft iron calibration matrix four
|
---|
5196 | * sic_5 | soft iron calibration matrix five
|
---|
5197 | * sic_6 | soft iron calibration matrix six
|
---|
5198 | * sic_7 | soft iron calibration matrix seven
|
---|
5199 | * sic_8 | soft iron calibration matrix eight
|
---|
5200 | *
|
---|
5201 | *
|
---|
5202 | * @return results of bus communication function
|
---|
5203 | * @retval 0 -> Success
|
---|
5204 | * @retval 1 -> Error
|
---|
5205 | *
|
---|
5206 | * @note : Each soft iron calibration matrix range from -32768 to +32767
|
---|
5207 | */
|
---|
5208 | BNO055_RETURN_FUNCTION_TYPE bno055_read_sic_matrix(
|
---|
5209 | struct bno055_sic_matrix_t *sic_matrix);
|
---|
5210 | /*!
|
---|
5211 | * @brief This API is used to write soft iron calibration matrix
|
---|
5212 | * from the register 0x43 to 0x53 it is a 18 bytes of data
|
---|
5213 | *
|
---|
5214 | * @param sic_matrix : The value of soft iron calibration matrix
|
---|
5215 | *
|
---|
5216 | * sic_matrix | result
|
---|
5217 | * --------------------|----------------------------------
|
---|
5218 | * sic_0 | soft iron calibration matrix zero
|
---|
5219 | * sic_1 | soft iron calibration matrix one
|
---|
5220 | * sic_2 | soft iron calibration matrix two
|
---|
5221 | * sic_3 | soft iron calibration matrix three
|
---|
5222 | * sic_4 | soft iron calibration matrix four
|
---|
5223 | * sic_5 | soft iron calibration matrix five
|
---|
5224 | * sic_6 | soft iron calibration matrix six
|
---|
5225 | * sic_7 | soft iron calibration matrix seven
|
---|
5226 | * sic_8 | soft iron calibration matrix eight
|
---|
5227 | *
|
---|
5228 | *
|
---|
5229 | * @return results of bus communication function
|
---|
5230 | * @retval 0 -> Success
|
---|
5231 | * @retval 1 -> Error
|
---|
5232 | *
|
---|
5233 | * @note : Each soft iron calibration matrix range from -32768 to +32767
|
---|
5234 | */
|
---|
5235 | BNO055_RETURN_FUNCTION_TYPE bno055_write_sic_matrix(
|
---|
5236 | struct bno055_sic_matrix_t *sic_matrix);
|
---|
5237 | /*****************************************************/
|
---|
5238 | /**\name FUNCTIONS FOR ACCEL OFFSET AND RADIUS */
|
---|
5239 | /*****************************************************/
|
---|
5240 | /*!
|
---|
5241 | * @brief This API is used to read accel offset and accel radius
|
---|
5242 | * offset form register 0x55 to 0x5A and radius form 0x67 and 0x68
|
---|
5243 | *
|
---|
5244 | * @param accel_offset : The value of accel offset and radius
|
---|
5245 | *
|
---|
5246 | * bno055_accel_offset_t | result
|
---|
5247 | * ------------------- | ----------------
|
---|
5248 | * x | accel offset x
|
---|
5249 | * y | accel offset y
|
---|
5250 | * z | accel offset z
|
---|
5251 | * r | accel offset r
|
---|
5252 | *
|
---|
5253 | *
|
---|
5254 | * @return results of bus communication function
|
---|
5255 | * @retval 0 -> Success
|
---|
5256 | * @retval 1 -> Error
|
---|
5257 | *
|
---|
5258 | * @note The range of the accel offset varies based on
|
---|
5259 | * the G-range of accel sensor.
|
---|
5260 | *
|
---|
5261 | * accel G range | offset range
|
---|
5262 | * --------------- | --------------
|
---|
5263 | * ACCEL_RANGE_2G | +/-2000
|
---|
5264 | * ACCEL_RANGE_4G | +/-4000
|
---|
5265 | * ACCEL_RANGE_8G | +/-8000
|
---|
5266 | * ACCEL_RANGE_16G | +/-16000
|
---|
5267 | *
|
---|
5268 | * accel G range can be configured by using the
|
---|
5269 | * bno055_set_accel_range() function
|
---|
5270 | */
|
---|
5271 | BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_offset(
|
---|
5272 | struct bno055_accel_offset_t *accel_offset);
|
---|
5273 | /*!
|
---|
5274 | * @brief This API is used to write accel offset and accel radius
|
---|
5275 | * offset form register 0x55 to 0x5A and radius form 0x67 and 0x68
|
---|
5276 | *
|
---|
5277 | * @param accel_offset : The value of accel offset and radius
|
---|
5278 | *
|
---|
5279 | * bno055_accel_offset_t | result
|
---|
5280 | * ------------------- | ----------------
|
---|
5281 | * x | accel offset x
|
---|
5282 | * y | accel offset y
|
---|
5283 | * z | accel offset z
|
---|
5284 | * r | accel offset r
|
---|
5285 | *
|
---|
5286 | *
|
---|
5287 | * @return results of bus communication function
|
---|
5288 | * @retval 0 -> Success
|
---|
5289 | * @retval 1 -> Error
|
---|
5290 | *
|
---|
5291 | * @note The range of the accel offset varies based on
|
---|
5292 | * the G-range of accel sensor.
|
---|
5293 | *
|
---|
5294 | * accel G range | offset range
|
---|
5295 | * --------------- | --------------
|
---|
5296 | * ACCEL_RANGE_2G | +/-2000
|
---|
5297 | * ACCEL_RANGE_4G | +/-4000
|
---|
5298 | * ACCEL_RANGE_8G | +/-8000
|
---|
5299 | * ACCEL_RANGE_16G | +/-16000
|
---|
5300 | *
|
---|
5301 | * accel G range can be configured by using the
|
---|
5302 | * bno055_set_accel_range() function
|
---|
5303 | */
|
---|
5304 | BNO055_RETURN_FUNCTION_TYPE bno055_write_accel_offset(
|
---|
5305 | struct bno055_accel_offset_t *accel_offset);
|
---|
5306 | /*****************************************************/
|
---|
5307 | /**\name FUNCTIONS FOR MAG OFFSET AND RADIUS*/
|
---|
5308 | /*****************************************************/
|
---|
5309 | /*!
|
---|
5310 | * @brief This API is used to read mag offset
|
---|
5311 | * offset form register 0x69 to 0x6A
|
---|
5312 | *
|
---|
5313 | * @param mag_offset : The value of mag offset and radius
|
---|
5314 | *
|
---|
5315 | * bno055_mag_offset_t | result
|
---|
5316 | * ------------------- | ----------------
|
---|
5317 | * x | mag offset x
|
---|
5318 | * y | mag offset y
|
---|
5319 | * z | mag offset z
|
---|
5320 | * r | mag radius r
|
---|
5321 | *
|
---|
5322 | *
|
---|
5323 | * @return results of bus communication function
|
---|
5324 | * @retval 0 -> Success
|
---|
5325 | * @retval 1 -> Error
|
---|
5326 | *
|
---|
5327 | * @note The range of the magnetometer offset is +/-6400 in LSB
|
---|
5328 | */
|
---|
5329 |
|
---|
5330 | BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_offset(
|
---|
5331 | struct bno055_mag_offset_t *mag_offset);
|
---|
5332 | /*!
|
---|
5333 | * @brief This API is used to read mag offset
|
---|
5334 | * offset form register 0x69 to 0x6A
|
---|
5335 | *
|
---|
5336 | * @param mag_offset : The value of mag offset and radius
|
---|
5337 | *
|
---|
5338 | * bno055_mag_offset_t | result
|
---|
5339 | * ------------------- | ----------------
|
---|
5340 | * x | mag offset x
|
---|
5341 | * y | mag offset y
|
---|
5342 | * z | mag offset z
|
---|
5343 | * r | mag radius r
|
---|
5344 | *
|
---|
5345 | *
|
---|
5346 | * @return results of bus communication function
|
---|
5347 | * @retval 0 -> Success
|
---|
5348 | * @retval 1 -> Error
|
---|
5349 | *
|
---|
5350 | * @note The range of the magnetometer offset is +/-6400 in LSB
|
---|
5351 | */
|
---|
5352 | BNO055_RETURN_FUNCTION_TYPE bno055_write_mag_offset(
|
---|
5353 | struct bno055_mag_offset_t *mag_offset);
|
---|
5354 | /*****************************************************/
|
---|
5355 | /**\name FUNCTIONS FOR GYRO OFFSET */
|
---|
5356 | /*****************************************************/
|
---|
5357 | /*!
|
---|
5358 | * @brief This API is used to read gyro offset
|
---|
5359 | * offset form register 0x61 to 0x66
|
---|
5360 | *
|
---|
5361 | * @param gyro_offset : The value of gyro offset
|
---|
5362 | *
|
---|
5363 | * bno055_gyro_offset_t | result
|
---|
5364 | * ------------------- | ----------------
|
---|
5365 | * x | gyro offset x
|
---|
5366 | * y | gyro offset y
|
---|
5367 | * z | gyro offset z
|
---|
5368 | *
|
---|
5369 | *
|
---|
5370 | * @return results of bus communication function
|
---|
5371 | * @retval 0 -> Success
|
---|
5372 | * @retval 1 -> Error
|
---|
5373 | *
|
---|
5374 | * @note The range of the gyro offset varies based on
|
---|
5375 | * the range of gyro sensor
|
---|
5376 | *
|
---|
5377 | * gyro G range | offset range
|
---|
5378 | * -------------------- | ------------
|
---|
5379 | * GYRO_RANGE_2000DPS | +/-32000
|
---|
5380 | * GYRO_RANGE_1000DPS | +/-16000
|
---|
5381 | * GYRO_RANGE_500DPS | +/-8000
|
---|
5382 | * GYRO_RANGE_250DPS | +/-4000
|
---|
5383 | * GYRO_RANGE_125DPS | +/-2000
|
---|
5384 | *
|
---|
5385 | * Gyro range can be configured by using the
|
---|
5386 | * bno055_set_gyro_range() function
|
---|
5387 | */
|
---|
5388 | BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_offset(
|
---|
5389 | struct bno055_gyro_offset_t *gyro_offset);
|
---|
5390 | /*!
|
---|
5391 | * @brief This API is used to read gyro offset
|
---|
5392 | * offset form register 0x61 to 0x66
|
---|
5393 | *
|
---|
5394 | * @param gyro_offset : The value of gyro offset
|
---|
5395 | *
|
---|
5396 | * bno055_gyro_offset_t | result
|
---|
5397 | * ------------------- | ----------------
|
---|
5398 | * x | gyro offset x
|
---|
5399 | * y | gyro offset y
|
---|
5400 | * z | gyro offset z
|
---|
5401 | *
|
---|
5402 | *
|
---|
5403 | * @return results of bus communication function
|
---|
5404 | * @retval 0 -> Success
|
---|
5405 | * @retval 1 -> Error
|
---|
5406 | *
|
---|
5407 | * @note The range of the gyro offset varies based on
|
---|
5408 | * the range of gyro sensor
|
---|
5409 | *
|
---|
5410 | * gyro G range | offset range
|
---|
5411 | * -------------------- | ------------
|
---|
5412 | * GYRO_RANGE_2000DPS | +/-32000
|
---|
5413 | * GYRO_RANGE_1000DPS | +/-16000
|
---|
5414 | * GYRO_RANGE_500DPS | +/-8000
|
---|
5415 | * GYRO_RANGE_250DPS | +/-4000
|
---|
5416 | * GYRO_RANGE_125DPS | +/-2000
|
---|
5417 | *
|
---|
5418 | * Gyro range can be configured by using the
|
---|
5419 | * bno055_set_gyro_range() function
|
---|
5420 | */
|
---|
5421 | BNO055_RETURN_FUNCTION_TYPE bno055_write_gyro_offset(
|
---|
5422 | struct bno055_gyro_offset_t *gyro_offset);
|
---|
5423 | /********************************************************/
|
---|
5424 | /************** PAGE1 Functions *********************/
|
---|
5425 | /********************************************************/
|
---|
5426 | /*****************************************************/
|
---|
5427 | /**\name FUNCTIONS FOR ACCEL CONFIGURATION */
|
---|
5428 | /*****************************************************/
|
---|
5429 | /*!
|
---|
5430 | * @brief This API used to read the accel range
|
---|
5431 | * from page one register from 0x08 bit 0 and 1
|
---|
5432 | *
|
---|
5433 | * @param v_accel_range_u_8 : The value of accel range
|
---|
5434 | * v_accel_range_u_8 | result
|
---|
5435 | * ----------------- | --------------
|
---|
5436 | * 0x00 | ACCEL_RANGE_2G
|
---|
5437 | * 0x01 | ACCEL_RANGE_4G
|
---|
5438 | * 0x02 | ACCEL_RANGE_8G
|
---|
5439 | * 0x03 | ACCEL_RANGE_16G
|
---|
5440 | *
|
---|
5441 | * @return results of bus communication function
|
---|
5442 | * @retval 0 -> Success
|
---|
5443 | * @retval 1 -> Error
|
---|
5444 | *
|
---|
5445 | *
|
---|
5446 | */
|
---|
5447 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_range(
|
---|
5448 | u_8 *v_accel_range_u_8);
|
---|
5449 | /*!
|
---|
5450 | * @brief This API used to write the accel range
|
---|
5451 | * from page one register from 0x08 bit 0 and 1
|
---|
5452 | *
|
---|
5453 | * @param v_accel_range_u_8 : The value of accel range
|
---|
5454 | *
|
---|
5455 | * v_accel_range_u_8 | result
|
---|
5456 | * ----------------- | --------------
|
---|
5457 | * 0x00 | ACCEL_RANGE_2G
|
---|
5458 | * 0x01 | ACCEL_RANGE_4G
|
---|
5459 | * 0x02 | ACCEL_RANGE_8G
|
---|
5460 | * 0x03 | ACCEL_RANGE_16G
|
---|
5461 | *
|
---|
5462 | * @return results of bus communication function
|
---|
5463 | * @retval 0 -> Success
|
---|
5464 | * @retval 1 -> Error
|
---|
5465 | *
|
---|
5466 | *
|
---|
5467 | */
|
---|
5468 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_range(
|
---|
5469 | u_8 v_accel_range_u_8);
|
---|
5470 | /*!
|
---|
5471 | * @brief This API used to read the accel bandwidth
|
---|
5472 | * from page one register from 0x08 bit 2 to 4
|
---|
5473 | *
|
---|
5474 | * @param v_accel_bw_u_8 : The value of accel bandwidth
|
---|
5475 | *
|
---|
5476 | * v_accel_bw_u_8 | result
|
---|
5477 | * ----------------- | ---------------
|
---|
5478 | * 0x00 | ACCEL_BW_7_81HZ
|
---|
5479 | * 0x01 | ACCEL_BW_15_63HZ
|
---|
5480 | * 0x02 | ACCEL_BW_31_25HZ
|
---|
5481 | * 0x03 | ACCEL_BW_62_5HZ
|
---|
5482 | * 0x04 | ACCEL_BW_125HZ
|
---|
5483 | * 0x05 | ACCEL_BW_250HZ
|
---|
5484 | * 0x06 | ACCEL_BW_500HZ
|
---|
5485 | * 0x07 | ACCEL_BW_1000HZ
|
---|
5486 | *
|
---|
5487 | * @return results of bus communication function
|
---|
5488 | * @retval 0 -> Success
|
---|
5489 | * @retval 1 -> Error
|
---|
5490 | *
|
---|
5491 | *
|
---|
5492 | */
|
---|
5493 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_bw(
|
---|
5494 | u_8 *v_accel_bw_u_8);
|
---|
5495 | /*!
|
---|
5496 | * @brief This API used to write the accel bandwidth
|
---|
5497 | * from page one register from 0x08 bit 2 to 4
|
---|
5498 | *
|
---|
5499 | * @param v_accel_bw_u_8 : The value of accel bandwidth
|
---|
5500 | *
|
---|
5501 | * v_accel_bw_u_8 | result
|
---|
5502 | * ----------------- | ---------------
|
---|
5503 | * 0x00 | ACCEL_BW_7_81HZ
|
---|
5504 | * 0x01 | ACCEL_BW_15_63HZ
|
---|
5505 | * 0x02 | ACCEL_BW_31_25HZ
|
---|
5506 | * 0x03 | ACCEL_BW_62_5HZ
|
---|
5507 | * 0x04 | ACCEL_BW_125HZ
|
---|
5508 | * 0x05 | ACCEL_BW_250HZ
|
---|
5509 | * 0x06 | ACCEL_BW_500HZ
|
---|
5510 | * 0x07 | ACCEL_BW_1000HZ
|
---|
5511 | *
|
---|
5512 | * @return results of bus communication function
|
---|
5513 | * @retval 0 -> Success
|
---|
5514 | * @retval 1 -> Error
|
---|
5515 | *
|
---|
5516 | *
|
---|
5517 | */
|
---|
5518 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_bw(
|
---|
5519 | u_8 v_accel_bw_u_8);
|
---|
5520 | /*!
|
---|
5521 | * @brief This API used to read the accel power mode
|
---|
5522 | * from page one register from 0x08 bit 5 to 7
|
---|
5523 | *
|
---|
5524 | * @param v_accel_power_mode_u_8 : The value of accel power mode
|
---|
5525 | * v_accel_power_mode_u_8 | result
|
---|
5526 | * ----------------- | -------------
|
---|
5527 | * 0x00 | ACCEL_NORMAL
|
---|
5528 | * 0x01 | ACCEL_SUSPEND
|
---|
5529 | * 0x02 | ACCEL_LOWPOWER_1
|
---|
5530 | * 0x03 | ACCEL_STANDBY
|
---|
5531 | * 0x04 | ACCEL_LOWPOWER_2
|
---|
5532 | * 0x05 | ACCEL_DEEPSUSPEND
|
---|
5533 | *
|
---|
5534 | * @return results of bus communication function
|
---|
5535 | * @retval 0 -> Success
|
---|
5536 | * @retval 1 -> Error
|
---|
5537 | *
|
---|
5538 | *
|
---|
5539 | */
|
---|
5540 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_power_mode(
|
---|
5541 | u_8 *v_accel_power_mode_u_8);
|
---|
5542 | /*!
|
---|
5543 | * @brief This API used to write the accel power mode
|
---|
5544 | * from page one register from 0x08 bit 5 to 7
|
---|
5545 | *
|
---|
5546 | * @param v_accel_power_mode_u_8 : The value of accel power mode
|
---|
5547 | * v_accel_power_mode_u_8 | result
|
---|
5548 | * ----------------- | -------------
|
---|
5549 | * 0x00 | ACCEL_NORMAL
|
---|
5550 | * 0x01 | ACCEL_SUSPEND
|
---|
5551 | * 0x02 | ACCEL_LOWPOWER_1
|
---|
5552 | * 0x03 | ACCEL_STANDBY
|
---|
5553 | * 0x04 | ACCEL_LOWPOWER_2
|
---|
5554 | * 0x05 | ACCEL_DEEPSUSPEND
|
---|
5555 | *
|
---|
5556 | * @return results of bus communication function
|
---|
5557 | * @retval 0 -> Success
|
---|
5558 | * @retval 1 -> Error
|
---|
5559 | *
|
---|
5560 | *
|
---|
5561 | */
|
---|
5562 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_power_mode(
|
---|
5563 | u_8 v_accel_power_mode_u_8);
|
---|
5564 | /*****************************************************/
|
---|
5565 | /**\name FUNCTIONS FOR MAG CONFIGURATION */
|
---|
5566 | /*****************************************************/
|
---|
5567 | /*!
|
---|
5568 | * @brief This API used to read the mag output data rate
|
---|
5569 | * from page one register from 0x09 bit 0 to 2
|
---|
5570 | *
|
---|
5571 | * @param v_mag_data_output_rate_u_8 : The value of mag output data rate
|
---|
5572 | *
|
---|
5573 | * v_mag_data_output_rate_u_8 | result
|
---|
5574 | * ---------------------- |----------------------
|
---|
5575 | * 0x00 | MAG_DATA_OUTPUT_RATE_2HZ
|
---|
5576 | * 0x01 | MAG_DATA_OUTPUT_RATE_6HZ
|
---|
5577 | * 0x02 | MAG_DATA_OUTPUT_RATE_8HZ
|
---|
5578 | * 0x03 | MAG_DATA_OUTPUT_RATE_10HZ
|
---|
5579 | * 0x04 | MAG_DATA_OUTPUT_RATE_15HZ
|
---|
5580 | * 0x05 | MAG_DATA_OUTPUT_RATE_20HZ
|
---|
5581 | * 0x06 | MAG_DATA_OUTPUT_RATE_25HZ
|
---|
5582 | * 0x07 | MAG_DATA_OUTPUT_RATE_30HZ
|
---|
5583 | *
|
---|
5584 | * @return results of bus communication function
|
---|
5585 | * @retval 0 -> Success
|
---|
5586 | * @retval 1 -> Error
|
---|
5587 | *
|
---|
5588 | *
|
---|
5589 | */
|
---|
5590 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_data_output_rate(
|
---|
5591 | u_8 *v_mag_data_output_rate_u_8);
|
---|
5592 | /*!
|
---|
5593 | * @brief This API used to write the mag output data rate
|
---|
5594 | * from page one register from 0x09 bit 0 to 2
|
---|
5595 | *
|
---|
5596 | * @param v_mag_data_output_rate_u_8 : The value of mag output data rate
|
---|
5597 | *
|
---|
5598 | * v_mag_data_output_rate_u_8 | result
|
---|
5599 | * ---------------------- |----------------------
|
---|
5600 | * 0x00 | MAG_DATA_OUTPUT_RATE_2HZ
|
---|
5601 | * 0x01 | MAG_DATA_OUTPUT_RATE_6HZ
|
---|
5602 | * 0x02 | MAG_DATA_OUTPUT_RATE_8HZ
|
---|
5603 | * 0x03 | MAG_DATA_OUTPUT_RATE_10HZ
|
---|
5604 | * 0x04 | MAG_DATA_OUTPUT_RATE_15HZ
|
---|
5605 | * 0x05 | MAG_DATA_OUTPUT_RATE_20HZ
|
---|
5606 | * 0x06 | MAG_DATA_OUTPUT_RATE_25HZ
|
---|
5607 | * 0x07 | MAG_DATA_OUTPUT_RATE_30HZ
|
---|
5608 | *
|
---|
5609 | * @return results of bus communication function
|
---|
5610 | * @retval 0 -> Success
|
---|
5611 | * @retval 1 -> Error
|
---|
5612 | *
|
---|
5613 | *
|
---|
5614 | */
|
---|
5615 | BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_data_output_rate(
|
---|
5616 | u_8 v_mag_data_output_rate_u_8);
|
---|
5617 | /*!
|
---|
5618 | * @brief This API used to read the mag operation mode
|
---|
5619 | * from page one register from 0x09 bit 3 to 4
|
---|
5620 | *
|
---|
5621 | * @param v_mag_operation_mode_u_8 : The value of mag operation mode
|
---|
5622 | *
|
---|
5623 | * v_mag_operation_mode_u_8 | result
|
---|
5624 | * ------------------------- |--------------------------
|
---|
5625 | * 0x00 | MAG_OPR_MODE_LOWPOWER
|
---|
5626 | * 0x01 | MAG_OPR_MODE_REGULAR
|
---|
5627 | * 0x02 | MAG_OPR_MODE_ENHANCED_REGULAR
|
---|
5628 | * 0x03 | MAG_OPR_MODE_HIGH_ACCURACY
|
---|
5629 | *
|
---|
5630 | * @return results of bus communication function
|
---|
5631 | * @retval 0 -> Success
|
---|
5632 | * @retval 1 -> Error
|
---|
5633 | *
|
---|
5634 | *
|
---|
5635 | */
|
---|
5636 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_operation_mode(
|
---|
5637 | u_8 *v_mag_operation_mode_u_8);
|
---|
5638 | /*!
|
---|
5639 | * @brief This API used to write the mag operation mode
|
---|
5640 | * from page one register from 0x09 bit 3 to 4
|
---|
5641 | *
|
---|
5642 | * @param v_mag_operation_mode_u_8 : The value of mag operation mode
|
---|
5643 | *
|
---|
5644 | * v_mag_operation_mode_u_8 | result
|
---|
5645 | * ------------------------- |--------------------------
|
---|
5646 | * 0x00 | MAG_OPR_MODE_LOWPOWER
|
---|
5647 | * 0x01 | MAG_OPR_MODE_REGULAR
|
---|
5648 | * 0x02 | MAG_OPR_MODE_ENHANCED_REGULAR
|
---|
5649 | * 0x03 | MAG_OPR_MODE_HIGH_ACCURACY
|
---|
5650 | *
|
---|
5651 | * @return results of bus communication function
|
---|
5652 | * @retval 0 -> Success
|
---|
5653 | * @retval 1 -> Error
|
---|
5654 | *
|
---|
5655 | *
|
---|
5656 | */
|
---|
5657 | BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_operation_mode(
|
---|
5658 | u_8 v_mag_operation_mode_u_8);
|
---|
5659 | /*!
|
---|
5660 | * @brief This API used to read the mag power mode
|
---|
5661 | * from page one register from 0x09 bit 4 to 6
|
---|
5662 | *
|
---|
5663 | * @param v_mag_power_mode_u_8 : The value of mag power mode
|
---|
5664 | *
|
---|
5665 | * v_mag_power_mode_u_8 | result
|
---|
5666 | * --------------------|-----------------
|
---|
5667 | * 0x00 | MAG_POWER_MODE_NORMAL
|
---|
5668 | * 0x01 | MAG_POWER_MODE_SLEEP
|
---|
5669 | * 0x02 | MAG_POWER_MODE_SUSPEND
|
---|
5670 | * 0x03 | MAG_POWER_MODE_FORCE_MODE
|
---|
5671 | *
|
---|
5672 | * @return results of bus communication function
|
---|
5673 | * @retval 0 -> Success
|
---|
5674 | * @retval 1 -> Error
|
---|
5675 | *
|
---|
5676 | *
|
---|
5677 | */
|
---|
5678 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_power_mode(
|
---|
5679 | u_8 *v_mag_power_mode_u_8);
|
---|
5680 | /*!
|
---|
5681 | * @brief This API used to write the mag power mode
|
---|
5682 | * from page one register from 0x09 bit 4 to 6
|
---|
5683 | *
|
---|
5684 | * @param v_mag_power_mode_u_8 : The value of mag power mode
|
---|
5685 | *
|
---|
5686 | * v_mag_power_mode_u_8 | result
|
---|
5687 | * --------------------|-----------------
|
---|
5688 | * 0x00 | MAG_POWER_MODE_NORMAL
|
---|
5689 | * 0x01 | MAG_POWER_MODE_SLEEP
|
---|
5690 | * 0x02 | MAG_POWER_MODE_SUSPEND
|
---|
5691 | * 0x03 | MAG_POWER_MODE_FORCE_MODE
|
---|
5692 | *
|
---|
5693 | * @return results of bus communication function
|
---|
5694 | * @retval 0 -> Success
|
---|
5695 | * @retval 1 -> Error
|
---|
5696 | *
|
---|
5697 | *
|
---|
5698 | */
|
---|
5699 | BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_power_mode(
|
---|
5700 | u_8 v_mag_power_mode_u_8);
|
---|
5701 | /*****************************************************/
|
---|
5702 | /**\name FUNCTIONS FOR GYRO CONFIGURATION */
|
---|
5703 | /*****************************************************/
|
---|
5704 | /*!
|
---|
5705 | * @brief This API used to read the gyro range
|
---|
5706 | * from page one register from 0x0A bit 0 to 3
|
---|
5707 | *
|
---|
5708 | * @param v_gyro_range_u_8 : The value of gyro range
|
---|
5709 | *
|
---|
5710 | * v_gyro_range_u_8 | result
|
---|
5711 | * --------------------|-----------------
|
---|
5712 | * 0x00 | GYRO_RANGE_2000DPS
|
---|
5713 | * 0x01 | GYRO_RANGE_1000DPS
|
---|
5714 | * 0x02 | GYRO_RANGE_500DPS
|
---|
5715 | * 0x03 | GYRO_RANGE_250DPS
|
---|
5716 | * 0x04 | GYRO_RANGE_125DPS
|
---|
5717 | *
|
---|
5718 | * @return results of bus communication function
|
---|
5719 | * @retval 0 -> Success
|
---|
5720 | * @retval 1 -> Error
|
---|
5721 | *
|
---|
5722 | *
|
---|
5723 | */
|
---|
5724 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_range(
|
---|
5725 | u_8 *v_gyro_range_u_8);
|
---|
5726 | /*!
|
---|
5727 | * @brief This API used to write the gyro range
|
---|
5728 | * from page one register from 0x0A bit 0 to 3
|
---|
5729 | *
|
---|
5730 | * @param v_gyro_range_u_8 : The value of gyro range
|
---|
5731 | *
|
---|
5732 | * v_gyro_range_u_8 | result
|
---|
5733 | * --------------------|-----------------
|
---|
5734 | * 0x00 | GYRO_RANGE_2000DPS
|
---|
5735 | * 0x01 | GYRO_RANGE_1000DPS
|
---|
5736 | * 0x02 | GYRO_RANGE_500DPS
|
---|
5737 | * 0x03 | GYRO_RANGE_250DPS
|
---|
5738 | * 0x04 | GYRO_RANGE_125DPS
|
---|
5739 | *
|
---|
5740 | * @return results of bus communication function
|
---|
5741 | * @retval 0 -> Success
|
---|
5742 | * @retval 1 -> Error
|
---|
5743 | *
|
---|
5744 | *
|
---|
5745 | */
|
---|
5746 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_range(
|
---|
5747 | u_8 v_gyro_range_u_8);
|
---|
5748 | /*!
|
---|
5749 | * @brief This API used to read the gyro bandwidth
|
---|
5750 | * from page one register from 0x0A bit 3 to 5
|
---|
5751 | *
|
---|
5752 | * @param v_gyro_bw_u_8 : The value of gyro bandwidth
|
---|
5753 | *
|
---|
5754 | * v_gyro_bw_u_8 | result
|
---|
5755 | * --------------------|-----------------
|
---|
5756 | * 0x00 | GYRO_BW_523HZ
|
---|
5757 | * 0x01 | GYRO_BW_230HZ
|
---|
5758 | * 0x02 | GYRO_BW_116HZ
|
---|
5759 | * 0x03 | GYRO_BW_47HZ
|
---|
5760 | * 0x04 | GYRO_BW_23HZ
|
---|
5761 | * 0x05 | GYRO_BW_12HZ
|
---|
5762 | * 0x06 | GYRO_BW_64HZ
|
---|
5763 | * 0x07 | GYRO_BW_32HZ
|
---|
5764 | *
|
---|
5765 | * @return results of bus communication function
|
---|
5766 | * @retval 0 -> Success
|
---|
5767 | * @retval 1 -> Error
|
---|
5768 | *
|
---|
5769 | *
|
---|
5770 | */
|
---|
5771 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_bw(
|
---|
5772 | u_8 *v_gyro_bw_u_8);
|
---|
5773 | /*!
|
---|
5774 | * @brief This API used to write the gyro bandwidth
|
---|
5775 | * from page one register from 0x0A bit 3 to 5
|
---|
5776 | *
|
---|
5777 | * @param v_gyro_bw_u_8 : The value of gyro bandwidth
|
---|
5778 | *
|
---|
5779 | * v_gyro_bw_u_8 | result
|
---|
5780 | * --------------------|-----------------
|
---|
5781 | * 0x00 | GYRO_BW_523HZ
|
---|
5782 | * 0x01 | GYRO_BW_230HZ
|
---|
5783 | * 0x02 | GYRO_BW_116HZ
|
---|
5784 | * 0x03 | GYRO_BW_47HZ
|
---|
5785 | * 0x04 | GYRO_BW_23HZ
|
---|
5786 | * 0x05 | GYRO_BW_12HZ
|
---|
5787 | * 0x06 | GYRO_BW_64HZ
|
---|
5788 | * 0x07 | GYRO_BW_32HZ
|
---|
5789 | *
|
---|
5790 | * @return results of bus communication function
|
---|
5791 | * @retval 0 -> Success
|
---|
5792 | * @retval 1 -> Error
|
---|
5793 | *
|
---|
5794 | *
|
---|
5795 | */
|
---|
5796 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_bw(
|
---|
5797 | u_8 v_gyro_bw_u_8);
|
---|
5798 | /*!
|
---|
5799 | * @brief This API used to read the gyro power mode
|
---|
5800 | * from page one register from 0x0B bit 0 to 2
|
---|
5801 | *
|
---|
5802 | * @param v_gyro_power_mode_u_8 : The value of gyro power mode
|
---|
5803 | *
|
---|
5804 | * v_gyro_power_mode_u_8 | result
|
---|
5805 | * ----------------------|----------------------------
|
---|
5806 | * 0x00 | GYRO_OPR_MODE_NORMAL
|
---|
5807 | * 0x01 | GYRO_OPR_MODE_FASTPOWERUP
|
---|
5808 | * 0x02 | GYRO_OPR_MODE_DEEPSUSPEND
|
---|
5809 | * 0x03 | GYRO_OPR_MODE_SUSPEND
|
---|
5810 | * 0x04 | GYRO_OPR_MODE_ADVANCE_POWERSAVE
|
---|
5811 | *
|
---|
5812 | * @return results of bus communication function
|
---|
5813 | * @retval 0 -> Success
|
---|
5814 | * @retval 1 -> Error
|
---|
5815 | *
|
---|
5816 | *
|
---|
5817 | */
|
---|
5818 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_power_mode(
|
---|
5819 | u_8 *v_gyro_power_mode_u_8);
|
---|
5820 | /*!
|
---|
5821 | * @brief This API used to write the gyro power mode
|
---|
5822 | * from page one register from 0x0B bit 0 to 2
|
---|
5823 | *
|
---|
5824 | * @param v_gyro_power_mode_u_8 : The value of gyro power mode
|
---|
5825 | *
|
---|
5826 | * v_gyro_power_mode_u_8 | result
|
---|
5827 | * ----------------------|----------------------------
|
---|
5828 | * 0x00 | GYRO_OPR_MODE_NORMAL
|
---|
5829 | * 0x01 | GYRO_OPR_MODE_FASTPOWERUP
|
---|
5830 | * 0x02 | GYRO_OPR_MODE_DEEPSUSPEND
|
---|
5831 | * 0x03 | GYRO_OPR_MODE_SUSPEND
|
---|
5832 | * 0x04 | GYRO_OPR_MODE_ADVANCE_POWERSAVE
|
---|
5833 | *
|
---|
5834 | * @return results of bus communication function
|
---|
5835 | * @retval 0 -> Success
|
---|
5836 | * @retval 1 -> Error
|
---|
5837 | *
|
---|
5838 | *
|
---|
5839 | */
|
---|
5840 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_power_mode(
|
---|
5841 | u_8 v_gyro_power_mode_u_8);
|
---|
5842 | /*****************************************************/
|
---|
5843 | /**\name FUNCTIONS FOR ACCEL SLEEP SETTINGS */
|
---|
5844 | /*****************************************************/
|
---|
5845 | /*!
|
---|
5846 | * @brief This API used to read the accel sleep mode
|
---|
5847 | * from page one register from 0x0C bit 0
|
---|
5848 | *
|
---|
5849 | * @param v_sleep_tmr_u_8 : The value of accel sleep mode
|
---|
5850 | *
|
---|
5851 | * v_sleep_tmr_u_8 | result
|
---|
5852 | * ----------------- |------------------------------------
|
---|
5853 | * 0x00 | enable EventDrivenSampling(EDT)
|
---|
5854 | * 0x01 | enable Equidistant sampling mode(EST)
|
---|
5855 | *
|
---|
5856 | * @return results of bus communication function
|
---|
5857 | * @retval 0 -> Success
|
---|
5858 | * @retval 1 -> Error
|
---|
5859 | *
|
---|
5860 | *
|
---|
5861 | */
|
---|
5862 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_sleep_tmr_mode(
|
---|
5863 | u_8 *v_sleep_tmr_u_8);
|
---|
5864 | /*!
|
---|
5865 | * @brief This API used to write the accel sleep mode
|
---|
5866 | * from page one register from 0x0C bit 0
|
---|
5867 | *
|
---|
5868 | * @param v_sleep_tmr_u_8 : The value of accel sleep mode
|
---|
5869 | *
|
---|
5870 | * v_sleep_tmr_u_8 | result
|
---|
5871 | * ----------------- |------------------------------------
|
---|
5872 | * 0x00 | enable EventDrivenSampling(EDT)
|
---|
5873 | * 0x01 | enable Equidistant sampling mode(EST)
|
---|
5874 | *
|
---|
5875 | * @return results of bus communication function
|
---|
5876 | * @retval 0 -> Success
|
---|
5877 | * @retval 1 -> Error
|
---|
5878 | *
|
---|
5879 | *
|
---|
5880 | */
|
---|
5881 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_sleep_tmr_mode(
|
---|
5882 | u_8 v_sleep_tmr_u_8);
|
---|
5883 | /*!
|
---|
5884 | * @brief This API used to read the accel sleep duration
|
---|
5885 | * from page one register from 0x0C bit 1 to 4
|
---|
5886 | *
|
---|
5887 | * @param v_sleep_durn_u_8 : The value of accel sleep duration
|
---|
5888 | *
|
---|
5889 | * v_sleep_durn_u_8 | result
|
---|
5890 | * ---------------- |-----------------------------
|
---|
5891 | * 0x05 | BNO055_ACCEL_SLEEP_DURN_0_5MS
|
---|
5892 | * 0x06 | BNO055_ACCEL_SLEEP_DURN_1MS
|
---|
5893 | * 0x07 | BNO055_ACCEL_SLEEP_DURN_2MS
|
---|
5894 | * 0x08 | BNO055_ACCEL_SLEEP_DURN_4MS
|
---|
5895 | * 0x09 | BNO055_ACCEL_SLEEP_DURN_6MS
|
---|
5896 | * 0x0A | BNO055_ACCEL_SLEEP_DURN_10MS
|
---|
5897 | * 0x0B | BNO055_ACCEL_SLEEP_DURN_25MS
|
---|
5898 | * 0x0C | BNO055_ACCEL_SLEEP_DURN_50MS
|
---|
5899 | * 0x0D | BNO055_ACCEL_SLEEP_DURN_100MS
|
---|
5900 | * 0x0E | BNO055_ACCEL_SLEEP_DURN_500MS
|
---|
5901 | * 0x0F | BNO055_ACCEL_SLEEP_DURN_1S
|
---|
5902 | *
|
---|
5903 | * @return results of bus communication function
|
---|
5904 | * @retval 0 -> Success
|
---|
5905 | * @retval 1 -> Error
|
---|
5906 | *
|
---|
5907 | *
|
---|
5908 | */
|
---|
5909 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_sleep_durn(
|
---|
5910 | u_8 *v_sleep_durn_u_8);
|
---|
5911 | /*!
|
---|
5912 | * @brief This API used to write the accel sleep duration
|
---|
5913 | * from page one register from 0x0C bit 1 to 4
|
---|
5914 | *
|
---|
5915 | * @param v_sleep_durn_u_8 : The value of accel sleep duration
|
---|
5916 | *
|
---|
5917 | * v_sleep_durn_u_8 | result
|
---|
5918 | * ---------------- |-----------------------------
|
---|
5919 | * 0x05 | BNO055_ACCEL_SLEEP_DURN_0_5MS
|
---|
5920 | * 0x06 | BNO055_ACCEL_SLEEP_DURN_1MS
|
---|
5921 | * 0x07 | BNO055_ACCEL_SLEEP_DURN_2MS
|
---|
5922 | * 0x08 | BNO055_ACCEL_SLEEP_DURN_4MS
|
---|
5923 | * 0x09 | BNO055_ACCEL_SLEEP_DURN_6MS
|
---|
5924 | * 0x0A | BNO055_ACCEL_SLEEP_DURN_10MS
|
---|
5925 | * 0x0B | BNO055_ACCEL_SLEEP_DURN_25MS
|
---|
5926 | * 0x0C | BNO055_ACCEL_SLEEP_DURN_50MS
|
---|
5927 | * 0x0D | BNO055_ACCEL_SLEEP_DURN_100MS
|
---|
5928 | * 0x0E | BNO055_ACCEL_SLEEP_DURN_500MS
|
---|
5929 | * 0x0F | BNO055_ACCEL_SLEEP_DURN_1S
|
---|
5930 | *
|
---|
5931 | * @return results of bus communication function
|
---|
5932 | * @retval 0 -> Success
|
---|
5933 | * @retval 1 -> Error
|
---|
5934 | *
|
---|
5935 | *
|
---|
5936 | */
|
---|
5937 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_sleep_durn(
|
---|
5938 | u_8 v_sleep_durn_u_8);
|
---|
5939 | /*****************************************************/
|
---|
5940 | /**\name FUNCTIONS FOR GYRO SLEEP SETTINGS */
|
---|
5941 | /*****************************************************/
|
---|
5942 | /*!
|
---|
5943 | * @brief This API used to write the gyro sleep duration
|
---|
5944 | * from page one register from 0x0D bit 0 to 2
|
---|
5945 | *
|
---|
5946 | * @param v_sleep_durn_u_8 : The value of gyro sleep duration
|
---|
5947 | *
|
---|
5948 | * @return results of bus communication function
|
---|
5949 | * @retval 0 -> Success
|
---|
5950 | * @retval 1 -> Error
|
---|
5951 | *
|
---|
5952 | *
|
---|
5953 | */
|
---|
5954 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_sleep_durn(
|
---|
5955 | u_8 *v_sleep_durn_u_8);
|
---|
5956 | /*!
|
---|
5957 | * @brief This API used to write the gyro sleep duration
|
---|
5958 | * from page one register from 0x0D bit 0 to 2
|
---|
5959 | *
|
---|
5960 | * @param v_sleep_durn_u_8 : The value of gyro sleep duration
|
---|
5961 | *
|
---|
5962 | * @return results of bus communication function
|
---|
5963 | * @retval 0 -> Success
|
---|
5964 | * @retval 1 -> Error
|
---|
5965 | *
|
---|
5966 | *
|
---|
5967 | */
|
---|
5968 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_sleep_durn(
|
---|
5969 | u_8 sleep_durn);
|
---|
5970 | /*!
|
---|
5971 | * @brief This API used to read the gyro auto sleep duration
|
---|
5972 | * from page one register from 0x0D bit 3 to 5
|
---|
5973 | *
|
---|
5974 | * @param v_auto_sleep_durn_u_8 : The value of gyro auto sleep duration
|
---|
5975 | *
|
---|
5976 | * @return results of bus communication function
|
---|
5977 | * @retval 0 -> Success
|
---|
5978 | * @retval 1 -> Error
|
---|
5979 | *
|
---|
5980 | *
|
---|
5981 | */
|
---|
5982 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_auto_sleep_durn(
|
---|
5983 | u_8 *v_auto_sleep_durn_u_8);
|
---|
5984 | /*!
|
---|
5985 | * @brief This API used to write the gyro auto sleep duration
|
---|
5986 | * from page one register from 0x0D bit 3 to 5
|
---|
5987 | *
|
---|
5988 | * @param v_auto_sleep_durn_u_8 : The value of gyro auto sleep duration
|
---|
5989 | * @param bw : The value of gyro bandwidth
|
---|
5990 | *
|
---|
5991 | * @return results of bus communication function
|
---|
5992 | * @retval 0 -> Success
|
---|
5993 | * @retval 1 -> Error
|
---|
5994 | *
|
---|
5995 | *
|
---|
5996 | */
|
---|
5997 | BNO055_RETURN_FUNCTION_TYPE bno055_gyro_set_auto_sleep_durn(
|
---|
5998 | u_8 v_auto_sleep_durn_u_8, u_8 bw);
|
---|
5999 | /*****************************************************/
|
---|
6000 | /**\name FUNCTIONS FOR MAG SLEEP SETTINGS */
|
---|
6001 | /*****************************************************/
|
---|
6002 | /*!
|
---|
6003 | * @brief This API used to read the mag sleep mode
|
---|
6004 | * from page one register from 0x0E bit 0
|
---|
6005 | *
|
---|
6006 | * @param v_sleep_mode_u_8 : The value of mag sleep mode
|
---|
6007 | *
|
---|
6008 | * @return results of bus communication function
|
---|
6009 | * @retval 0 -> Success
|
---|
6010 | * @retval 1 -> Error
|
---|
6011 | *
|
---|
6012 | *
|
---|
6013 | */
|
---|
6014 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_sleep_mode(
|
---|
6015 | u_8 *v_sleep_mode_u_8);
|
---|
6016 | /*!
|
---|
6017 | * @brief This API used to write the mag sleep mode
|
---|
6018 | * from page one register from 0x0E bit 0
|
---|
6019 | *
|
---|
6020 | * @param v_sleep_mode_u_8 : The value of mag sleep mode
|
---|
6021 | *
|
---|
6022 | * @return results of bus communication function
|
---|
6023 | * @retval 0 -> Success
|
---|
6024 | * @retval 1 -> Error
|
---|
6025 | *
|
---|
6026 | *
|
---|
6027 | */
|
---|
6028 | BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_sleep_mode(
|
---|
6029 | u_8 v_sleep_mode_u_8);
|
---|
6030 | /*!
|
---|
6031 | * @brief This API used to read the mag sleep duration
|
---|
6032 | * from page one register from 0x0E bit 1 to 4
|
---|
6033 | *
|
---|
6034 | * @param v_sleep_durn_u_8 : The value of mag sleep duration
|
---|
6035 | *
|
---|
6036 | * @return results of bus communication function
|
---|
6037 | * @retval 0 -> Success
|
---|
6038 | * @retval 1 -> Error
|
---|
6039 | *
|
---|
6040 | *
|
---|
6041 | */
|
---|
6042 | BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_sleep_durn(
|
---|
6043 | u_8 *v_sleep_durn_u_8);
|
---|
6044 | /*!
|
---|
6045 | * @brief This API used to write the mag sleep duration
|
---|
6046 | * from page one register from 0x0E bit 1 to 4
|
---|
6047 | *
|
---|
6048 | * @param v_sleep_durn_u_8 : The value of mag sleep duration
|
---|
6049 | *
|
---|
6050 | * @return results of bus communication function
|
---|
6051 | * @retval 0 -> Success
|
---|
6052 | * @retval 1 -> Error
|
---|
6053 | *
|
---|
6054 | *
|
---|
6055 | */
|
---|
6056 | BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_sleep_durn(
|
---|
6057 | u_8 v_sleep_durn_u_8);
|
---|
6058 | /*****************************************************/
|
---|
6059 | /**\name FUNCTIONS FOR GYRO INTERRUPT MASK */
|
---|
6060 | /*****************************************************/
|
---|
6061 | /*!
|
---|
6062 | * @brief This API used to read the gyro anymotion interrupt mask
|
---|
6063 | * from page one register from 0x0F bit 2
|
---|
6064 | *
|
---|
6065 | * @param v_gyro_any_motion_u_8 : The value of gyro anymotion interrupt mask
|
---|
6066 | * v_gyro_any_motion_u_8 | result
|
---|
6067 | * -------------------- |------------
|
---|
6068 | * 0x01 | ENABLED
|
---|
6069 | * 0x00 | DISABLED
|
---|
6070 | *
|
---|
6071 | * @return results of bus communication function
|
---|
6072 | * @retval 0 -> Success
|
---|
6073 | * @retval 1 -> Error
|
---|
6074 | *
|
---|
6075 | * @note While enabling the gyro anymotion interrupt
|
---|
6076 | * configure the following settings
|
---|
6077 | *
|
---|
6078 | * Axis:
|
---|
6079 | * bno055_set_gyro_any_motion_axis_enable()
|
---|
6080 | *
|
---|
6081 | * Filter setting:
|
---|
6082 | * bno055_set_gyro_any_motion_filter()
|
---|
6083 | *
|
---|
6084 | * Threshold :
|
---|
6085 | *
|
---|
6086 | * bno055_set_gyro_any_motion_thres()
|
---|
6087 | *
|
---|
6088 | * Slope samples :
|
---|
6089 | *
|
---|
6090 | * bno055_set_gyro_any_motion_slope_samples()
|
---|
6091 | *
|
---|
6092 | * Awake duration :
|
---|
6093 | *
|
---|
6094 | * bno055_set_gyro_any_motion_awake_durn()
|
---|
6095 | *
|
---|
6096 | */
|
---|
6097 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_gyro_any_motion(
|
---|
6098 | u_8 *v_gyro_any_motion_u_8);
|
---|
6099 | /*!
|
---|
6100 | * @brief This API used to write the gyro anymotion interrupt mask
|
---|
6101 | * from page one register from 0x0F bit 2
|
---|
6102 | *
|
---|
6103 | * @param v_gyro_any_motion_u_8 : The value of gyro anymotion interrupt mask
|
---|
6104 | * v_gyro_any_motion_u_8 | result
|
---|
6105 | * -------------------- |------------
|
---|
6106 | * 0x01 | ENABLED
|
---|
6107 | * 0x00 | DISABLED
|
---|
6108 | *
|
---|
6109 | * @return results of bus communication function
|
---|
6110 | * @retval 0 -> Success
|
---|
6111 | * @retval 1 -> Error
|
---|
6112 | *
|
---|
6113 | * @note While enabling the gyro anymotion interrupt
|
---|
6114 | * configure the following settings
|
---|
6115 | *
|
---|
6116 | * Axis:
|
---|
6117 | * bno055_set_gyro_any_motion_axis_enable()
|
---|
6118 | *
|
---|
6119 | * Filter setting:
|
---|
6120 | * bno055_set_gyro_any_motion_filter()
|
---|
6121 | *
|
---|
6122 | * Threshold :
|
---|
6123 | *
|
---|
6124 | * bno055_set_gyro_any_motion_thres()
|
---|
6125 | *
|
---|
6126 | * Slope samples :
|
---|
6127 | *
|
---|
6128 | * bno055_set_gyro_any_motion_slope_samples()
|
---|
6129 | *
|
---|
6130 | * Awake duration :
|
---|
6131 | *
|
---|
6132 | * bno055_set_gyro_any_motion_awake_durn()
|
---|
6133 | *
|
---|
6134 | */
|
---|
6135 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_gyro_any_motion(
|
---|
6136 | u_8 v_gyro_any_motion_u_8);
|
---|
6137 | /*!
|
---|
6138 | * @brief This API used to read the gyro highrate interrupt mask
|
---|
6139 | * from page one register from 0x0F bit 3
|
---|
6140 | *
|
---|
6141 | * @param v_gyro_highrate_u_8 : The value of gyro highrate interrupt mask
|
---|
6142 | * v_gyro_highrate_u_8 | result
|
---|
6143 | * -------------------- |------------
|
---|
6144 | * 0x01 | ENABLED
|
---|
6145 | * 0x00 | DISABLED
|
---|
6146 | *
|
---|
6147 | * @return results of bus communication function
|
---|
6148 | * @retval 0 -> Success
|
---|
6149 | * @retval 1 -> Error
|
---|
6150 | *
|
---|
6151 | * @note While enabling the gyro highrate interrupt
|
---|
6152 | * configure the below settings by using
|
---|
6153 | * the following functions
|
---|
6154 | *
|
---|
6155 | * Axis :
|
---|
6156 | *
|
---|
6157 | * bno055_set_gyro_highrate_axis_enable()
|
---|
6158 | *
|
---|
6159 | * Filter :
|
---|
6160 | *
|
---|
6161 | * bno055_set_gyro_highrate_filter()
|
---|
6162 | *
|
---|
6163 | * Threshold :
|
---|
6164 | *
|
---|
6165 | * bno055_get_gyro_highrate_x_thres()
|
---|
6166 | *
|
---|
6167 | * bno055_get_gyro_highrate_y_thres()
|
---|
6168 | *
|
---|
6169 | * bno055_get_gyro_highrate_z_thres()
|
---|
6170 | *
|
---|
6171 | * Hysteresis :
|
---|
6172 | *
|
---|
6173 | * bno055_set_gyro_highrate_x_hyst()
|
---|
6174 | *
|
---|
6175 | * bno055_set_gyro_highrate_y_hyst()
|
---|
6176 | *
|
---|
6177 | * bno055_set_gyro_highrate_z_hyst()
|
---|
6178 | *
|
---|
6179 | * Duration :
|
---|
6180 | *
|
---|
6181 | * bno055_set_gyro_highrate_x_durn()
|
---|
6182 | *
|
---|
6183 | * bno055_set_gyro_highrate_y_durn()
|
---|
6184 | *
|
---|
6185 | * bno055_set_gyro_highrate_z_durn()
|
---|
6186 | *
|
---|
6187 | */
|
---|
6188 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_gyro_highrate(
|
---|
6189 | u_8 *v_gyro_highrate_u_8);
|
---|
6190 | /*!
|
---|
6191 | * @brief This API used to write the gyro highrate interrupt mask
|
---|
6192 | * from page one register from 0x0F bit 3
|
---|
6193 | *
|
---|
6194 | * @param v_gyro_highrate_u_8 : The value of gyro highrate interrupt mask
|
---|
6195 | * v_gyro_highrate_u_8 | result
|
---|
6196 | * -------------------- |------------
|
---|
6197 | * 0x01 | ENABLED
|
---|
6198 | * 0x00 | DISABLED
|
---|
6199 | *
|
---|
6200 | * @return results of bus communication function
|
---|
6201 | * @retval 0 -> Success
|
---|
6202 | * @retval 1 -> Error
|
---|
6203 | *
|
---|
6204 | * @note While enabling the gyro highrate interrupt
|
---|
6205 | * configure the below settings by using
|
---|
6206 | * the following functions
|
---|
6207 | *
|
---|
6208 | * Axis :
|
---|
6209 | *
|
---|
6210 | * bno055_set_gyro_highrate_axis_enable()
|
---|
6211 | *
|
---|
6212 | * Filter :
|
---|
6213 | *
|
---|
6214 | * bno055_set_gyro_highrate_filter()
|
---|
6215 | *
|
---|
6216 | * Threshold :
|
---|
6217 | *
|
---|
6218 | * bno055_get_gyro_highrate_x_thres()
|
---|
6219 | *
|
---|
6220 | * bno055_get_gyro_highrate_y_thres()
|
---|
6221 | *
|
---|
6222 | * bno055_get_gyro_highrate_z_thres()
|
---|
6223 | *
|
---|
6224 | * Hysteresis :
|
---|
6225 | *
|
---|
6226 | * bno055_set_gyro_highrate_x_hyst()
|
---|
6227 | *
|
---|
6228 | * bno055_set_gyro_highrate_y_hyst()
|
---|
6229 | *
|
---|
6230 | * bno055_set_gyro_highrate_z_hyst()
|
---|
6231 | *
|
---|
6232 | * Duration :
|
---|
6233 | *
|
---|
6234 | * bno055_set_gyro_highrate_x_durn()
|
---|
6235 | *
|
---|
6236 | * bno055_set_gyro_highrate_y_durn()
|
---|
6237 | *
|
---|
6238 | * bno055_set_gyro_highrate_z_durn()
|
---|
6239 | *
|
---|
6240 | */
|
---|
6241 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_gyro_highrate(
|
---|
6242 | u_8 v_gyro_highrate_u_8);
|
---|
6243 | /*****************************************************/
|
---|
6244 | /**\name FUNCTIONS FOR ACCEL INTERRUPT MASK */
|
---|
6245 | /*****************************************************/
|
---|
6246 | /*!
|
---|
6247 | * @brief This API used to read the accel highg interrupt mask
|
---|
6248 | * from page one register from 0x0F bit 5
|
---|
6249 | *
|
---|
6250 | * @param v_accel_high_g_u_8 : The value of accel highg interrupt mask
|
---|
6251 | * v_accel_high_g_u_8 | result
|
---|
6252 | * -------------------- |------------
|
---|
6253 | * 0x01 | ENABLED
|
---|
6254 | * 0x00 | DISABLED
|
---|
6255 | *
|
---|
6256 | * @return results of bus communication function
|
---|
6257 | * @retval 0 -> Success
|
---|
6258 | * @retval 1 -> Error
|
---|
6259 | *
|
---|
6260 | * @note While enabling the accel highg interrupt
|
---|
6261 | * configure the below settings by using
|
---|
6262 | * the following functions
|
---|
6263 | *
|
---|
6264 | * Axis :
|
---|
6265 | *
|
---|
6266 | * bno055_set_accel_high_g_axis_enable()
|
---|
6267 | *
|
---|
6268 | * Threshold :
|
---|
6269 | *
|
---|
6270 | * bno055_set_accel_high_g_thres()
|
---|
6271 | *
|
---|
6272 | * Duration :
|
---|
6273 | *
|
---|
6274 | * bno055_set_accel_high_g_durn()
|
---|
6275 | *
|
---|
6276 | */
|
---|
6277 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_high_g(
|
---|
6278 | u_8 *v_accel_high_g_u_8);
|
---|
6279 | /*!
|
---|
6280 | * @brief This API used to write the accel highg interrupt mask
|
---|
6281 | * from page one register from 0x0F bit 5
|
---|
6282 | *
|
---|
6283 | * @param v_accel_high_g_u_8 : The value of accel highg interrupt mask
|
---|
6284 | * v_accel_high_g_u_8 | result
|
---|
6285 | * -------------------- |------------
|
---|
6286 | * 0x01 | ENABLED
|
---|
6287 | * 0x00 | DISABLED
|
---|
6288 | *
|
---|
6289 | * @return results of bus communication function
|
---|
6290 | * @retval 0 -> Success
|
---|
6291 | * @retval 1 -> Error
|
---|
6292 | *
|
---|
6293 | * @note While enabling the accel highg interrupt
|
---|
6294 | * configure the below settings by using
|
---|
6295 | * the following functions
|
---|
6296 | *
|
---|
6297 | * Axis :
|
---|
6298 | *
|
---|
6299 | * bno055_set_accel_high_g_axis_enable()
|
---|
6300 | *
|
---|
6301 | * Threshold :
|
---|
6302 | *
|
---|
6303 | * bno055_set_accel_high_g_thres()
|
---|
6304 | *
|
---|
6305 | * Duration :
|
---|
6306 | *
|
---|
6307 | * bno055_set_accel_high_g_durn()
|
---|
6308 | *
|
---|
6309 | */
|
---|
6310 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_high_g(
|
---|
6311 | u_8 v_accel_high_g_u_8);
|
---|
6312 | /*!
|
---|
6313 | * @brief This API used to read the accel anymotion interrupt mask
|
---|
6314 | * from page one register from 0x0F bit 6
|
---|
6315 | *
|
---|
6316 | * @param v_accel_any_motion_u_8 : The value of accel anymotion interrupt mask
|
---|
6317 | * v_accel_any_motion_u_8 | result
|
---|
6318 | * -------------------- |------------
|
---|
6319 | * 0x01 | ENABLED
|
---|
6320 | * 0x00 | DISABLED
|
---|
6321 | *
|
---|
6322 | * @return results of bus communication function
|
---|
6323 | * @retval 0 -> Success
|
---|
6324 | * @retval 1 -> Error
|
---|
6325 | *
|
---|
6326 | * @note While enabling the accel highg interrupt
|
---|
6327 | * configure the below settings by using
|
---|
6328 | * the following functions
|
---|
6329 | *
|
---|
6330 | * Axis :
|
---|
6331 | *
|
---|
6332 | * bno055_set_accel_high_g_axis_enable()
|
---|
6333 | *
|
---|
6334 | * Threshold :
|
---|
6335 | *
|
---|
6336 | * bno055_set_accel_high_g_thres()
|
---|
6337 | *
|
---|
6338 | * Duration :
|
---|
6339 | *
|
---|
6340 | * bno055_set_accel_high_g_durn()
|
---|
6341 | *
|
---|
6342 | */
|
---|
6343 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_any_motion(
|
---|
6344 | u_8 *v_accel_any_motion_u_8);
|
---|
6345 | /*!
|
---|
6346 | * @brief This API used to write the accel anymotion interrupt mask
|
---|
6347 | * from page one register from 0x0F bit 6
|
---|
6348 | *
|
---|
6349 | * @param v_accel_any_motion_u_8 : The value of accel anymotion interrupt mask
|
---|
6350 | * v_accel_any_motion_u_8 | result
|
---|
6351 | * -------------------- |------------
|
---|
6352 | * 0x01 | ENABLED
|
---|
6353 | * 0x00 | DISABLED
|
---|
6354 | *
|
---|
6355 | * @return results of bus communication function
|
---|
6356 | * @retval 0 -> Success
|
---|
6357 | * @retval 1 -> Error
|
---|
6358 | *
|
---|
6359 | * @note While enabling the accel anymotion interrupt
|
---|
6360 | * configure the following settings
|
---|
6361 | *
|
---|
6362 | * Axis:
|
---|
6363 | *
|
---|
6364 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6365 | *
|
---|
6366 | * Duration:
|
---|
6367 | *
|
---|
6368 | * bno055_set_accel_any_motion_durn()
|
---|
6369 | *
|
---|
6370 | * Threshold:
|
---|
6371 | *
|
---|
6372 | * bno055_set_accel_any_motion_thres()
|
---|
6373 | *
|
---|
6374 | */
|
---|
6375 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_any_motion(
|
---|
6376 | u_8 v_accel_any_motion_u_8);
|
---|
6377 | /*!
|
---|
6378 | * @brief This API used to read the accel nomotion interrupt mask
|
---|
6379 | * from page one register from 0x0F bit 7
|
---|
6380 | *
|
---|
6381 | * @param v_accel_nomotion_u_8 : The value of accel nomotion interrupt mask
|
---|
6382 | * v_accel_nomotion_u_8 | result
|
---|
6383 | * -------------------- |------------
|
---|
6384 | * 0x01 | ENABLED
|
---|
6385 | * 0x00 | DISABLED
|
---|
6386 | *
|
---|
6387 | * @return results of bus communication function
|
---|
6388 | * @retval 0 -> Success
|
---|
6389 | *
|
---|
6390 | * @note While enabling the accel anymotion interrupt
|
---|
6391 | * configure the following settings
|
---|
6392 | *
|
---|
6393 | * Axis:
|
---|
6394 | *
|
---|
6395 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6396 | *
|
---|
6397 | * Duration:
|
---|
6398 | *
|
---|
6399 | * bno055_set_accel_any_motion_durn()
|
---|
6400 | *
|
---|
6401 | * Threshold:
|
---|
6402 | *
|
---|
6403 | * bno055_set_accel_any_motion_thres())
|
---|
6404 | *
|
---|
6405 | */
|
---|
6406 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_no_motion(
|
---|
6407 | u_8 *v_accel_nomotion_u_8);
|
---|
6408 | /*!
|
---|
6409 | * @brief This API used to write the accel nomotion interrupt mask
|
---|
6410 | * from page one register from 0x0F bit 7
|
---|
6411 | *
|
---|
6412 | * @param v_accel_nomotion_u_8 : The value of accel nomotion interrupt mask
|
---|
6413 | * v_accel_nomotion_u_8 | result
|
---|
6414 | * -------------------- |------------
|
---|
6415 | * 0x01 | ENABLED
|
---|
6416 | * 0x00 | DISABLED
|
---|
6417 | *
|
---|
6418 | * @return results of bus communication function
|
---|
6419 | * @retval 0 -> Success
|
---|
6420 | * @retval 1 -> Error
|
---|
6421 | *
|
---|
6422 | * @note While enabling the accel nomotion interrupt
|
---|
6423 | * configure the following settings
|
---|
6424 | *
|
---|
6425 | * Axis:
|
---|
6426 | *
|
---|
6427 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6428 | *
|
---|
6429 | * Threshold :
|
---|
6430 | *
|
---|
6431 | * bno055_set_accel_slow_no_motion_thres()
|
---|
6432 | *
|
---|
6433 | * Duration :
|
---|
6434 | *
|
---|
6435 | * bno055_set_accel_slow_no_motion_durn()
|
---|
6436 | *
|
---|
6437 | * Slow/no motion enable:
|
---|
6438 | *
|
---|
6439 | * bno055_set_accel_slow_no_motion_enable()
|
---|
6440 | *
|
---|
6441 | */
|
---|
6442 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_no_motion(
|
---|
6443 | u_8 v_accel_nomotion_u_8);
|
---|
6444 | /*****************************************************/
|
---|
6445 | /**\name FUNCTIONS FOR GYRO INTERRUPT */
|
---|
6446 | /*****************************************************/
|
---|
6447 | /*!
|
---|
6448 | * @brief This API used to read the gyro anymotion interrupt
|
---|
6449 | * from page one register from 0x10 bit 2
|
---|
6450 | *
|
---|
6451 | * @param v_gyro_any_motion_u_8 : The value of gyro anymotion interrupt
|
---|
6452 | * v_gyro_any_motion_u_8 | result
|
---|
6453 | * -------------------- |------------
|
---|
6454 | * 0x01 | ENABLED
|
---|
6455 | * 0x00 | DISABLED
|
---|
6456 | *
|
---|
6457 | * @return results of bus communication function
|
---|
6458 | * @retval 0 -> Success
|
---|
6459 | * @retval 1 -> Error
|
---|
6460 | *
|
---|
6461 | * @note While enabling the gyro anymotion interrupt
|
---|
6462 | * configure the following settings
|
---|
6463 | *
|
---|
6464 | * Axis:
|
---|
6465 | * bno055_set_gyro_any_motion_axis_enable()
|
---|
6466 | *
|
---|
6467 | * Filter setting:
|
---|
6468 | * bno055_set_gyro_any_motion_filter()
|
---|
6469 | *
|
---|
6470 | * Threshold :
|
---|
6471 | *
|
---|
6472 | * bno055_set_gyro_any_motion_thres()
|
---|
6473 | *
|
---|
6474 | * Slope samples :
|
---|
6475 | *
|
---|
6476 | * bno055_set_gyro_any_motion_slope_samples()
|
---|
6477 | *
|
---|
6478 | * Awake duration :
|
---|
6479 | *
|
---|
6480 | * bno055_set_gyro_any_motion_awake_durn()
|
---|
6481 | */
|
---|
6482 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_gyro_any_motion(
|
---|
6483 | u_8 *v_gyro_any_motion_u_8);
|
---|
6484 | /*!
|
---|
6485 | * @brief This API used to write the gyro anymotion interrupt
|
---|
6486 | * from page one register from 0x10 bit 2
|
---|
6487 | *
|
---|
6488 | * @param v_gyro_any_motion_u_8 : The value of gyro anymotion interrupt
|
---|
6489 | * v_gyro_any_motion_u_8 | result
|
---|
6490 | * -------------------- |------------
|
---|
6491 | * 0x01 | ENABLED
|
---|
6492 | * 0x00 | DISABLED
|
---|
6493 | *
|
---|
6494 | * @return results of bus communication function
|
---|
6495 | * @retval 0 -> Success
|
---|
6496 | * @retval 1 -> Error
|
---|
6497 | *
|
---|
6498 | * @note While enabling the gyro anymotion interrupt
|
---|
6499 | * configure the following settings
|
---|
6500 | *
|
---|
6501 | * Axis:
|
---|
6502 | * bno055_set_gyro_any_motion_axis_enable()
|
---|
6503 | *
|
---|
6504 | * Filter setting:
|
---|
6505 | * bno055_set_gyro_any_motion_filter()
|
---|
6506 | *
|
---|
6507 | * Threshold :
|
---|
6508 | *
|
---|
6509 | * bno055_set_gyro_any_motion_thres()
|
---|
6510 | *
|
---|
6511 | * Slope samples :
|
---|
6512 | *
|
---|
6513 | * bno055_set_gyro_any_motion_slope_samples()
|
---|
6514 | *
|
---|
6515 | * Awake duration :
|
---|
6516 | *
|
---|
6517 | * bno055_set_gyro_any_motion_awake_durn()
|
---|
6518 | */
|
---|
6519 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_gyro_any_motion(
|
---|
6520 | u_8 v_gyro_any_motion_u_8);
|
---|
6521 | /*!
|
---|
6522 | * @brief This API used to read the gyro highrate interrupt
|
---|
6523 | * from page one register from 0x10 bit 3
|
---|
6524 | *
|
---|
6525 | * @param v_gyro_highrate_u_8 : The value of gyro highrate interrupt
|
---|
6526 | * v_gyro_highrate_u_8 | result
|
---|
6527 | * -------------------- |------------
|
---|
6528 | * 0x01 | ENABLED
|
---|
6529 | * 0x00 | DISABLED
|
---|
6530 | *
|
---|
6531 | * @return results of bus communication function
|
---|
6532 | * @retval 0 -> Success
|
---|
6533 | * @retval 1 -> Error
|
---|
6534 | *
|
---|
6535 | * @note While enabling the gyro highrate interrupt
|
---|
6536 | * configure the below settings by using
|
---|
6537 | * the following functions
|
---|
6538 | *
|
---|
6539 | * Axis :
|
---|
6540 | *
|
---|
6541 | * bno055_set_gyro_highrate_axis_enable()
|
---|
6542 | *
|
---|
6543 | * Filter :
|
---|
6544 | *
|
---|
6545 | * bno055_set_gyro_highrate_filter()
|
---|
6546 | *
|
---|
6547 | * Threshold :
|
---|
6548 | *
|
---|
6549 | * bno055_get_gyro_highrate_x_thres()
|
---|
6550 | *
|
---|
6551 | * bno055_get_gyro_highrate_y_thres()
|
---|
6552 | *
|
---|
6553 | * bno055_get_gyro_highrate_z_thres()
|
---|
6554 | *
|
---|
6555 | * Hysteresis :
|
---|
6556 | *
|
---|
6557 | * bno055_set_gyro_highrate_x_hyst()
|
---|
6558 | *
|
---|
6559 | * bno055_set_gyro_highrate_y_hyst()
|
---|
6560 | *
|
---|
6561 | * bno055_set_gyro_highrate_z_hyst()
|
---|
6562 | *
|
---|
6563 | * Duration :
|
---|
6564 | *
|
---|
6565 | * bno055_set_gyro_highrate_x_durn()
|
---|
6566 | *
|
---|
6567 | * bno055_set_gyro_highrate_y_durn()
|
---|
6568 | *
|
---|
6569 | * bno055_set_gyro_highrate_z_durn()
|
---|
6570 | *
|
---|
6571 | */
|
---|
6572 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_gyro_highrate(
|
---|
6573 | u_8 *v_gyro_highrate_u_8);
|
---|
6574 | /*!
|
---|
6575 | * @brief This API used to write the gyro highrate interrupt
|
---|
6576 | * from page one register from 0x10 bit 3
|
---|
6577 | *
|
---|
6578 | * @param v_gyro_highrate_u_8 : The value of gyro highrate interrupt
|
---|
6579 | * v_gyro_highrate_u_8 | result
|
---|
6580 | * -------------------- |------------
|
---|
6581 | * 0x01 | ENABLED
|
---|
6582 | * 0x00 | DISABLED
|
---|
6583 | *
|
---|
6584 | * @return results of bus communication function
|
---|
6585 | * @retval 0 -> Success
|
---|
6586 | * @retval 1 -> Error
|
---|
6587 | *
|
---|
6588 | * @note While enabling the gyro highrate interrupt
|
---|
6589 | * configure the below settings by using
|
---|
6590 | * the following functions
|
---|
6591 | *
|
---|
6592 | * Axis :
|
---|
6593 | *
|
---|
6594 | * bno055_set_gyro_highrate_axis_enable()
|
---|
6595 | *
|
---|
6596 | * Filter :
|
---|
6597 | *
|
---|
6598 | * bno055_set_gyro_highrate_filter()
|
---|
6599 | *
|
---|
6600 | * Threshold :
|
---|
6601 | *
|
---|
6602 | * bno055_get_gyro_highrate_x_thres()
|
---|
6603 | *
|
---|
6604 | * bno055_get_gyro_highrate_y_thres()
|
---|
6605 | *
|
---|
6606 | * bno055_get_gyro_highrate_z_thres()
|
---|
6607 | *
|
---|
6608 | * Hysteresis :
|
---|
6609 | *
|
---|
6610 | * bno055_set_gyro_highrate_x_hyst()
|
---|
6611 | *
|
---|
6612 | * bno055_set_gyro_highrate_y_hyst()
|
---|
6613 | *
|
---|
6614 | * bno055_set_gyro_highrate_z_hyst()
|
---|
6615 | *
|
---|
6616 | * Duration :
|
---|
6617 | *
|
---|
6618 | * bno055_set_gyro_highrate_x_durn()
|
---|
6619 | *
|
---|
6620 | * bno055_set_gyro_highrate_y_durn()
|
---|
6621 | *
|
---|
6622 | * bno055_set_gyro_highrate_z_durn()
|
---|
6623 | *
|
---|
6624 | */
|
---|
6625 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_gyro_highrate(
|
---|
6626 | u_8 v_gyro_highrate_u_8);
|
---|
6627 | /*****************************************************/
|
---|
6628 | /**\name FUNCTIONS FOR ACCEL INTERRUPT */
|
---|
6629 | /*****************************************************/
|
---|
6630 | /*!
|
---|
6631 | * @brief This API used to read the accel highg interrupt
|
---|
6632 | * from page one register from 0x10 bit 5
|
---|
6633 | *
|
---|
6634 | * @param v_accel_high_g_u_8 : The value of accel highg interrupt
|
---|
6635 | * v_accel_high_g_u_8 | result
|
---|
6636 | * -------------------- |------------
|
---|
6637 | * 0x01 | ENABLED
|
---|
6638 | * 0x00 | DISABLED
|
---|
6639 | *
|
---|
6640 | * @return results of bus communication function
|
---|
6641 | * @retval 0 -> Success
|
---|
6642 | * @retval 1 -> Error
|
---|
6643 | *
|
---|
6644 | * @note While enabling the accel highg interrupt
|
---|
6645 | * configure the below settings by using
|
---|
6646 | * the following functions
|
---|
6647 | *
|
---|
6648 | * Axis :
|
---|
6649 | *
|
---|
6650 | * bno055_set_accel_high_g_axis_enable()
|
---|
6651 | *
|
---|
6652 | * Threshold :
|
---|
6653 | *
|
---|
6654 | * bno055_set_accel_high_g_thres()
|
---|
6655 | *
|
---|
6656 | * Duration :
|
---|
6657 | *
|
---|
6658 | * bno055_set_accel_high_g_durn()
|
---|
6659 | *
|
---|
6660 | */
|
---|
6661 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_high_g(
|
---|
6662 | u_8 *v_accel_high_g_u_8);
|
---|
6663 | /*!
|
---|
6664 | * @brief This API used to write the accel highg interrupt
|
---|
6665 | * from page one register from 0x10 bit 5
|
---|
6666 | *
|
---|
6667 | * @param v_accel_high_g_u_8 : The value of accel highg interrupt
|
---|
6668 | * v_accel_high_g_u_8 | result
|
---|
6669 | * -------------------- |------------
|
---|
6670 | * 0x01 | ENABLED
|
---|
6671 | * 0x00 | DISABLED
|
---|
6672 | *
|
---|
6673 | * @return results of bus communication function
|
---|
6674 | * @retval 0 -> Success
|
---|
6675 | * @retval 1 -> Error
|
---|
6676 | *
|
---|
6677 | * @note While enabling the accel highg interrupt
|
---|
6678 | * configure the below settings by using
|
---|
6679 | * the following functions
|
---|
6680 | *
|
---|
6681 | * Axis :
|
---|
6682 | *
|
---|
6683 | * bno055_set_accel_high_g_axis_enable()
|
---|
6684 | *
|
---|
6685 | * Threshold :
|
---|
6686 | *
|
---|
6687 | * bno055_set_accel_high_g_thres()
|
---|
6688 | *
|
---|
6689 | * Duration :
|
---|
6690 | *
|
---|
6691 | * bno055_set_accel_high_g_durn()
|
---|
6692 | *
|
---|
6693 | */
|
---|
6694 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_high_g(
|
---|
6695 | u_8 v_accel_high_g_u_8);
|
---|
6696 | /*!
|
---|
6697 | * @brief This API used to read the accel anymotion interrupt
|
---|
6698 | * from page one register from 0x10 bit 6
|
---|
6699 | *
|
---|
6700 | * @param v_accel_any_motion_u_8 : The value of accel anymotion interrupt
|
---|
6701 | * v_accel_any_motion_u_8 | result
|
---|
6702 | * -------------------- |------------
|
---|
6703 | * 0x01 | ENABLED
|
---|
6704 | * 0x00 | DISABLED
|
---|
6705 | *
|
---|
6706 | * @return results of bus communication function
|
---|
6707 | * @retval 0 -> Success
|
---|
6708 | * @retval 1 -> Error
|
---|
6709 | *
|
---|
6710 | * @note While enabling the accel anymotion interrupt
|
---|
6711 | * configure the following settings
|
---|
6712 | *
|
---|
6713 | * Axis:
|
---|
6714 | *
|
---|
6715 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6716 | *
|
---|
6717 | * Duration:
|
---|
6718 | *
|
---|
6719 | * bno055_set_accel_any_motion_durn()
|
---|
6720 | *
|
---|
6721 | * Threshold:
|
---|
6722 | *
|
---|
6723 | * bno055_set_accel_any_motion_thres()
|
---|
6724 | *
|
---|
6725 | */
|
---|
6726 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_any_motion(
|
---|
6727 | u_8 *v_accel_any_motion_u_8);
|
---|
6728 | /*!
|
---|
6729 | * @brief This API used to write the accel anymotion interrupt
|
---|
6730 | * from page one register from 0x10 bit 6
|
---|
6731 | *
|
---|
6732 | * @param v_accel_any_motion_u_8 : The value of accel anymotion interrupt
|
---|
6733 | * v_accel_any_motion_u_8 | result
|
---|
6734 | * -------------------- |------------
|
---|
6735 | * 0x01 | ENABLED
|
---|
6736 | * 0x00 | DISABLED
|
---|
6737 | *
|
---|
6738 | * @return results of bus communication function
|
---|
6739 | * @retval 0 -> Success
|
---|
6740 | * @retval 1 -> Error
|
---|
6741 | *
|
---|
6742 | * @note While enabling the accel anymotion interrupt
|
---|
6743 | * configure the following settings
|
---|
6744 | *
|
---|
6745 | * Axis:
|
---|
6746 | *
|
---|
6747 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6748 | *
|
---|
6749 | * Duration:
|
---|
6750 | *
|
---|
6751 | * bno055_set_accel_any_motion_durn()
|
---|
6752 | *
|
---|
6753 | * Threshold:
|
---|
6754 | *
|
---|
6755 | * bno055_set_accel_any_motion_thres()
|
---|
6756 | *
|
---|
6757 | */
|
---|
6758 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_any_motion(
|
---|
6759 | u_8 v_accel_any_motion_u_8);
|
---|
6760 | /*!
|
---|
6761 | * @brief This API used to read the accel nomotion interrupt
|
---|
6762 | * from page one register from 0x10 bit 6
|
---|
6763 | *
|
---|
6764 | * @param v_accel_nomotion_u_8 : The value of accel nomotion interrupt
|
---|
6765 | * v_accel_nomotion_u_8 | result
|
---|
6766 | * -------------------- |------------
|
---|
6767 | * 0x01 | ENABLED
|
---|
6768 | * 0x00 | DISABLED
|
---|
6769 | *
|
---|
6770 | * @return results of bus communication function
|
---|
6771 | * @retval 0 -> Success
|
---|
6772 | * @retval 1 -> Error
|
---|
6773 | *
|
---|
6774 | * @note While enabling the accel nomotion interrupt
|
---|
6775 | * configure the following settings
|
---|
6776 | *
|
---|
6777 | * Axis:
|
---|
6778 | *
|
---|
6779 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6780 | *
|
---|
6781 | * Threshold :
|
---|
6782 | *
|
---|
6783 | * bno055_set_accel_slow_no_motion_thres()
|
---|
6784 | *
|
---|
6785 | * Duration :
|
---|
6786 | *
|
---|
6787 | * bno055_set_accel_slow_no_motion_durn()
|
---|
6788 | *
|
---|
6789 | * Slow/no motion enable:
|
---|
6790 | *
|
---|
6791 | * bno055_set_accel_slow_no_motion_enable()
|
---|
6792 | *
|
---|
6793 | */
|
---|
6794 | BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_no_motion(
|
---|
6795 | u_8 *v_accel_nomotion_u_8);
|
---|
6796 | /*!
|
---|
6797 | * @brief This API used to write the accel nomotion interrupt
|
---|
6798 | * from page one register from 0x10 bit 6
|
---|
6799 | *
|
---|
6800 | * @param v_accel_nomotion_u_8 : The value of accel nomotion interrupt
|
---|
6801 | * v_accel_nomotion_u_8 | result
|
---|
6802 | * -------------------- |------------
|
---|
6803 | * 0x01 | ENABLED
|
---|
6804 | * 0x00 | DISABLED
|
---|
6805 | *
|
---|
6806 | * @return results of bus communication function
|
---|
6807 | * @retval 0 -> Success
|
---|
6808 | * @retval 1 -> Error
|
---|
6809 | *
|
---|
6810 | * @note While enabling the accel nomotion interrupt
|
---|
6811 | * configure the following settings
|
---|
6812 | *
|
---|
6813 | * Axis:
|
---|
6814 | *
|
---|
6815 | * bno055_set_accel_any_motion_no_motion_axis_enable()
|
---|
6816 | *
|
---|
6817 | * Threshold :
|
---|
6818 | *
|
---|
6819 | * bno055_set_accel_slow_no_motion_thres()
|
---|
6820 | *
|
---|
6821 | * Duration :
|
---|
6822 | *
|
---|
6823 | * bno055_set_accel_slow_no_motion_durn()
|
---|
6824 | *
|
---|
6825 | * Slow/no motion enable:
|
---|
6826 | *
|
---|
6827 | * bno055_set_accel_slow_no_motion_enable()
|
---|
6828 | *
|
---|
6829 | */
|
---|
6830 | BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_no_motion(
|
---|
6831 | u_8 v_accel_nomotion_u_8);
|
---|
6832 | /*****************************************************/
|
---|
6833 | /**\name FUNCTIONS FOR ACCEL ANY_MOTION THRESHOLD */
|
---|
6834 | /*****************************************************/
|
---|
6835 | /*!
|
---|
6836 | * @brief This API used to read the accel any motion threshold
|
---|
6837 | * from page one register from 0x11 bit 0 to 7
|
---|
6838 | *
|
---|
6839 | * @param v_accel_any_motion_thres_u_8 : The value of any motion threshold
|
---|
6840 | * v_accel_any_motion_thres_u_8 | result
|
---|
6841 | * ------------------------ | -------------
|
---|
6842 | * 0x01 | ENABLED
|
---|
6843 | * 0x00 | DISABLED
|
---|
6844 | *
|
---|
6845 | * @return results of bus communication function
|
---|
6846 | * @retval 0 -> Success
|
---|
6847 | * @retval 1 -> Error
|
---|
6848 | *
|
---|
6849 | * @note Accel anymotion threshold dependent on the
|
---|
6850 | * range values
|
---|
6851 | *
|
---|
6852 | * v_accel_range_u_8 | threshold | LSB
|
---|
6853 | * ------------- | ------------- | ---------
|
---|
6854 | * 2g | 3.19mg | 1LSB
|
---|
6855 | * 4g | 7.81mg | 1LSB
|
---|
6856 | * 8g | 15.63mg | 1LSB
|
---|
6857 | * 16g | 31.25mg | 1LSB
|
---|
6858 | *
|
---|
6859 | */
|
---|
6860 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_thres(
|
---|
6861 | u_8 *v_accel_any_motion_thres_u_8);
|
---|
6862 | /*!
|
---|
6863 | * @brief This API used to write the accel any motion threshold
|
---|
6864 | * from page one register from 0x11 bit 0 to 7
|
---|
6865 | *
|
---|
6866 | * @param v_accel_any_motion_thres_u_8 : The value of any motion threshold
|
---|
6867 | * v_accel_any_motion_thres_u_8 | result
|
---|
6868 | * ------------------------ | -------------
|
---|
6869 | * 0x01 | ENABLED
|
---|
6870 | * 0x00 | DISABLED
|
---|
6871 | *
|
---|
6872 | * @return results of bus communication function
|
---|
6873 | * @retval 0 -> Success
|
---|
6874 | * @retval 1 -> Error
|
---|
6875 | *
|
---|
6876 | * @note Accel anymotion threshold dependent on the
|
---|
6877 | * range values
|
---|
6878 | *
|
---|
6879 | * v_accel_range_u_8 | threshold | LSB
|
---|
6880 | * ------------- | ------------- | ---------
|
---|
6881 | * 2g | 3.19mg | 1LSB
|
---|
6882 | * 4g | 7.81mg | 1LSB
|
---|
6883 | * 8g | 15.63mg | 1LSB
|
---|
6884 | * 16g | 31.25mg | 1LSB
|
---|
6885 | *
|
---|
6886 | */
|
---|
6887 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_thres(
|
---|
6888 | u_8 v_accel_any_motion_thres_u_8);
|
---|
6889 | /*****************************************************/
|
---|
6890 | /**\name FUNCTIONS FOR ACCEL ANY_MOTION DURATION */
|
---|
6891 | /*****************************************************/
|
---|
6892 | /*!
|
---|
6893 | * @brief This API used to read the accel anymotion duration
|
---|
6894 | * from page one register from 0x12 bit 0 to 1
|
---|
6895 | *
|
---|
6896 | * @param v_accel_any_motion_durn_u_8 : The value of accel anymotion duration
|
---|
6897 | * v_accel_any_motion_durn_u_8 | result
|
---|
6898 | * ------------------------- | -------------
|
---|
6899 | * 0x01 | ENABLED
|
---|
6900 | * 0x00 | DISABLED
|
---|
6901 | *
|
---|
6902 | * @return results of bus communication function
|
---|
6903 | * @retval 0 -> Success
|
---|
6904 | * @retval 1 -> Error
|
---|
6905 | *
|
---|
6906 | *
|
---|
6907 | */
|
---|
6908 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_durn(
|
---|
6909 | u_8 *v_accel_any_motion_durn_u_8);
|
---|
6910 | /*!
|
---|
6911 | * @brief This API used to write the accel anymotion duration
|
---|
6912 | * from page one register from 0x12 bit 0 to 1
|
---|
6913 | *
|
---|
6914 | * @param v_accel_any_motion_durn_u_8 : The value of accel anymotion duration
|
---|
6915 | *
|
---|
6916 | * v_accel_any_motion_durn_u_8 | result
|
---|
6917 | * ------------------------- | -------------
|
---|
6918 | * 0x01 | ENABLED
|
---|
6919 | * 0x00 | DISABLED
|
---|
6920 | *
|
---|
6921 | * @return results of bus communication function
|
---|
6922 | * @retval 0 -> Success
|
---|
6923 | * @retval 1 -> Error
|
---|
6924 | *
|
---|
6925 | *
|
---|
6926 | */
|
---|
6927 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_durn(
|
---|
6928 | u_8 v_accel_any_motion_durn_u_8);
|
---|
6929 | /*****************************************************/
|
---|
6930 | /**\name FUNCTIONS FOR ACCEL ANY_MOTION AXIS ENABLE */
|
---|
6931 | /*****************************************************/
|
---|
6932 | /*!
|
---|
6933 | * @brief This API used to read the accel anymotion enable
|
---|
6934 | * from page one register from 0x12 bit 2 to 4
|
---|
6935 | *
|
---|
6936 | * @param v_data_u_8 : The value of accel anymotion enable
|
---|
6937 | * v_data_u_8 | result
|
---|
6938 | * ------------ | -------------
|
---|
6939 | * 0x01 | ENABLED
|
---|
6940 | * 0x00 | DISABLED
|
---|
6941 | * @param v_channel_u_8 : The value of accel anymotion axis selection
|
---|
6942 | * v_channel_u_8 | value
|
---|
6943 | * -------------------------- | ----------
|
---|
6944 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS | 0
|
---|
6945 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS | 1
|
---|
6946 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS | 2
|
---|
6947 | *
|
---|
6948 | * @return results of bus communication function
|
---|
6949 | * @retval 0 -> Success
|
---|
6950 | * @retval 1 -> Error
|
---|
6951 | *
|
---|
6952 | *
|
---|
6953 | */
|
---|
6954 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_no_motion_axis_enable(
|
---|
6955 | u_8 v_channel_u_8, u_8 *v_data_u_8);
|
---|
6956 | /*!
|
---|
6957 | * @brief This API used to write the accel anymotion enable
|
---|
6958 | * from page one register from 0x12 bit 2 to 4
|
---|
6959 | *
|
---|
6960 | * @param v_data_u_8 : The value of accel anymotion enable
|
---|
6961 | * v_data_u_8 | result
|
---|
6962 | * ------------ | -------------
|
---|
6963 | * 0x01 | ENABLED
|
---|
6964 | * 0x00 | DISABLED
|
---|
6965 | * @param v_channel_u_8 : The value of accel anymotion axis selection
|
---|
6966 | * v_channel_u_8 | value
|
---|
6967 | * -------------------------- | ----------
|
---|
6968 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS | 0
|
---|
6969 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS | 1
|
---|
6970 | * BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS | 2
|
---|
6971 | *
|
---|
6972 | * @return results of bus communication function
|
---|
6973 | * @retval 0 -> Success
|
---|
6974 | * @retval 1 -> Error
|
---|
6975 | *
|
---|
6976 | *
|
---|
6977 | */
|
---|
6978 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_no_motion_axis_enable(
|
---|
6979 | u_8 v_channel_u_8, u_8 v_data_u_8);
|
---|
6980 | /*****************************************************/
|
---|
6981 | /**\name FUNCTIONS FOR ACCEL HIGHG AXIS ENABLE */
|
---|
6982 | /*****************************************************/
|
---|
6983 | /*!
|
---|
6984 | * @brief This API used to read the accel highg enable
|
---|
6985 | * from page one register from 0x12 bit 5 to 7
|
---|
6986 | *
|
---|
6987 | * @param v_data_u_8 : The value of accel highg enable
|
---|
6988 | * v_data_u_8| result
|
---|
6989 | * ------------ | -------------
|
---|
6990 | * 0x01 | ENABLED
|
---|
6991 | * 0x00 | DISABLED
|
---|
6992 | * @param v_channel_u_8 : The value of accel highg axis selection
|
---|
6993 | * v_channel_u_8 | value
|
---|
6994 | * -------------------------- | ----------
|
---|
6995 | * BNO055_ACCEL_HIGH_G_X_AXIS | 0
|
---|
6996 | * BNO055_ACCEL_HIGH_G_Y_AXIS | 1
|
---|
6997 | * BNO055_ACCEL_HIGH_G_Z_AXIS | 2
|
---|
6998 | *
|
---|
6999 | * @return results of bus communication function
|
---|
7000 | * @retval 0 -> Success
|
---|
7001 | * @retval 1 -> Error
|
---|
7002 | *
|
---|
7003 | *
|
---|
7004 | */
|
---|
7005 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_axis_enable(
|
---|
7006 | u_8 v_channel_u_8, u_8 *v_data_u_8);
|
---|
7007 | /*!
|
---|
7008 | * @brief This API used to write the accel highg enable
|
---|
7009 | * from page one register from 0x12 bit 5 to 7
|
---|
7010 | *
|
---|
7011 | * @param v_data_u_8 : The value of accel highg enable
|
---|
7012 | * v_data_u_8| result
|
---|
7013 | * ------------ | -------------
|
---|
7014 | * 0x01 | ENABLED
|
---|
7015 | * 0x00 | DISABLED
|
---|
7016 | * @param v_channel_u_8 : The value of accel highg axis selection
|
---|
7017 | * v_channel_u_8 | value
|
---|
7018 | * -------------------------- | ----------
|
---|
7019 | * BNO055_ACCEL_HIGH_G_X_AXIS | 0
|
---|
7020 | * BNO055_ACCEL_HIGH_G_Y_AXIS | 1
|
---|
7021 | * BNO055_ACCEL_HIGH_G_Z_AXIS | 2
|
---|
7022 | *
|
---|
7023 | * @return results of bus communication function
|
---|
7024 | * @retval 0 -> Success
|
---|
7025 | * @retval 1 -> Error
|
---|
7026 | *
|
---|
7027 | *
|
---|
7028 | */
|
---|
7029 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_axis_enable(
|
---|
7030 | u_8 v_channel_u_8, u_8 v_data_u_8);
|
---|
7031 | /*****************************************************/
|
---|
7032 | /**\name FUNCTIONS FOR ACCEL HIGHG DURATION */
|
---|
7033 | /*****************************************************/
|
---|
7034 | /*!
|
---|
7035 | * @brief This API used to read the accel highg duration
|
---|
7036 | * from page one register from 0x13 bit 0 to 7
|
---|
7037 | *
|
---|
7038 | * @param v_accel_high_g_durn_u_8 : The value of accel highg duration
|
---|
7039 | *
|
---|
7040 | * @return results of bus communication function
|
---|
7041 | * @retval 0 -> Success
|
---|
7042 | * @retval 1 -> Error
|
---|
7043 | *
|
---|
7044 | * @note The high-g interrupt trigger delay according
|
---|
7045 | * to [highg duration + 1] * 2 ms
|
---|
7046 | *
|
---|
7047 | * in a range from 2 ms to 512 ms
|
---|
7048 | *
|
---|
7049 | */
|
---|
7050 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_durn(
|
---|
7051 | u_8 *v_accel_high_g_durn_u_8);
|
---|
7052 | /*!
|
---|
7053 | * @brief This API used to write the accel highg duration
|
---|
7054 | * from page one register from 0x13 bit 0 to 7
|
---|
7055 | *
|
---|
7056 | * @param v_accel_high_g_durn_u_8 : The value of accel highg duration
|
---|
7057 | *
|
---|
7058 | * @return results of bus communication function
|
---|
7059 | * @retval 0 -> Success
|
---|
7060 | * @retval 1 -> Error
|
---|
7061 | *
|
---|
7062 | * @note The high-g interrupt trigger delay according
|
---|
7063 | * to [highg duration + 1] * 2 ms
|
---|
7064 | *
|
---|
7065 | * in a range from 2 ms to 512 ms
|
---|
7066 | *
|
---|
7067 | */
|
---|
7068 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_durn(
|
---|
7069 | u_8 v_accel_high_g_durn_u_8);
|
---|
7070 | /*****************************************************/
|
---|
7071 | /**\name FUNCTIONS FOR ACCEL HIGHG THRESHOLD */
|
---|
7072 | /*****************************************************/
|
---|
7073 | /*!
|
---|
7074 | * @brief This API used to read the accel highg threshold
|
---|
7075 | * from page one register from 0x14 bit 0 to 7
|
---|
7076 | *
|
---|
7077 | * @param v_accel_high_g_thres_u_8 : The value of accel highg threshold
|
---|
7078 | *
|
---|
7079 | * @return results of bus communication function
|
---|
7080 | * @retval 0 -> Success
|
---|
7081 | * @retval 1 -> Error
|
---|
7082 | *
|
---|
7083 | * @note Accel highg interrupt threshold dependent
|
---|
7084 | * for accel g range
|
---|
7085 | *
|
---|
7086 | * v_accel_range_u_8 | threshold | LSB
|
---|
7087 | * ------------- | ------------- | ---------
|
---|
7088 | * 2g | 7.81mg | 1LSB
|
---|
7089 | * 4g | 15.63mg | 1LSB
|
---|
7090 | * 8g | 31.25mg | 1LSB
|
---|
7091 | * 16g | 62.5mg | 1LSB
|
---|
7092 | *
|
---|
7093 | */
|
---|
7094 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_thres(
|
---|
7095 | u_8 *v_accel_high_g_thres_u_8);
|
---|
7096 | /*!
|
---|
7097 | * @brief This API used to write the accel highg threshold
|
---|
7098 | * from page one register from 0x14 bit 0 to 7
|
---|
7099 | *
|
---|
7100 | * @param v_accel_high_g_thres_u_8 : The value of accel highg threshold
|
---|
7101 | *
|
---|
7102 | * @return results of bus communication function
|
---|
7103 | * @retval 0 -> Success
|
---|
7104 | * @retval 1 -> Error
|
---|
7105 | *
|
---|
7106 | * @note Accel highg interrupt threshold dependent
|
---|
7107 | * for accel g range
|
---|
7108 | *
|
---|
7109 | * v_accel_range_u_8 | threshold | LSB
|
---|
7110 | * ------------- | ------------- | ---------
|
---|
7111 | * 2g | 7.81mg | 1LSB
|
---|
7112 | * 4g | 15.63mg | 1LSB
|
---|
7113 | * 8g | 31.25mg | 1LSB
|
---|
7114 | * 16g | 62.5mg | 1LSB
|
---|
7115 | *
|
---|
7116 | */
|
---|
7117 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_thres(
|
---|
7118 | u_8 v_accel_high_g_thres_u_8);
|
---|
7119 | /**************************************************************/
|
---|
7120 | /**\name FUNCTIONS FOR ACCEL SLOWNOMOTION THRESHOLD */
|
---|
7121 | /**************************************************************/
|
---|
7122 | /*!
|
---|
7123 | * @brief This API used to read the accel slownomotion threshold
|
---|
7124 | * from page one register from 0x15 bit 0 to 7
|
---|
7125 | *
|
---|
7126 | * @param v_accel_slow_no_motion_thres_u_8 :
|
---|
7127 | * The value of accel slownomotion threshold
|
---|
7128 | *
|
---|
7129 | * @return results of bus communication function
|
---|
7130 | * @retval 0 -> Success
|
---|
7131 | * @retval 1 -> Error
|
---|
7132 | *
|
---|
7133 | * @note Accel slow no motion interrupt threshold dependent
|
---|
7134 | * for accel g range
|
---|
7135 | *
|
---|
7136 | * v_accel_range_u_8 | threshold | LSB
|
---|
7137 | * ------------- | ------------- | ---------
|
---|
7138 | * 2g | 3.19mg | 1LSB
|
---|
7139 | * 4g | 7.81mg | 1LSB
|
---|
7140 | * 8g | 15.63mg | 1LSB
|
---|
7141 | * 16g | 31.25mg | 1LSB
|
---|
7142 | */
|
---|
7143 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_thres(
|
---|
7144 | u_8 *v_accel_slow_no_motion_thres_u_8);
|
---|
7145 | /*!
|
---|
7146 | * @brief This API used to write the accel slownomotion threshold
|
---|
7147 | * from page one register from 0x15 bit 0 to 7
|
---|
7148 | *
|
---|
7149 | * @param v_accel_slow_no_motion_thres_u_8 :
|
---|
7150 | * The value of accel slownomotion threshold
|
---|
7151 | *
|
---|
7152 | * @return results of bus communication function
|
---|
7153 | * @retval 0 -> Success
|
---|
7154 | * @retval 1 -> Error
|
---|
7155 | *
|
---|
7156 | * @note Accel slow no motion interrupt threshold dependent
|
---|
7157 | * for accel g range
|
---|
7158 | *
|
---|
7159 | * v_accel_range_u_8 | threshold | LSB
|
---|
7160 | * ------------- | ------------- | ---------
|
---|
7161 | * 2g | 3.19mg | 1LSB
|
---|
7162 | * 4g | 7.81mg | 1LSB
|
---|
7163 | * 8g | 15.63mg | 1LSB
|
---|
7164 | * 16g | 31.25mg | 1LSB
|
---|
7165 | */
|
---|
7166 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_thres(
|
---|
7167 | u_8 v_accel_slow_no_motion_thres_u_8);
|
---|
7168 | /**************************************************************/
|
---|
7169 | /**\name FUNCTIONS FOR ACCEL SLOWNOMOTION ENABLE */
|
---|
7170 | /**************************************************************/
|
---|
7171 | /*!
|
---|
7172 | * @brief This API used to read accel slownomotion enable
|
---|
7173 | * from page one register from 0x16 bit 0
|
---|
7174 | *
|
---|
7175 | * @param v_accel_slow_no_motion_en_u_8 : The value of accel slownomotion enable
|
---|
7176 | * v_accel_slow_no_motion_en_u_8 | result
|
---|
7177 | * ------------------------ | --------
|
---|
7178 | * 0x01 | Slow motion
|
---|
7179 | * 0x00 | No motion
|
---|
7180 | *
|
---|
7181 | * @return results of bus communication function
|
---|
7182 | * @retval 0 -> Success
|
---|
7183 | * @retval 1 -> Error
|
---|
7184 | *
|
---|
7185 | */
|
---|
7186 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_enable(
|
---|
7187 | u_8 *v_accel_slow_no_motion_en_u_8);
|
---|
7188 | /*!
|
---|
7189 | * @brief This API used to write accel slownomotion enable
|
---|
7190 | * from page one register from 0x16 bit 0
|
---|
7191 | *
|
---|
7192 | * @param v_accel_slow_no_motion_en_u_8 : The value of accel slownomotion enable
|
---|
7193 | * v_accel_slow_no_motion_en_u_8 | result
|
---|
7194 | * ------------------------ | --------
|
---|
7195 | * 0x01 | Slow motion
|
---|
7196 | * 0x00 | No motion
|
---|
7197 | *
|
---|
7198 | * @return results of bus communication function
|
---|
7199 | * @retval 0 -> Success
|
---|
7200 | * @retval 1 -> Error
|
---|
7201 | *
|
---|
7202 | */
|
---|
7203 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_enable(
|
---|
7204 | u_8 v_accel_slow_no_motion_en_u_8);
|
---|
7205 | /**************************************************************/
|
---|
7206 | /**\name FUNCTIONS FOR ACCEL SLOWNOMOTION DURATION */
|
---|
7207 | /**************************************************************/
|
---|
7208 | /*!
|
---|
7209 | * @brief This API used to read accel slownomotion duration
|
---|
7210 | * from page one register from 0x16 bit 1 to 6
|
---|
7211 | *
|
---|
7212 | * @param v_accel_slow_no_motion_durn_u_8 :
|
---|
7213 | * The value of accel slownomotion duration
|
---|
7214 | *
|
---|
7215 | * @return results of bus communication function
|
---|
7216 | * @retval 0 -> Success
|
---|
7217 | * @retval 1 -> Error
|
---|
7218 | *
|
---|
7219 | */
|
---|
7220 | BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_durn(
|
---|
7221 | u_8 *v_accel_slow_no_motion_durn_u_8);
|
---|
7222 | /*!
|
---|
7223 | * @brief This API used to write accel slownomotion duration
|
---|
7224 | * from page one register from 0x16 bit 1 to 6
|
---|
7225 | *
|
---|
7226 | * @param v_accel_slow_no_motion_durn_u_8 :
|
---|
7227 | * The value of accel slownomotion duration
|
---|
7228 | *
|
---|
7229 | * @return results of bus communication function
|
---|
7230 | * @retval 0 -> Success
|
---|
7231 | * @retval 1 -> Error
|
---|
7232 | *
|
---|
7233 | */
|
---|
7234 | BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_durn(
|
---|
7235 | u_8 v_accel_slow_no_motion_durn_u_8);
|
---|
7236 | /**************************************************************/
|
---|
7237 | /**\name FUNCTIONS FOR GYRO ANY_MOTION AXIS ENABLE */
|
---|
7238 | /**************************************************************/
|
---|
7239 | /*!
|
---|
7240 | * @brief This API used to read the gyro anymotion enable
|
---|
7241 | * from page one register from 0x17 bit 0 to 2
|
---|
7242 | *
|
---|
7243 | * @param v_data_u_8 : The value of gyro anymotion enable
|
---|
7244 | * v_data_u_8 | result
|
---|
7245 | * ----------------- |-------------
|
---|
7246 | * 0x01 | ENABLED
|
---|
7247 | * 0x00 | DISABLED
|
---|
7248 | * @param v_channel_u_8 : The value of gyro anymotion axis selection
|
---|
7249 | * v_channel_u_8 | value
|
---|
7250 | * --------------------------- | ----------
|
---|
7251 | * BNO055_GYRO_ANY_MOTIONX_AXIS | 0
|
---|
7252 | * BNO055_GYRO_ANY_MOTIONY_AXIS | 1
|
---|
7253 | * BNO055_GYRO_ANY_MOTIONZ_AXIS | 2
|
---|
7254 | *
|
---|
7255 | *
|
---|
7256 | * @return results of bus communication function
|
---|
7257 | * @retval 0 -> Success
|
---|
7258 | * @retval 1 -> Error
|
---|
7259 | *
|
---|
7260 | *
|
---|
7261 | */
|
---|
7262 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_axis_enable(
|
---|
7263 | u_8 v_channel_u_8, u_8 *v_data_u_8);
|
---|
7264 | /*!
|
---|
7265 | * @brief This API used to write the gyro anymotion enable
|
---|
7266 | * from page one register from 0x17 bit 0 to 2
|
---|
7267 | *
|
---|
7268 | * @param v_data_u_8 : The value of gyro anymotion enable
|
---|
7269 | * v_data_u_8 | result
|
---|
7270 | * ----------------- |-------------
|
---|
7271 | * 0x01 | ENABLED
|
---|
7272 | * 0x00 | DISABLED
|
---|
7273 | * @param v_channel_u_8 : The value of gyro anymotion axis selection
|
---|
7274 | * v_channel_u_8 | value
|
---|
7275 | * --------------------------- | ----------
|
---|
7276 | * BNO055_GYRO_ANY_MOTIONX_AXIS | 0
|
---|
7277 | * BNO055_GYRO_ANY_MOTIONY_AXIS | 1
|
---|
7278 | * BNO055_GYRO_ANY_MOTIONZ_AXIS | 2
|
---|
7279 | *
|
---|
7280 | * @return results of bus communication function
|
---|
7281 | * @retval 0 -> Success
|
---|
7282 | * @retval 1 -> Error
|
---|
7283 | *
|
---|
7284 | *
|
---|
7285 | */
|
---|
7286 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_axis_enable(
|
---|
7287 | u_8 v_channel_u_8, u_8 v_data_u_8);
|
---|
7288 | /**************************************************************/
|
---|
7289 | /**\name FUNCTIONS FOR GYRO HIGHRATE ENABLE */
|
---|
7290 | /**************************************************************/
|
---|
7291 | /*!
|
---|
7292 | * @brief This API used to read the gyro highrate enable
|
---|
7293 | * from page one register from 0x17 bit 3 to 5
|
---|
7294 | *
|
---|
7295 | * @param v_data_u_8 : The value of gyro highrate enable
|
---|
7296 | * v_data_u_8 | result
|
---|
7297 | * ---------------- |-------------
|
---|
7298 | * 0x01 | ENABLED
|
---|
7299 | * 0x00 | DISABLED
|
---|
7300 | * @param v_channel_u_8 : The value of gyro highrate axis selection
|
---|
7301 | * v_channel_u_8 | value
|
---|
7302 | * ------------------------ | ----------
|
---|
7303 | * BNO055_GYRO_HIGHRATE_X_AXIS | 0
|
---|
7304 | * BNO055_GYRO_HIGHRATE_Y_AXIS | 1
|
---|
7305 | * BNO055_GYRO_HIGHRATE_Z_AXIS | 2
|
---|
7306 | *
|
---|
7307 | *
|
---|
7308 | * @return results of bus communication function
|
---|
7309 | * @retval 0 -> Success
|
---|
7310 | * @retval 1 -> Error
|
---|
7311 | *
|
---|
7312 | *
|
---|
7313 | */
|
---|
7314 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_axis_enable(
|
---|
7315 | u_8 v_channel_u_8, u_8 *v_data_u_8);
|
---|
7316 | /**************************************************************/
|
---|
7317 | /**\name FUNCTIONS FOR GYRO HIGHRATE AXIS ENABLE */
|
---|
7318 | /**************************************************************/
|
---|
7319 | /*!
|
---|
7320 | * @brief This API used to write the gyro highrate enable
|
---|
7321 | * from page one register from 0x17 bit 3 to 5
|
---|
7322 | *
|
---|
7323 | * @param v_data_u_8 : The value of gyro highrate enable
|
---|
7324 | * v_data_u_8 | result
|
---|
7325 | * ---------------- |-------------
|
---|
7326 | * 0x01 | ENABLED
|
---|
7327 | * 0x00 | DISABLED
|
---|
7328 | * @param v_channel_u_8 : The value of gyro highrate axis selection
|
---|
7329 | * v_channel_u_8 | value
|
---|
7330 | * ------------------------ | ----------
|
---|
7331 | * BNO055_GYRO_HIGHRATE_X_AXIS | 0
|
---|
7332 | * BNO055_GYRO_HIGHRATE_Y_AXIS | 1
|
---|
7333 | * BNO055_GYRO_HIGHRATE_Z_AXIS | 2
|
---|
7334 | *
|
---|
7335 | * @return results of bus communication function
|
---|
7336 | * @retval 0 -> Success
|
---|
7337 | * @retval 1 -> Error
|
---|
7338 | *
|
---|
7339 | *
|
---|
7340 | */
|
---|
7341 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_axis_enable(
|
---|
7342 | u_8 v_channel_u_8, u_8 v_data_u_8);
|
---|
7343 | /**************************************************************/
|
---|
7344 | /**\name FUNCTIONS FOR GYRO ANY_MOTION FILTER */
|
---|
7345 | /**************************************************************/
|
---|
7346 | /*!
|
---|
7347 | * @brief This API used to read gyro anymotion filter
|
---|
7348 | * from page one register from 0x17 bit 6
|
---|
7349 | *
|
---|
7350 | * @param v_gyro_any_motion_filter_u_8 : The value of gyro anymotion filter
|
---|
7351 | * v_gyro_any_motion_filter_u_8 | result
|
---|
7352 | * --------------------------- |------------
|
---|
7353 | * 0x00 | FILTERED
|
---|
7354 | * 0x01 | UNFILTERED
|
---|
7355 | *
|
---|
7356 | * @return results of bus communication function
|
---|
7357 | * @retval 0 -> Success
|
---|
7358 | * @retval 1 -> Error
|
---|
7359 | *
|
---|
7360 | */
|
---|
7361 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_filter(
|
---|
7362 | u_8 *v_gyro_any_motion_filter_u_8);
|
---|
7363 | /*!
|
---|
7364 | * @brief This API used to write gyro anymotion filter
|
---|
7365 | * from page one register from 0x17 bit 6
|
---|
7366 | *
|
---|
7367 | * @param v_gyro_any_motion_filter_u_8 : The value of gyro anymotion filter
|
---|
7368 | * v_gyro_any_motion_filter_u_8 | result
|
---|
7369 | * --------------------------- |------------
|
---|
7370 | * 0x00 | FILTERED
|
---|
7371 | * 0x01 | UNFILTERED
|
---|
7372 | *
|
---|
7373 | * @return results of bus communication function
|
---|
7374 | * @retval 0 -> Success
|
---|
7375 | * @retval 1 -> Error
|
---|
7376 | *
|
---|
7377 | */
|
---|
7378 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_filter(
|
---|
7379 | u_8 v_gyro_any_motion_filter_u_8);
|
---|
7380 | /**************************************************************/
|
---|
7381 | /**\name FUNCTIONS FOR GYRO HIGHRATE FILTER */
|
---|
7382 | /**************************************************************/
|
---|
7383 | /*!
|
---|
7384 | * @brief This API used to read gyro highrate filter
|
---|
7385 | * from page one register from 0x17 bit 7
|
---|
7386 | *
|
---|
7387 | * @param v_gyro_highrate_filter_u_8 : The value of gyro highrate filter
|
---|
7388 | * v_gyro_highrate_filter_u_8 | result
|
---|
7389 | * --------------------------- |------------
|
---|
7390 | * 0x00 | FILTERED
|
---|
7391 | * 0x01 | UNFILTERED
|
---|
7392 | *
|
---|
7393 | * @return results of bus communication function
|
---|
7394 | * @retval 0 -> Success
|
---|
7395 | * @retval 1 -> Error
|
---|
7396 | *
|
---|
7397 | */
|
---|
7398 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_filter(
|
---|
7399 | u_8 *v_gyro_highrate_filter_u_8);
|
---|
7400 | /*!
|
---|
7401 | * @brief This API used to write gyro highrate filter
|
---|
7402 | * from page one register from 0x17 bit 7
|
---|
7403 | *
|
---|
7404 | * @param v_gyro_highrate_filter_u_8 : The value of gyro highrate filter
|
---|
7405 | * v_gyro_highrate_filter_u_8 | result
|
---|
7406 | * --------------------------- |------------
|
---|
7407 | * 0x00 | FILTERED
|
---|
7408 | * 0x01 | UNFILTERED
|
---|
7409 | *
|
---|
7410 | * @return results of bus communication function
|
---|
7411 | * @retval 0 -> Success
|
---|
7412 | * @retval 1 -> Error
|
---|
7413 | *
|
---|
7414 | */
|
---|
7415 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_filter(
|
---|
7416 | u_8 v_gyro_highrate_filter_u_8);
|
---|
7417 | /**************************************************************/
|
---|
7418 | /**\name FUNCTIONS FOR GYRO HIGHRATE X THRESHOLD */
|
---|
7419 | /**************************************************************/
|
---|
7420 | /*!
|
---|
7421 | * @brief This API used to read gyro highrate x threshold
|
---|
7422 | * from page one register from 0x18 bit 0 to 4
|
---|
7423 | *
|
---|
7424 | * @param v_gyro_highrate_x_thres_u_8 : The value of gyro x highrate threshold
|
---|
7425 | *
|
---|
7426 | * @return results of bus communication function
|
---|
7427 | * @retval 0 -> Success
|
---|
7428 | * @retval 1 -> Error
|
---|
7429 | *
|
---|
7430 | * @note Gyro highrate threshold dependent on the
|
---|
7431 | * selection of gyro range
|
---|
7432 | *
|
---|
7433 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7434 | * ----------------- | ------------- | ---------
|
---|
7435 | * 2000 | 62.5dps | 1LSB
|
---|
7436 | * 1000 | 31.25dps | 1LSB
|
---|
7437 | * 500 | 15.625dps | 1LSB
|
---|
7438 | * 125 | 7.8125dps | 1LSB
|
---|
7439 | *
|
---|
7440 | */
|
---|
7441 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_thres(
|
---|
7442 | u_8 *v_gyro_highrate_x_thres_u_8);
|
---|
7443 | /*!
|
---|
7444 | * @brief This API used to write gyro highrate x threshold
|
---|
7445 | * from page one register from 0x18 bit 0 to 4
|
---|
7446 | *
|
---|
7447 | * @param v_gyro_highrate_x_thres_u_8 : The value of gyro x highrate threshold
|
---|
7448 | *
|
---|
7449 | * @return results of bus communication function
|
---|
7450 | * @retval 0 -> Success
|
---|
7451 | * @retval 1 -> Error
|
---|
7452 | *
|
---|
7453 | * @note Gyro highrate threshold dependent on the
|
---|
7454 | * selection of gyro range
|
---|
7455 | *
|
---|
7456 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7457 | * ----------------- | ------------- | ---------
|
---|
7458 | * 2000 | 62.5dps | 1LSB
|
---|
7459 | * 1000 | 31.25dps | 1LSB
|
---|
7460 | * 500 | 15.625dps | 1LSB
|
---|
7461 | * 125 | 7.8125dps | 1LSB
|
---|
7462 | *
|
---|
7463 | */
|
---|
7464 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_thres(
|
---|
7465 | u_8 v_gyro_highrate_x_thres_u_8);
|
---|
7466 | /**************************************************************/
|
---|
7467 | /**\name FUNCTIONS FOR GYRO HIGHRATE X HYSTERESIS */
|
---|
7468 | /**************************************************************/
|
---|
7469 | /*!
|
---|
7470 | * @brief This API used to read gyro highrate x hysteresis
|
---|
7471 | * from page one register from 0x18 bit 5 to 6
|
---|
7472 | *
|
---|
7473 | * @param v_gyro_highrate_x_hyst_u_8 : The value of gyro highrate x hysteresis
|
---|
7474 | *
|
---|
7475 | * @return results of bus communication function
|
---|
7476 | * @retval 0 -> Success
|
---|
7477 | * @retval 1 -> Error
|
---|
7478 | *
|
---|
7479 | * @note Gyro high rate hysteresis calculated by
|
---|
7480 | *
|
---|
7481 | * using this (255 + 256 * v_gyro_highrate_x_hyst_u_8) *4 LSB
|
---|
7482 | *
|
---|
7483 | * The high rate value scales with the range setting
|
---|
7484 | *
|
---|
7485 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7486 | * ----------------- | ------------- | ---------
|
---|
7487 | * 2000 | 62.26dps | 1LSB
|
---|
7488 | * 1000 | 31.13dps | 1LSB
|
---|
7489 | * 500 | 15.56dps | 1LSB
|
---|
7490 | *
|
---|
7491 | */
|
---|
7492 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_hyst(
|
---|
7493 | u_8 *v_gyro_highrate_x_hyst_u_8);
|
---|
7494 | /*!
|
---|
7495 | * @brief This API used to write gyro highrate x hysteresis
|
---|
7496 | * from page one register from 0x18 bit 5 to 6
|
---|
7497 | *
|
---|
7498 | * @param v_gyro_highrate_x_hyst_u_8 : The value of gyro highrate x hysteresis
|
---|
7499 | *
|
---|
7500 | * @return results of bus communication function
|
---|
7501 | * @retval 0 -> Success
|
---|
7502 | * @retval 1 -> Error
|
---|
7503 | *
|
---|
7504 | * @note Gyro high rate hysteresis calculated by
|
---|
7505 | *
|
---|
7506 | * using this (255 + 256 * v_gyro_highrate_x_hyst_u_8) *4 LSB
|
---|
7507 | *
|
---|
7508 | * The high rate value scales with the range setting
|
---|
7509 | *
|
---|
7510 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7511 | * ----------------- | ------------- | ---------
|
---|
7512 | * 2000 | 62.26dps | 1LSB
|
---|
7513 | * 1000 | 31.13dps | 1LSB
|
---|
7514 | * 500 | 15.56dps | 1LSB
|
---|
7515 | *
|
---|
7516 | */
|
---|
7517 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_hyst(
|
---|
7518 | u_8 v_gyro_highrate_x_hyst_u_8);
|
---|
7519 | /**************************************************************/
|
---|
7520 | /**\name FUNCTIONS FOR GYRO HIGHRATE X DURATION */
|
---|
7521 | /**************************************************************/
|
---|
7522 | /*!
|
---|
7523 | * @brief This API used to read gyro highrate x duration
|
---|
7524 | * from page one register from 0x19 bit 0 to 7
|
---|
7525 | *
|
---|
7526 | * @param v_gyro_highrate_x_durn_u_8 : The value of gyro highrate x duration
|
---|
7527 | *
|
---|
7528 | * @return results of bus communication function
|
---|
7529 | * @retval 0 -> Success
|
---|
7530 | * @retval 1 -> Error
|
---|
7531 | *
|
---|
7532 | * @note Gyro highrate duration calculate by using the formula
|
---|
7533 | *
|
---|
7534 | * (1 + v_gyro_highrate_x_durn_u_8)*2.5ms
|
---|
7535 | *
|
---|
7536 | */
|
---|
7537 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_durn(
|
---|
7538 | u_8 *v_gyro_highrate_x_durn_u_8);
|
---|
7539 | /*!
|
---|
7540 | * @brief This API used to write gyro highrate x duration
|
---|
7541 | * from page one register from 0x19 bit 0 to 7
|
---|
7542 | *
|
---|
7543 | * @param v_gyro_highrate_x_durn_u_8 : The value of gyro highrate x duration
|
---|
7544 | *
|
---|
7545 | * @return results of bus communication function
|
---|
7546 | * @retval 0 -> Success
|
---|
7547 | * @retval 1 -> Error
|
---|
7548 | *
|
---|
7549 | * @note Gyro highrate duration calculate by using the formula
|
---|
7550 | *
|
---|
7551 | * (1 + v_gyro_highrate_x_durn_u_8)*2.5ms
|
---|
7552 | */
|
---|
7553 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_durn(
|
---|
7554 | u_8 v_gyro_highrate_x_durn_u_8);
|
---|
7555 | /**************************************************************/
|
---|
7556 | /**\name FUNCTIONS FOR GYRO HIGHRATE Y THRESHOLD */
|
---|
7557 | /**************************************************************/
|
---|
7558 | /*!
|
---|
7559 | * @brief This API used to read gyro highrate y threshold
|
---|
7560 | * from page one register from 0x1A bit 0 to 4
|
---|
7561 | *
|
---|
7562 | * @param v_gyro_highrate_y_thres_u_8 : The value of gyro highrate y threshold
|
---|
7563 | *
|
---|
7564 | * @return results of bus communication function
|
---|
7565 | * @retval 0 -> Success
|
---|
7566 | * @retval 1 -> Error
|
---|
7567 | *
|
---|
7568 | * @note Gyro highrate threshold dependent on the
|
---|
7569 | * selection of gyro range
|
---|
7570 | *
|
---|
7571 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7572 | * ----------------- | ------------- | ---------
|
---|
7573 | * 2000 | 62.5dps | 1LSB
|
---|
7574 | * 1000 | 31.25dps | 1LSB
|
---|
7575 | * 500 | 15.625dps | 1LSB
|
---|
7576 | * 125 | 7.8125dps | 1LSB
|
---|
7577 | *
|
---|
7578 | */
|
---|
7579 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_thres(
|
---|
7580 | u_8 *v_gyro_highrate_y_thres_u_8);
|
---|
7581 | /*!
|
---|
7582 | * @brief This API used to write gyro highrate y threshold
|
---|
7583 | * from page one register from 0x1A bit 0 to 4
|
---|
7584 | *
|
---|
7585 | * @param v_gyro_highrate_y_thres_u_8 : The value of gyro highrate y threshold
|
---|
7586 | *
|
---|
7587 | * @return results of bus communication function
|
---|
7588 | * @retval 0 -> Success
|
---|
7589 | * @retval 1 -> Error
|
---|
7590 | *
|
---|
7591 | * @note Gyro highrate threshold dependent on the
|
---|
7592 | * selection of gyro range
|
---|
7593 | *
|
---|
7594 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7595 | * ----------------- | ------------- | ---------
|
---|
7596 | * 2000 | 62.5dps | 1LSB
|
---|
7597 | * 1000 | 31.25dps | 1LSB
|
---|
7598 | * 500 | 15.625dps | 1LSB
|
---|
7599 | * 125 | 7.8125dps | 1LSB
|
---|
7600 | *
|
---|
7601 | */
|
---|
7602 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_thres(
|
---|
7603 | u_8 v_gyro_highrate_y_thres_u_8);
|
---|
7604 | /**************************************************************/
|
---|
7605 | /**\name FUNCTIONS FOR GYRO HIGHRATE Y HYSTERESIS */
|
---|
7606 | /**************************************************************/
|
---|
7607 | /*!
|
---|
7608 | * @brief This API used to read gyro highrate y hysteresis
|
---|
7609 | * from page one register from 0x1A bit 5 to 6
|
---|
7610 | *
|
---|
7611 | * @param v_gyro_highrate_y_hyst_u_8 : The value of gyro highrate y hysteresis
|
---|
7612 | *
|
---|
7613 | * @return results of bus communication function
|
---|
7614 | * @retval 0 -> Success
|
---|
7615 | * @retval 1 -> Error
|
---|
7616 | *
|
---|
7617 | * @note Gyro high rate hysteresis calculated by
|
---|
7618 | *
|
---|
7619 | * using this (255 + 256 * v_gyro_highrate_y_hyst_u_8) *4 LSB
|
---|
7620 | *
|
---|
7621 | * The high rate value scales with the range setting
|
---|
7622 | *
|
---|
7623 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7624 | * ----------------- | ------------- | ---------
|
---|
7625 | * 2000 | 62.26dps | 1LSB
|
---|
7626 | * 1000 | 31.13dps | 1LSB
|
---|
7627 | * 500 | 15.56dps | 1LSB
|
---|
7628 | */
|
---|
7629 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_hyst(
|
---|
7630 | u_8 *v_gyro_highrate_y_hyst_u_8);
|
---|
7631 | /*!
|
---|
7632 | * @brief This API used to write gyro highrate y hysteresis
|
---|
7633 | * from page one register from 0x1A bit 5 to 6
|
---|
7634 | *
|
---|
7635 | * @param v_gyro_highrate_y_hyst_u_8 : The value of gyro highrate y hysteresis
|
---|
7636 | *
|
---|
7637 | * @return results of bus communication function
|
---|
7638 | * @retval 0 -> Success
|
---|
7639 | * @retval 1 -> Error
|
---|
7640 | *
|
---|
7641 | * @note Gyro high rate hysteresis calculated by
|
---|
7642 | *
|
---|
7643 | * using this (255 + 256 * v_gyro_highrate_y_hyst_u_8) *4 LSB
|
---|
7644 | *
|
---|
7645 | * The high rate value scales with the range setting
|
---|
7646 | *
|
---|
7647 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7648 | * ----------------- | ------------- | ---------
|
---|
7649 | * 2000 | 62.26dps | 1LSB
|
---|
7650 | * 1000 | 31.13dps | 1LSB
|
---|
7651 | * 500 | 15.56dps | 1LSB
|
---|
7652 | */
|
---|
7653 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_hyst(
|
---|
7654 | u_8 v_gyro_highrate_y_hyst_u_8);
|
---|
7655 | /**************************************************************/
|
---|
7656 | /**\name FUNCTIONS FOR GYRO HIGHRATE Y DURATION */
|
---|
7657 | /**************************************************************/
|
---|
7658 | /*!
|
---|
7659 | * @brief This API used to read gyro highrate y duration
|
---|
7660 | * from page one register from 0x1B bit 0 to 7
|
---|
7661 | *
|
---|
7662 | * @param v_gyro_highrate_y_durn_u_8 : The value of gyro highrate y duration
|
---|
7663 | *
|
---|
7664 | * @return results of bus communication function
|
---|
7665 | * @retval 0 -> Success
|
---|
7666 | * @retval 1 -> Error
|
---|
7667 | *
|
---|
7668 | * @note Gyro highrate duration calculate by using the formula
|
---|
7669 | *
|
---|
7670 | * (1 + v_gyro_highrate_y_durn_u_8)*2.5ms
|
---|
7671 | */
|
---|
7672 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_durn(
|
---|
7673 | u_8 *v_gyro_highrate_y_durn_u_8);
|
---|
7674 | /*!
|
---|
7675 | * @brief This API used to write gyro highrate y duration
|
---|
7676 | * from page one register from 0x1B bit 0 to 7
|
---|
7677 | *
|
---|
7678 | * @param v_gyro_highrate_y_durn_u_8 : The value of gyro highrate y duration
|
---|
7679 | *
|
---|
7680 | * @return results of bus communication function
|
---|
7681 | * @retval 0 -> Success
|
---|
7682 | * @retval 1 -> Error
|
---|
7683 | *
|
---|
7684 | * @note Gyro highrate duration calculate by using the formula
|
---|
7685 | *
|
---|
7686 | * (1 + v_gyro_highrate_y_durn_u_8)*2.5ms
|
---|
7687 | */
|
---|
7688 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_durn(
|
---|
7689 | u_8 v_gyro_highrate_y_durn_u_8);
|
---|
7690 | /**************************************************************/
|
---|
7691 | /**\name FUNCTIONS FOR GYRO HIGHRATE Z THRESHOLD */
|
---|
7692 | /**************************************************************/
|
---|
7693 | /*!
|
---|
7694 | * @brief This API used to read gyro highrate z threshold
|
---|
7695 | * from page one register from 0x1C bit 0 to 4
|
---|
7696 | *
|
---|
7697 | * @param v_gyro_highrate_z_thres_u_8 : The value of gyro highrate z threshold
|
---|
7698 | *
|
---|
7699 | * @return results of bus communication function
|
---|
7700 | * @retval 0 -> Success
|
---|
7701 | * @retval 1 -> Error
|
---|
7702 | *
|
---|
7703 | * @note Gyro highrate threshold dependent on the
|
---|
7704 | * selection of gyro range
|
---|
7705 | *
|
---|
7706 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7707 | * ----------------- | ------------- | ---------
|
---|
7708 | * 2000 | 62.5dps | 1LSB
|
---|
7709 | * 1000 | 31.25dps | 1LSB
|
---|
7710 | * 500 | 15.625dps | 1LSB
|
---|
7711 | * 125 | 7.8125dps | 1LSB
|
---|
7712 | *
|
---|
7713 | */
|
---|
7714 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_thres(
|
---|
7715 | u_8 *v_gyro_highrate_z_thres_u_8);
|
---|
7716 | /*!
|
---|
7717 | * @brief This API used to write gyro highrate z threshold
|
---|
7718 | * from page one register from 0x1C bit 0 to 4
|
---|
7719 | *
|
---|
7720 | * @param v_gyro_highrate_z_thres_u_8 : The value of gyro highrate z threshold
|
---|
7721 | *
|
---|
7722 | * @return results of bus communication function
|
---|
7723 | * @retval 0 -> Success
|
---|
7724 | * @retval 1 -> Error
|
---|
7725 | *
|
---|
7726 | * @note Gyro highrate threshold dependent on the
|
---|
7727 | * selection of gyro range
|
---|
7728 | *
|
---|
7729 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7730 | * ----------------- | ------------- | ---------
|
---|
7731 | * 2000 | 62.5dps | 1LSB
|
---|
7732 | * 1000 | 31.25dps | 1LSB
|
---|
7733 | * 500 | 15.625dps | 1LSB
|
---|
7734 | * 125 | 7.8125dps | 1LSB
|
---|
7735 | *
|
---|
7736 | */
|
---|
7737 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_thres(
|
---|
7738 | u_8 v_gyro_highrate_z_thres_u_8);
|
---|
7739 | /**************************************************************/
|
---|
7740 | /**\name FUNCTIONS FOR GYRO HIGHRATE Z HYSTERESIS */
|
---|
7741 | /**************************************************************/
|
---|
7742 | /*!
|
---|
7743 | * @brief This API used to read gyro highrate z hysteresis
|
---|
7744 | * from page one register from 0x1C bit 5 to 6
|
---|
7745 | *
|
---|
7746 | * @param v_gyro_highrate_z_hyst_u_8 : The value of gyro highrate z hysteresis
|
---|
7747 | *
|
---|
7748 | * @return results of bus communication function
|
---|
7749 | * @retval 0 -> Success
|
---|
7750 | * @retval 1 -> Error
|
---|
7751 | *
|
---|
7752 | * @note Gyro high rate hysteresis calculated by
|
---|
7753 | *
|
---|
7754 | * using this (255 + 256 * v_gyro_highrate_z_hyst_u_8) *4 LSB
|
---|
7755 | *
|
---|
7756 | * The high rate value scales with the range setting
|
---|
7757 | *
|
---|
7758 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7759 | * ----------------- | ------------- | ---------
|
---|
7760 | * 2000 | 62.26dps | 1LSB
|
---|
7761 | * 1000 | 31.13dps | 1LSB
|
---|
7762 | * 500 | 15.56dps | 1LSB
|
---|
7763 | */
|
---|
7764 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_hyst(
|
---|
7765 | u_8 *v_gyro_highrate_z_hyst_u_8);
|
---|
7766 | /*!
|
---|
7767 | * @brief This API used to write gyro highrate z hysteresis
|
---|
7768 | * from page one register from 0x1C bit 5 to 6
|
---|
7769 | *
|
---|
7770 | * @param v_gyro_highrate_z_hyst_u_8 : The value of gyro highrate z hysteresis
|
---|
7771 | *
|
---|
7772 | * @return results of bus communication function
|
---|
7773 | * @retval 0 -> Success
|
---|
7774 | * @retval 1 -> Error
|
---|
7775 | *
|
---|
7776 | * @note Gyro high rate hysteresis calculated by
|
---|
7777 | *
|
---|
7778 | * using this (255 + 256 * v_gyro_highrate_z_hyst_u_8) *4 LSB
|
---|
7779 | *
|
---|
7780 | * The high rate value scales with the range setting
|
---|
7781 | *
|
---|
7782 | * v_gyro_range_u_8 | hysteresis | LSB
|
---|
7783 | * ----------------- | ------------- | ---------
|
---|
7784 | * 2000 | 62.26dps | 1LSB
|
---|
7785 | * 1000 | 31.13dps | 1LSB
|
---|
7786 | * 500 | 15.56dps | 1LSB
|
---|
7787 | */
|
---|
7788 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_hyst(
|
---|
7789 | u_8 v_gyro_highrate_z_hyst_u_8);
|
---|
7790 | /**************************************************************/
|
---|
7791 | /**\name FUNCTIONS FOR GYRO HIGHRATE Z DURATION */
|
---|
7792 | /**************************************************************/
|
---|
7793 | /*!
|
---|
7794 | * @brief This API used to read gyro highrate z duration
|
---|
7795 | * from page one register from 0x1D bit 0 to 7
|
---|
7796 | *
|
---|
7797 | * @param v_gyro_highrate_z_durn_u_8 : The value of gyro highrate z duration
|
---|
7798 | *
|
---|
7799 | * @return results of bus communication function
|
---|
7800 | * @retval 0 -> Success
|
---|
7801 | * @retval 1 -> Error
|
---|
7802 | *
|
---|
7803 | * @note Gyro highrate duration calculate by using the formula
|
---|
7804 | *
|
---|
7805 | * (1 + v_gyro_highrate_z_durn_u_8)*2.5ms
|
---|
7806 | */
|
---|
7807 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_durn(
|
---|
7808 | u_8 *v_gyro_highrate_z_durn_u_8);
|
---|
7809 | /*!
|
---|
7810 | * @brief This API used to write gyro highrate z duration
|
---|
7811 | * from page one register from 0x1D bit 0 to 7
|
---|
7812 | *
|
---|
7813 | * @param v_gyro_highrate_z_durn_u_8 : The value of gyro highrate z duration
|
---|
7814 | *
|
---|
7815 | * @return results of bus communication function
|
---|
7816 | * @retval 0 -> Success
|
---|
7817 | * @retval 1 -> Error
|
---|
7818 | *
|
---|
7819 | * @note Gyro highrate duration calculate by using the formula
|
---|
7820 | *
|
---|
7821 | * (1 + v_gyro_highrate_z_durn_u_8)*2.5ms
|
---|
7822 | */
|
---|
7823 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_durn(
|
---|
7824 | u_8 v_gyro_highrate_z_durn_u_8);
|
---|
7825 | /**************************************************************/
|
---|
7826 | /**\name FUNCTIONS FOR GYRO ANY_MOTION THRESHOLD */
|
---|
7827 | /**************************************************************/
|
---|
7828 | /*!
|
---|
7829 | * @brief This API used to read gyro anymotion threshold
|
---|
7830 | * from page one register from 0x1E bit 0 to 6
|
---|
7831 | *
|
---|
7832 | * @param v_gyro_any_motion_thres_u_8 : The value of gyro anymotion threshold
|
---|
7833 | *
|
---|
7834 | * @return results of bus communication function
|
---|
7835 | * @retval 0 -> Success
|
---|
7836 | * @retval 1 -> Error
|
---|
7837 | *
|
---|
7838 | * @note Gyro anymotion interrupt threshold dependent
|
---|
7839 | * on the selection of gyro range
|
---|
7840 | *
|
---|
7841 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7842 | * ----------------- | ------------- | ---------
|
---|
7843 | * 2000 | 1dps | 1LSB
|
---|
7844 | * 1000 | 0.5dps | 1LSB
|
---|
7845 | * 500 | 0.25dps | 1LSB
|
---|
7846 | *
|
---|
7847 | */
|
---|
7848 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_thres(
|
---|
7849 | u_8 *v_gyro_any_motion_thres_u_8);
|
---|
7850 | /*!
|
---|
7851 | * @brief This API used to write gyro anymotion threshold
|
---|
7852 | * from page one register from 0x1E bit 0 to 6
|
---|
7853 | *
|
---|
7854 | * @param v_gyro_any_motion_thres_u_8 : The value of gyro anymotion threshold
|
---|
7855 | *
|
---|
7856 | * @return results of bus communication function
|
---|
7857 | * @retval 0 -> Success
|
---|
7858 | * @retval 1 -> Error
|
---|
7859 | *
|
---|
7860 | * @note Gyro anymotion interrupt threshold dependent
|
---|
7861 | * on the selection of gyro range
|
---|
7862 | *
|
---|
7863 | * v_gyro_range_u_8 | threshold | LSB
|
---|
7864 | * ----------------- | ------------- | ---------
|
---|
7865 | * 2000 | 1dps | 1LSB
|
---|
7866 | * 1000 | 0.5dps | 1LSB
|
---|
7867 | * 500 | 0.25dps | 1LSB
|
---|
7868 | *
|
---|
7869 | */
|
---|
7870 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_thres(
|
---|
7871 | u_8 v_gyro_any_motion_thres_u_8);
|
---|
7872 | /**************************************************************/
|
---|
7873 | /**\name FUNCTIONS FOR GYRO ANY_MOTION SLOPE SAMPLES */
|
---|
7874 | /**************************************************************/
|
---|
7875 | /*!
|
---|
7876 | * @brief This API used to read gyro anymotion slope samples
|
---|
7877 | * from page one register from 0x1F bit 0 to 1
|
---|
7878 | *
|
---|
7879 | * @param v_gyro_any_motion_slope_samples_u_8 :
|
---|
7880 | * The value of gyro anymotion slope samples
|
---|
7881 | * v_gyro_any_motion_slope_samples_u_8 | result
|
---|
7882 | * ---------------------------------- | -----------
|
---|
7883 | * 0 | 8 samples
|
---|
7884 | * 1 | 16 samples
|
---|
7885 | * 2 | 32 samples
|
---|
7886 | * 3 | 64 samples
|
---|
7887 | *
|
---|
7888 | * @return results of bus communication function
|
---|
7889 | * @retval 0 -> Success
|
---|
7890 | * @retval 1 -> Error
|
---|
7891 | *
|
---|
7892 | */
|
---|
7893 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_slope_samples(
|
---|
7894 | u_8 *v_gyro_any_motion_slope_samples_u_8);
|
---|
7895 | /*!
|
---|
7896 | * @brief This API used to write gyro anymotion slope samples
|
---|
7897 | * from page one register from 0x1F bit 0 to 1
|
---|
7898 | *
|
---|
7899 | * @param v_gyro_any_motion_slope_samples_u_8 :
|
---|
7900 | * The value of gyro anymotion slope samples
|
---|
7901 | * v_gyro_any_motion_slope_samples_u_8 | result
|
---|
7902 | * ---------------------------------- | -----------
|
---|
7903 | * 0 | 8 samples
|
---|
7904 | * 1 | 16 samples
|
---|
7905 | * 2 | 32 samples
|
---|
7906 | * 3 | 64 samples
|
---|
7907 | *
|
---|
7908 | * @return results of bus communication function
|
---|
7909 | * @retval 0 -> Success
|
---|
7910 | * @retval 1 -> Error
|
---|
7911 | *
|
---|
7912 | */
|
---|
7913 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_slope_samples(
|
---|
7914 | u_8 v_gyro_any_motion_slope_samples_u_8);
|
---|
7915 | /**************************************************************/
|
---|
7916 | /**\name FUNCTIONS FOR GYRO ANY_MOTION AWAKE DURATION */
|
---|
7917 | /**************************************************************/
|
---|
7918 | /*!
|
---|
7919 | * @brief This API used to read gyro anymotion awake duration
|
---|
7920 | * from page one register from 0x1F bit 2 to 3
|
---|
7921 | *
|
---|
7922 | * @param v_gyro_awake_durn_u_8 : The value of gyro anymotion awake duration
|
---|
7923 | *
|
---|
7924 | * @return results of bus communication function
|
---|
7925 | * @retval 0 -> Success
|
---|
7926 | * @retval 1 -> Error
|
---|
7927 | *
|
---|
7928 | */
|
---|
7929 | BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_awake_durn(
|
---|
7930 | u_8 *v_gyro_awake_durn_u_8);
|
---|
7931 | /*!
|
---|
7932 | * @brief This API used to write gyro anymotion awake duration
|
---|
7933 | * from page one register from 0x1F bit 2 to 3
|
---|
7934 | *
|
---|
7935 | * @param v_gyro_awake_durn_u_8 : The value of gyro anymotion awake duration
|
---|
7936 | *
|
---|
7937 | * @return results of bus communication function
|
---|
7938 | * @retval 0 -> Success
|
---|
7939 | * @retval 1 -> Error
|
---|
7940 | *
|
---|
7941 | */
|
---|
7942 | BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_awake_durn(
|
---|
7943 | u_8 v_gyro_awake_durn_u_8);
|
---|
7944 | #endif
|
---|