Statistics
| Branch: | Tag: | Revision:

amiro-lld / include / BNO055 / bno055_reg.h @ 5d67f4db

History | View | Annotate | Download (256.718 KB)

1
/** \mainpage
2
 *
3
 ****************************************************************************
4
 * Copyright (C) 2015 - 2016 Bosch Sensortec GmbH
5
 *
6
 * File : bno055.h
7
 *
8
 * Date : 2016/03/14
9
 *
10
 * Revision : 2.0.3 $
11
 *
12
 * Usage: Sensor Driver file for BNO055 sensor
13
 *
14
 ****************************************************************************
15
 * \section License
16
 *
17
 * Redistribution and use in source and binary forms, with or without
18
 * modification, are permitted provided that the following conditions are met:
19
 *
20
 *   Redistributions of source code must retain the above copyright
21
 *   notice, this list of conditions and the following disclaimer.
22
 *
23
 *   Redistributions in binary form must reproduce the above copyright
24
 *   notice, this list of conditions and the following disclaimer in the
25
 *   documentation and/or other materials provided with the distribution.
26
 *
27
 *   Neither the name of the copyright holder nor the names of the
28
 *   contributors may be used to endorse or promote products derived from
29
 *   this software without specific prior written permission.
30
 *
31
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
32
 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
33
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
35
 * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
36
 * OR CONTRIBUTORS BE LIABLE FOR ANY
37
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
38
 * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO,
39
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
41
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
42
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
44
 * ANY WAY OUT OF THE USE OF THIS
45
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
46
 *
47
 * The information provided is believed to be accurate and reliable.
48
 * The copyright holder assumes no responsibility
49
 * for the consequences of use
50
 * of such information nor for any infringement of patents or
51
 * other rights of third parties which may result from its use.
52
 * No license is granted by implication or otherwise under any patent or
53
 * patent rights of the copyright holder.
54
 **************************************************************************/
55
/*! \file bno055.h
56
 \brief BNO055 Sensor Driver Support Header File */
57

    
58
#ifndef __BNO055_H__
59
#define __BNO055_H__
60

    
61
#define MACHINE_16_BIT
62
/****************************************************************/
63
/**\name    DATA TYPES INCLUDES     */
64
/************************************************************/
65
/*!
66
 * @brief The following definition uses for define the data types
67
 *
68
 * @note While porting the API please consider the following
69
 * @note Please check the version of C standard
70
 * @note Are you using Linux platform
71
 */
72

    
73
/*!
74
 * @brief For the Linux platform support
75
 * Please use the types.h for your data types definitions
76
 */
77
#ifdef  __KERNEL__
78

    
79
#include <linux/types.h>
80
/* singed integer type*/
81
typedef int8_t s8;/**< used for signed 8bit */
82
typedef int16_t s16;/**< used for signed 16bit */
83
typedef int32_t s32;/**< used for signed 32bit */
84
typedef int64_t s64;/**< used for signed 64bit */
85

    
86
typedef u_int8_t u8;/**< used for unsigned 8bit */
87
typedef u_int16_t u16;/**< used for unsigned 16bit */
88
typedef u_int32_t u32;/**< used for unsigned 32bit */
89
typedef u_int64_t u64;/**< used for unsigned 64bit */
90

    
91
#else /* ! __KERNEL__ */
92
/**********************************************************
93
 * These definition uses for define the C
94
 * standard version data types
95
 ***********************************************************/
96
# if !defined(__STDC_VERSION__)
97

    
98
/************************************************
99
 * compiler is C11 C standard
100
 ************************************************/
101
#if (__STDC_VERSION__ == 201112L)
102

    
103
/************************************************/
104
#include <stdint.h>
105
/************************************************/
106

    
107
/*unsigned integer types*/
108
typedef uint8_t u8;/**< used for unsigned 8bit */
109
typedef uint16_t u16;/**< used for unsigned 16bit */
110
typedef uint32_t u32;/**< used for unsigned 32bit */
111
typedef uint64_t u64;/**< used for unsigned 64bit */
112

    
113
/*signed integer types*/
114
typedef int8_t s8;/**< used for signed 8bit */
115
typedef int16_t s16;/**< used for signed 16bit */
116
typedef int32_t s32;/**< used for signed 32bit */
117
typedef int64_t s64;/**< used for signed 64bit */
118
/************************************************
119
 * compiler is C99 C standard
120
 ************************************************/
121

    
122
#elif (__STDC_VERSION__ == 199901L)
123

    
124
/* stdint.h is a C99 supported c library.
125
 which is used to fixed the integer size*/
126
/************************************************/
127
#include <stdint.h>
128
/************************************************/
129

    
130
/*unsigned integer types*/
131
typedef uint8_t u8;/**< used for unsigned 8bit */
132
typedef uint16_t u16;/**< used for unsigned 16bit */
133
typedef uint32_t u32;/**< used for unsigned 32bit */
134
typedef uint64_t u64;/**< used for unsigned 64bit */
135

    
136
/*signed integer types*/
137
typedef int8_t s8;/**< used for signed 8bit */
138
typedef int16_t s16;/**< used for signed 16bit */
139
typedef int32_t s32;/**< used for signed 32bit */
140
typedef int64_t s64;/**< used for signed 64bit */
141
/************************************************
142
 * compiler is C89 or other C standard
143
 ************************************************/
144

    
145
#else /*  !defined(__STDC_VERSION__) */
146
/*!
147
 * @brief By default it is defined as 32 bit machine configuration
148
 *   define your data types based on your
149
 *   machine/compiler/controller configuration
150
 */
151
#define  MACHINE_32_BIT
152

    
153
/*! @brief
154
 *  If your machine support 16 bit
155
 *  define the MACHINE_16_BIT
156
 */
157
#ifdef MACHINE_16_BIT
158
#include <limits.h>
159
/*signed integer types*/
160
typedef signed char s8;/**< used for signed 8bit */
161
typedef signed short int s16;/**< used for signed 16bit */
162
typedef signed long int s32;/**< used for signed 32bit */
163

    
164
#if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL
165
typedef long int s64;/**< used for signed 64bit */
166
typedef unsigned long int u64;/**< used for unsigned 64bit */
167
#elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL)
168
typedef long long int s64;/**< used for signed 64bit */
169
typedef unsigned long long int u64;/**< used for unsigned 64bit */
170
#else
171
#warning Either the correct data type for signed 64 bit integer \
172
could not be found, or 64 bit integers are not supported in your environment.
173
#warning If 64 bit integers are supported on your platform, \
174
please set s64 manually.
175
#endif
176

    
177
/*unsigned integer types*/
178
typedef unsigned char u8;/**< used for unsigned 8bit */
179
typedef unsigned short int u16;/**< used for unsigned 16bit */
180
typedef unsigned long int u32;/**< used for unsigned 32bit */
181

    
182
/* If your machine support 32 bit
183
 define the MACHINE_32_BIT*/
184
#elif defined MACHINE_32_BIT
185
/*signed integer types*/
186
typedef signed char s8;/**< used for signed 8bit */
187
typedef signed short int s16;/**< used for signed 16bit */
188
typedef signed int s32;/**< used for signed 32bit */
189
typedef signed long long int s64;/**< used for signed 64bit */
190

    
191
/*unsigned integer types*/
192
typedef unsigned char u8;/**< used for unsigned 8bit */
193
typedef unsigned short int u16;/**< used for unsigned 16bit */
194
typedef unsigned int u32;/**< used for unsigned 32bit */
195
typedef unsigned long long int u64;/**< used for unsigned 64bit */
196

    
197
/* If your machine support 64 bit
198
 define the MACHINE_64_BIT*/
199
#elif defined MACHINE_64_BIT
200
/*signed integer types*/
201
typedef signed char s8;/**< used for signed 8bit */
202
typedef signed short int s16;/**< used for signed 16bit */
203
typedef signed int s32;/**< used for signed 32bit */
204
typedef signed long int s64;/**< used for signed 64bit */
205

    
206
/*unsigned integer types*/
207
typedef unsigned char u8;/**< used for unsigned 8bit */
208
typedef unsigned short int u16;/**< used for unsigned 16bit */
209
typedef unsigned int u32;/**< used for unsigned 32bit */
210
typedef unsigned long int u64;/**< used for unsigned 64bit */
211

    
212
#else
213
#warning The data types defined above which not supported \
214
define the data types manually
215
#endif
216
#endif
217

    
218
/*** This else will execute for the compilers
219
 *  which are not supported the C standards
220
 *  Like C89/C99/C11***/
221
#else
222
/*!
223
 * @brief By default it is defined as 32 bit machine configuration
224
 *   define your data types based on your
225
 *   machine/compiler/controller configuration
226
 */
227
#define  MACHINE_32_BIT
228

    
229
/* If your machine support 16 bit
230
 define the MACHINE_16_BIT*/
231
#ifdef MACHINE_16_BIT
232
#include <limits.h>
233
/*signed integer types*/
234
typedef signed char s8;/**< used for signed 8bit */
235
typedef signed short int s16;/**< used for signed 16bit */
236
typedef signed long int s32;/**< used for signed 32bit */
237

    
238
#if defined(LONG_MAX) && LONG_MAX == 0x7fffffffffffffffL
239
typedef long int s64;/**< used for signed 64bit */
240
typedef unsigned long int u64;/**< used for unsigned 64bit */
241
#elif defined(LLONG_MAX) && (LLONG_MAX == 0x7fffffffffffffffLL)
242
typedef long long int s64;/**< used for signed 64bit */
243
typedef unsigned long long int u64;/**< used for unsigned 64bit */
244
#else
245
#warning Either the correct data type for signed 64 bit integer \
246
could not be found, or 64 bit integers are not supported in your environment.
247
#warning If 64 bit integers are supported on your platform, \
248
please set s64 manually.
249
#endif
250

    
251
/*unsigned integer types*/
252
typedef unsigned char u8;/**< used for unsigned 8bit */
253
typedef unsigned short int u16;/**< used for unsigned 16bit */
254
typedef unsigned long int u32;/**< used for unsigned 32bit */
255

    
256
/*! @brief If your machine support 32 bit
257
 define the MACHINE_32_BIT*/
258
#elif defined MACHINE_32_BIT
259
/*signed integer types*/
260
typedef signed char s8;/**< used for signed 8bit */
261
typedef signed short int s16;/**< used for signed 16bit */
262
typedef signed int s32;/**< used for signed 32bit */
263
typedef signed long long int s64;/**< used for signed 64bit */
264

    
265
/*unsigned integer types*/
266
typedef unsigned char u8;/**< used for unsigned 8bit */
267
typedef unsigned short int u16;/**< used for unsigned 16bit */
268
typedef unsigned int u32;/**< used for unsigned 32bit */
269
typedef unsigned long long int u64;/**< used for unsigned 64bit */
270

    
271
/* If your machine support 64 bit
272
 define the MACHINE_64_BIT*/
273
#elif defined MACHINE_64_BIT
274
/*signed integer types*/
275
typedef signed char s8;/**< used for signed 8bit */
276
typedef signed short int s16;/**< used for signed 16bit */
277
typedef signed int s32;/**< used for signed 32bit */
278
typedef signed long int s64;/**< used for signed 64bit */
279

    
280
/*unsigned integer types*/
281
typedef unsigned char u8;/**< used for unsigned 8bit */
282
typedef unsigned short int u16;/**< used for unsigned 16bit */
283
typedef unsigned int u32;/**< used for unsigned 32bit */
284
typedef unsigned long int u64;/**< used for unsigned 64bit */
285

    
286
#else
287
#warning The data types defined above which not supported \
288
define the data types manually
289
#endif
290
#endif
291
#endif
292
/***************************************************************/
293
/**\name    BUS READ AND WRITE FUNCTIONS           */
294
/***************************************************************/
295
#define BNO055_WR_FUNC_PTR s8 (*bus_write)\
296
(u8, u8, u8 *, u8)
297

    
298
#define BNO055_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)\
299
    bus_write(dev_addr, reg_addr, reg_data, wr_len)
300

    
301
#define BNO055_RD_FUNC_PTR s8 \
302
(*bus_read)(u8, u8, u8 *, u8)
303

    
304
#define BNO055_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, r_len)\
305
bus_read(dev_addr, reg_addr, reg_data, r_len)
306

    
307
#define BNO055_DELAY_RETURN_TYPE void
308

    
309
#define BNO055_DELAY_PARAM_TYPES u32
310

    
311
#define BNO055_DELAY_FUNC(delay_in_msec)\
312
    delay_func(delay_in_msec)
313

    
314
/********************************************************/
315
/**\name    I2C ADDRESS DEFINITION FOR BNO055           */
316
/********************************************************/
317
/* bno055 I2C Address */
318
#define BNO055_I2C_ADDR1                (0x28)
319
#define BNO055_I2C_ADDR2                (0x29)
320

    
321
/***************************************************/
322
/**\name    REGISTER ADDRESS DEFINITION  */
323
/***************************************************/
324
/* Page id register definition*/
325
#define BNO055_PAGE_ID_ADDR                 (0X07)
326

    
327
/* PAGE0 REGISTER DEFINITION START*/
328
#define BNO055_CHIP_ID_ADDR                 (0x00)
329
#define BNO055_ACCEL_REV_ID_ADDR            (0x01)
330
#define BNO055_MAG_REV_ID_ADDR              (0x02)
331
#define BNO055_GYRO_REV_ID_ADDR             (0x03)
332
#define BNO055_SW_REV_ID_LSB_ADDR           (0x04)
333
#define BNO055_SW_REV_ID_MSB_ADDR           (0x05)
334
#define BNO055_BL_REV_ID_ADDR               (0X06)
335

    
336
/* Accel data register*/
337
#define BNO055_ACCEL_DATA_X_LSB_ADDR            (0X08)
338
#define BNO055_ACCEL_DATA_X_MSB_ADDR            (0X09)
339
#define BNO055_ACCEL_DATA_Y_LSB_ADDR            (0X0A)
340
#define BNO055_ACCEL_DATA_Y_MSB_ADDR            (0X0B)
341
#define BNO055_ACCEL_DATA_Z_LSB_ADDR            (0X0C)
342
#define BNO055_ACCEL_DATA_Z_MSB_ADDR            (0X0D)
343

    
344
/*Mag data register*/
345
#define BNO055_MAG_DATA_X_LSB_ADDR          (0X0E)
346
#define BNO055_MAG_DATA_X_MSB_ADDR          (0X0F)
347
#define BNO055_MAG_DATA_Y_LSB_ADDR          (0X10)
348
#define BNO055_MAG_DATA_Y_MSB_ADDR          (0X11)
349
#define BNO055_MAG_DATA_Z_LSB_ADDR          (0X12)
350
#define BNO055_MAG_DATA_Z_MSB_ADDR          (0X13)
351

    
352
/*Gyro data registers*/
353
#define BNO055_GYRO_DATA_X_LSB_ADDR         (0X14)
354
#define BNO055_GYRO_DATA_X_MSB_ADDR         (0X15)
355
#define BNO055_GYRO_DATA_Y_LSB_ADDR         (0X16)
356
#define BNO055_GYRO_DATA_Y_MSB_ADDR         (0X17)
357
#define BNO055_GYRO_DATA_Z_LSB_ADDR         (0X18)
358
#define BNO055_GYRO_DATA_Z_MSB_ADDR         (0X19)
359

    
360
/*Euler data registers*/
361
#define BNO055_EULER_H_LSB_ADDR         (0X1A)
362
#define BNO055_EULER_H_MSB_ADDR         (0X1B)
363

    
364
#define BNO055_EULER_R_LSB_ADDR         (0X1C)
365
#define BNO055_EULER_R_MSB_ADDR         (0X1D)
366

    
367
#define BNO055_EULER_P_LSB_ADDR         (0X1E)
368
#define BNO055_EULER_P_MSB_ADDR         (0X1F)
369

    
370
/*Quaternion data registers*/
371
#define BNO055_QUATERNION_DATA_W_LSB_ADDR   (0X20)
372
#define BNO055_QUATERNION_DATA_W_MSB_ADDR   (0X21)
373
#define BNO055_QUATERNION_DATA_X_LSB_ADDR   (0X22)
374
#define BNO055_QUATERNION_DATA_X_MSB_ADDR   (0X23)
375
#define BNO055_QUATERNION_DATA_Y_LSB_ADDR   (0X24)
376
#define BNO055_QUATERNION_DATA_Y_MSB_ADDR   (0X25)
377
#define BNO055_QUATERNION_DATA_Z_LSB_ADDR   (0X26)
378
#define BNO055_QUATERNION_DATA_Z_MSB_ADDR   (0X27)
379

    
380
/* Linear acceleration data registers*/
381
#define BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR         (0X28)
382
#define BNO055_LINEAR_ACCEL_DATA_X_MSB_ADDR         (0X29)
383
#define BNO055_LINEAR_ACCEL_DATA_Y_LSB_ADDR         (0X2A)
384
#define BNO055_LINEAR_ACCEL_DATA_Y_MSB_ADDR         (0X2B)
385
#define BNO055_LINEAR_ACCEL_DATA_Z_LSB_ADDR         (0X2C)
386
#define BNO055_LINEAR_ACCEL_DATA_Z_MSB_ADDR         (0X2D)
387

    
388
/*Gravity data registers*/
389
#define BNO055_GRAVITY_DATA_X_LSB_ADDR          (0X2E)
390
#define BNO055_GRAVITY_DATA_X_MSB_ADDR          (0X2F)
391
#define BNO055_GRAVITY_DATA_Y_LSB_ADDR          (0X30)
392
#define BNO055_GRAVITY_DATA_Y_MSB_ADDR          (0X31)
393
#define BNO055_GRAVITY_DATA_Z_LSB_ADDR          (0X32)
394
#define BNO055_GRAVITY_DATA_Z_MSB_ADDR          (0X33)
395

    
396
/* Temperature data register*/
397
#define BNO055_TEMP_ADDR                    (0X34)
398

    
399
/* Status registers*/
400
#define BNO055_CALIB_STAT_ADDR              (0X35)
401
#define BNO055_SELFTEST_RESULT_ADDR         (0X36)
402
#define BNO055_INTR_STAT_ADDR               (0X37)
403
#define BNO055_SYS_CLK_STAT_ADDR            (0X38)
404
#define BNO055_SYS_STAT_ADDR                (0X39)
405
#define BNO055_SYS_ERR_ADDR                 (0X3A)
406

    
407
/* Unit selection register*/
408
#define BNO055_UNIT_SEL_ADDR                (0X3B)
409
#define BNO055_DATA_SELECT_ADDR             (0X3C)
410

    
411
/* Mode registers*/
412
#define BNO055_OPR_MODE_ADDR                (0X3D)
413
#define BNO055_PWR_MODE_ADDR                (0X3E)
414

    
415
#define BNO055_SYS_TRIGGER_ADDR             (0X3F)
416
#define BNO055_TEMP_SOURCE_ADDR             (0X40)
417
/* Axis remap registers*/
418
#define BNO055_AXIS_MAP_CONFIG_ADDR         (0X41)
419
#define BNO055_AXIS_MAP_SIGN_ADDR           (0X42)
420

    
421
/* SIC registers*/
422
#define BNO055_SIC_MATRIX_0_LSB_ADDR        (0X43)
423
#define BNO055_SIC_MATRIX_0_MSB_ADDR        (0X44)
424
#define BNO055_SIC_MATRIX_1_LSB_ADDR        (0X45)
425
#define BNO055_SIC_MATRIX_1_MSB_ADDR        (0X46)
426
#define BNO055_SIC_MATRIX_2_LSB_ADDR        (0X47)
427
#define BNO055_SIC_MATRIX_2_MSB_ADDR        (0X48)
428
#define BNO055_SIC_MATRIX_3_LSB_ADDR        (0X49)
429
#define BNO055_SIC_MATRIX_3_MSB_ADDR        (0X4A)
430
#define BNO055_SIC_MATRIX_4_LSB_ADDR        (0X4B)
431
#define BNO055_SIC_MATRIX_4_MSB_ADDR        (0X4C)
432
#define BNO055_SIC_MATRIX_5_LSB_ADDR        (0X4D)
433
#define BNO055_SIC_MATRIX_5_MSB_ADDR        (0X4E)
434
#define BNO055_SIC_MATRIX_6_LSB_ADDR        (0X4F)
435
#define BNO055_SIC_MATRIX_6_MSB_ADDR        (0X50)
436
#define BNO055_SIC_MATRIX_7_LSB_ADDR        (0X51)
437
#define BNO055_SIC_MATRIX_7_MSB_ADDR        (0X52)
438
#define BNO055_SIC_MATRIX_8_LSB_ADDR        (0X53)
439
#define BNO055_SIC_MATRIX_8_MSB_ADDR        (0X54)
440

    
441
/* Accelerometer Offset registers*/
442
#define BNO055_ACCEL_OFFSET_X_LSB_ADDR              (0X55)
443
#define BNO055_ACCEL_OFFSET_X_MSB_ADDR              (0X56)
444
#define BNO055_ACCEL_OFFSET_Y_LSB_ADDR              (0X57)
445
#define BNO055_ACCEL_OFFSET_Y_MSB_ADDR              (0X58)
446
#define BNO055_ACCEL_OFFSET_Z_LSB_ADDR              (0X59)
447
#define BNO055_ACCEL_OFFSET_Z_MSB_ADDR              (0X5A)
448

    
449
/* Magnetometer Offset registers*/
450
#define BNO055_MAG_OFFSET_X_LSB_ADDR                (0X5B)
451
#define BNO055_MAG_OFFSET_X_MSB_ADDR                (0X5C)
452
#define BNO055_MAG_OFFSET_Y_LSB_ADDR                (0X5D)
453
#define BNO055_MAG_OFFSET_Y_MSB_ADDR                (0X5E)
454
#define BNO055_MAG_OFFSET_Z_LSB_ADDR                (0X5F)
455
#define BNO055_MAG_OFFSET_Z_MSB_ADDR                (0X60)
456

    
457
/* Gyroscope Offset registers*/
458
#define BNO055_GYRO_OFFSET_X_LSB_ADDR               (0X61)
459
#define BNO055_GYRO_OFFSET_X_MSB_ADDR               (0X62)
460
#define BNO055_GYRO_OFFSET_Y_LSB_ADDR               (0X63)
461
#define BNO055_GYRO_OFFSET_Y_MSB_ADDR               (0X64)
462
#define BNO055_GYRO_OFFSET_Z_LSB_ADDR               (0X65)
463
#define BNO055_GYRO_OFFSET_Z_MSB_ADDR               (0X66)
464

    
465
/* Radius registers*/
466
#define BNO055_ACCEL_RADIUS_LSB_ADDR                (0X67)
467
#define BNO055_ACCEL_RADIUS_MSB_ADDR                (0X68)
468
#define BNO055_MAG_RADIUS_LSB_ADDR                  (0X69)
469
#define BNO055_MAG_RADIUS_MSB_ADDR                  (0X6A)
470
/* PAGE0 REGISTERS DEFINITION END*/
471

    
472
/* PAGE1 REGISTERS DEFINITION START*/
473
/* Configuration registers*/
474
#define BNO055_ACCEL_CONFIG_ADDR                (0X08)
475
#define BNO055_MAG_CONFIG_ADDR                  (0X09)
476
#define BNO055_GYRO_CONFIG_ADDR                 (0X0A)
477
#define BNO055_GYRO_MODE_CONFIG_ADDR            (0X0B)
478
#define BNO055_ACCEL_SLEEP_CONFIG_ADDR          (0X0C)
479
#define BNO055_GYRO_SLEEP_CONFIG_ADDR           (0X0D)
480
#define BNO055_MAG_SLEEP_CONFIG_ADDR            (0x0E)
481

    
482
/* Interrupt registers*/
483
#define BNO055_INT_MASK_ADDR                    (0X0F)
484
#define BNO055_INT_ADDR                         (0X10)
485
#define BNO055_ACCEL_ANY_MOTION_THRES_ADDR      (0X11)
486
#define BNO055_ACCEL_INTR_SETTINGS_ADDR         (0X12)
487
#define BNO055_ACCEL_HIGH_G_DURN_ADDR           (0X13)
488
#define BNO055_ACCEL_HIGH_G_THRES_ADDR          (0X14)
489
#define BNO055_ACCEL_NO_MOTION_THRES_ADDR       (0X15)
490
#define BNO055_ACCEL_NO_MOTION_SET_ADDR         (0X16)
491
#define BNO055_GYRO_INTR_SETING_ADDR            (0X17)
492
#define BNO055_GYRO_HIGHRATE_X_SET_ADDR         (0X18)
493
#define BNO055_GYRO_DURN_X_ADDR                 (0X19)
494
#define BNO055_GYRO_HIGHRATE_Y_SET_ADDR         (0X1A)
495
#define BNO055_GYRO_DURN_Y_ADDR                 (0X1B)
496
#define BNO055_GYRO_HIGHRATE_Z_SET_ADDR         (0X1C)
497
#define BNO055_GYRO_DURN_Z_ADDR                 (0X1D)
498
#define BNO055_GYRO_ANY_MOTION_THRES_ADDR       (0X1E)
499
#define BNO055_GYRO_ANY_MOTION_SET_ADDR         (0X1F)
500
/* PAGE1 REGISTERS DEFINITION END*/
501

    
502
#define BNO055_MDELAY_DATA_TYPE     u32
503

    
504
/*< This refers BNO055 return type as s8 */
505
#define BNO055_RETURN_FUNCTION_TYPE s8
506

    
507
/* Compile switch definition for Float and double*/
508
#define BNO055_FLOAT_ENABLE
509
#define BNO055_DOUBLE_ENABLE
510
/**************************************************************/
511
/**\name    STRUCTURE DEFINITIONS                         */
512
/**************************************************************/
513
/*!
514
 *   @brief bno055 struct
515
 */
516
struct bno055_t {
517
    u8 chip_id;/**< chip_id of bno055 */
518
    u16 sw_rev_id;/**< software revision id of bno055 */
519
    u8 page_id;/**< page_id of bno055 */
520
    u8 accel_rev_id;/**< accel revision id of bno055 */
521
    u8 mag_rev_id;/**< mag revision id of bno055 */
522
    u8 gyro_rev_id;/**< gyro revision id of bno055 */
523
    u8 bl_rev_id;/**< boot loader revision id of bno055 */
524
    u8 dev_addr;/**< i2c device address of bno055 */
525
    BNO055_WR_FUNC_PTR;/**< bus write function pointer */
526
    BNO055_RD_FUNC_PTR;/**<bus read function pointer */
527
    void (*delay_msec)(BNO055_MDELAY_DATA_TYPE);/**< delay function pointer */
528
};
529
/*!
530
 * @brief struct for accel data read from registers
531
 */
532
struct bno055_accel_t {
533
    s16 x;/**< accel x data */
534
    s16 y;/**< accel y data */
535
    s16 z;/**< accel z data */
536
};
537
/*!
538
 * @brief struct for Mag data read from registers
539
 */
540
struct bno055_mag_t {
541
    s16 x;/**< mag x data */
542
    s16 y;/**< mag y data */
543
    s16 z;/**< mag z data */
544
};
545
/*!
546
 * @brief struct for Gyro data read from registers
547
 */
548
struct bno055_gyro_t {
549
    s16 x;/**< gyro x data */
550
    s16 y;/**< gyro y data */
551
    s16 z;/**< gyro z data */
552
};
553
/*!
554
 * @brief struct for Euler data read from registers
555
 */
556
struct bno055_euler_t {
557
    s16 h;/**< Euler h data */
558
    s16 r;/**< Euler r data */
559
    s16 p;/**< Euler p data */
560
};
561
/*!
562
 * @brief struct for Quaternion data read from registers
563
 */
564
struct bno055_quaternion_t {
565
    s16 w;/**< Quaternion w data */
566
    s16 x;/**< Quaternion x data */
567
    s16 y;/**< Quaternion y data */
568
    s16 z;/**< Quaternion z data */
569
};
570
/*!
571
 * @brief struct for Linear Accel data read from registers
572
 */
573
struct bno055_linear_accel_t {
574
    s16 x; /**< Linear Accel x data */
575
    s16 y; /**< Linear Accel y data */
576
    s16 z; /**< Linear Accel z data */
577
};
578
/*!
579
 * @brief struct for Gravity data read from registers
580
 */
581
struct bno055_gravity_t {
582
    s16 x;/**< Gravity x data */
583
    s16 y;/**< Gravity y data */
584
    s16 z;/**< Gravity z data */
585
};
586
#ifdef  BNO055_DOUBLE_ENABLE
587
/*!
588
 * @brief struct for Accel-output data of precision double
589
 */
590
struct bno055_accel_double_t {
591
    double x;/**< Accel x double data */
592
    double y;/**< Accel y double data */
593
    double z;/**< Accel z double data */
594
};
595
/*!
596
 * @brief struct for Mag-output data of precision double
597
 */
598
struct bno055_mag_double_t {
599
    double x;/**< Mag x double data */
600
    double y;/**< Mag y double data */
601
    double z;/**< Mag z double data */
602
};
603
/*!
604
 * @brief struct for Gyro-output data of precision double
605
 */
606
struct bno055_gyro_double_t {
607
    double x;/**< Gyro x double data */
608
    double y;/**< Gyro y double data */
609
    double z;/**< Gyro z double data */
610
};
611
/*!
612
 * @brief struct for Euler-output data of precision double
613
 */
614
struct bno055_euler_double_t {
615
    double h;/**< Euler h double data */
616
    double r;/**< Euler r double data */
617
    double p;/**< Euler p double data */
618
};
619
/*!
620
 * @brief struct for Linear Accel-output data of precision double
621
 */
622
struct bno055_linear_accel_double_t {
623
    double x;/**< linear accel x double data */
624
    double y;/**< linear accel y double data */
625
    double z;/**< linear accel z double data */
626
};
627
/*!
628
 * @brief struct for Gravity-output data of precision double
629
 */
630
struct bno055_gravity_double_t {
631
    double x;/**< Gravity x double data */
632
    double y;/**< Gravity y double data */
633
    double z;/**< Gravity z double data */
634
};
635
#endif
636
#ifdef  BNO055_FLOAT_ENABLE
637
/*!
638
 * @brief struct for Accel-output data of precision float
639
 */
640
struct bno055_accel_float_t {
641
    float x;/**< accel x float data */
642
    float y;/**< accel y float data */
643
    float z;/**< accel z float data */
644
};
645
/*!
646
 * @brief struct for Mag-output data of precision float
647
 */
648
struct bno055_mag_float_t {
649
    float x;/**< Mag x float data */
650
    float y;/**< Mag y float data */
651
    float z;/**< Mag z float data */
652
};
653
/*!
654
 * @brief struct for Gyro-output data of precision float
655
 */
656
struct bno055_gyro_float_t {
657
    float x;/**< Gyro x float data */
658
    float y;/**< Gyro y float data */
659
    float z;/**< Gyro z float data */
660
};
661
/*!
662
 * @brief struct for Euler-output data of precision float
663
 */
664
struct bno055_euler_float_t {
665
    float h;/**< Euler h float data */
666
    float r;/**< Euler r float data */
667
    float p;/**< Euler p float data */
668
};
669
/*!
670
 * @brief struct for Linear accel-output data of precision float
671
 */
672
struct bno055_linear_accel_float_t {
673
    float x;/**< Linear accel x float data */
674
    float y;/**< Linear accel y float data */
675
    float z;/**< Linear accel z float data */
676
};
677
/*!
678
 * @brief struct for Gravity-output data of precision float
679
 */
680
struct bno055_gravity_float_t {
681
    float x;/**< Gravity x float data */
682
    float y;/**< Gravity y float data */
683
    float z;/**< Gravity z float data */
684
};
685
#endif
686
/*!
687
 * @brief struct for Accel offset
688
 */
689
struct bno055_accel_offset_t {
690
    s16 x;/**< Accel offset x data */
691
    s16 y;/**< Accel offset y data */
692
    s16 z;/**< Accel offset z data */
693
    s16 r;/**< Accel radius r data */
694
};
695
/*!
696
 * @brief struct for Gyro offset
697
 */
698
struct bno055_gyro_offset_t {
699
    s16 x;/**< Gyro offset x data */
700
    s16 y;/**< Gyro offset y data */
701
    s16 z;/**< Gyro offset z data */
702
};
703
/*!
704
 * @brief struct for Mag offset
705
 */
706
struct bno055_mag_offset_t {
707
    s16 x;/**< Mag offset x data */
708
    s16 y;/**< Mag offset y data */
709
    s16 z;/**< Mag offset z data */
710
    s16 r;/**< Mag radius x data */
711
};
712
/*!
713
 * @brief struct for soft iron calibration matrix
714
 */
715
struct bno055_sic_matrix_t {
716
    s16 sic_0;/**< soft iron calibration matrix 0 data */
717
    s16 sic_1;/**< soft iron calibration matrix 1 data */
718
    s16 sic_2;/**< soft iron calibration matrix 2 data */
719
    s16 sic_3;/**< soft iron calibration matrix 3 data */
720
    s16 sic_4;/**< soft iron calibration matrix 4 data */
721
    s16 sic_5;/**< soft iron calibration matrix 5 data */
722
    s16 sic_6;/**< soft iron calibration matrix 6 data */
723
    s16 sic_7;/**< soft iron calibration matrix 7 data */
724
    s16 sic_8;/**< soft iron calibration matrix 8 data */
725
};
726
/***************************************************/
727
/**\name    CONSTANT DEFINITIONS                   */
728
/***************************************************/
729
#define  BNO055_INIT_VALUE                      ((u8)0)
730
#define  BNO055_GEN_READ_WRITE_LENGTH           ((u8)1)
731
#define  BNO055_LSB_MSB_READ_LENGTH             ((u8)2)
732
#define  BNO055_MAG_POWER_MODE_RANGE            ((u8)4)
733
#define  BNO055_MAG_OPR_MODE_RANGE              ((u8)5)
734
#define  BNO055_ACCEL_POWER_MODE_RANGE          ((u8)6)
735
#define  BNO055_ACCEL_SLEEP_DURATION_RANGE      ((u8)16)
736
#define  BNO055_GYRO_AUTO_SLEEP_DURATION_RANGE  ((u8)8)
737
#define  BNO055_ACCEL_GYRO_BW_RANGE     ((u8)8)
738
#define  BNO055_MAG_OUTPUT_RANGE        ((u8)8)
739
#define  BNO055_ACCEL_RANGE             ((u8)5)
740
#define  BNO055_SHIFT_EIGHT_BITS        ((u8)8)
741
#define  BNO055_GYRO_RANGE              ((u8)5)
742
#define  BNO055_ACCEL_SLEEP_MODE_RANGE  ((u8)2)
743
/*  BNO055 API BNO055_ERROR codes */
744
#define BNO055_E_NULL_PTR   ((s8)-127)
745
#define BNO055_OUT_OF_RANGE ((s8)-2)
746
#define BNO055_SUCCESS      ((u8)0)
747
#define BNO055_ERROR        ((s8)-1)
748

    
749
/* Selection for bit enable and disable */
750
#define BNO055_BIT_ENABLE       (0x01)
751
#define BNO055_BIT_DISABLE      (0x00)
752

    
753
/* Page ID */
754
#define BNO055_PAGE_ZERO        (0X00)
755
#define BNO055_PAGE_ONE         (0X01)
756

    
757
/* Enable the temperature source */
758
#define BNO055_ACCEL_TEMP_EN    (0x00)
759
#define BNO055_GYRO_TEMP_EN     (0x01)
760
#define BNO055_MCU_TEMP_EN      (0x03)
761

    
762
/*Accel unit*/
763
#define BNO055_ACCEL_UNIT_MSQ   (0x00)
764
#define BNO055_ACCEL_UNIT_MG    (0x01)
765

    
766
/*Gyro unit*/
767
#define BNO055_GYRO_UNIT_DPS    (0x00)
768
#define BNO055_GYRO_UNIT_RPS    (0x01)
769

    
770
/* Euler unit*/
771
#define BNO055_EULER_UNIT_DEG   (0x00)
772
#define BNO055_EULER_UNIT_RAD   (0x01)
773

    
774
/*Temperature unit*/
775
#define BNO055_TEMP_UNIT_CELSIUS        (0x00)
776
#define BNO055_TEMP_UNIT_FAHRENHEIT     (0x01)
777

    
778
/*Accel division factor*/
779
#define BNO055_ACCEL_DIV_MSQ    (100.0)
780
#define BNO055_ACCEL_DIV_MG     (1)
781

    
782
/*Mag division factor*/
783
#define BNO055_MAG_DIV_UT   (16.0)
784

    
785
/*Gyro division factor*/
786
#define BNO055_GYRO_DIV_DPS     (16.0)
787
#define BNO055_GYRO_DIV_RPS     (900.0)
788

    
789
/*Euler division factor*/
790
#define BNO055_EULER_DIV_DEG        (16.0)
791
#define BNO055_EULER_DIV_RAD        (900.0)
792

    
793
/*Linear accel division factor*/
794
#define BNO055_LINEAR_ACCEL_DIV_MSQ (100.0)
795

    
796
/*Gravity accel division factor*/
797
#define BNO055_GRAVITY_DIV_MSQ  (100.0)
798

    
799
/* Temperature division factor*/
800
#define BNO055_TEMP_DIV_FAHRENHEIT  (0.5)
801
#define BNO055_TEMP_DIV_CELSIUS     (1)
802

    
803
#define BNO055_MODE_SWITCHING_DELAY        (600)
804
#define BNO055_CONFIG_MODE_SWITCHING_DELAY ((u8)20)
805

    
806
/* Operation mode settings*/
807
#define BNO055_OPERATION_MODE_CONFIG            (0X00)
808
#define BNO055_OPERATION_MODE_ACCONLY           (0X01)
809
#define BNO055_OPERATION_MODE_MAGONLY           (0X02)
810
#define BNO055_OPERATION_MODE_GYRONLY           (0X03)
811
#define BNO055_OPERATION_MODE_ACCMAG            (0X04)
812
#define BNO055_OPERATION_MODE_ACCGYRO           (0X05)
813
#define BNO055_OPERATION_MODE_MAGGYRO           (0X06)
814
#define BNO055_OPERATION_MODE_AMG               (0X07)
815
#define BNO055_OPERATION_MODE_IMUPLUS           (0X08)
816
#define BNO055_OPERATION_MODE_COMPASS           (0X09)
817
#define BNO055_OPERATION_MODE_M4G               (0X0A)
818
#define BNO055_OPERATION_MODE_NDOF_FMC_OFF      (0X0B)
819
#define BNO055_OPERATION_MODE_NDOF              (0X0C)
820

    
821
/* Power mode*/
822
#define BNO055_POWER_MODE_NORMAL    (0X00)
823
#define BNO055_POWER_MODE_LOWPOWER  (0X01)
824
#define BNO055_POWER_MODE_SUSPEND   (0X02)
825

    
826
/* PAGE-1 definitions*/
827
/* Accel Range */
828

    
829
#define BNO055_ACCEL_RANGE_2G       (0X00)
830
#define BNO055_ACCEL_RANGE_4G       (0X01)
831
#define BNO055_ACCEL_RANGE_8G       (0X02)
832
#define BNO055_ACCEL_RANGE_16G      (0X03)
833

    
834
/* Accel Bandwidth*/
835
#define BNO055_ACCEL_BW_7_81HZ      (0x00)
836
#define BNO055_ACCEL_BW_15_63HZ     (0x01)
837
#define BNO055_ACCEL_BW_31_25HZ     (0x02)
838
#define BNO055_ACCEL_BW_62_5HZ      (0X03)
839
#define BNO055_ACCEL_BW_125HZ       (0X04)
840
#define BNO055_ACCEL_BW_250HZ       (0X05)
841
#define BNO055_ACCEL_BW_500HZ       (0X06)
842
#define BNO055_ACCEL_BW_1000HZ      (0X07)
843

    
844
/* Accel Power mode*/
845
#define BNO055_ACCEL_NORMAL         (0X00)
846
#define BNO055_ACCEL_SUSPEND        (0X01)
847
#define BNO055_ACCEL_LOWPOWER_1     (0X02)
848
#define BNO055_ACCEL_STANDBY        (0X03)
849
#define BNO055_ACCEL_LOWPOWER_2     (0X04)
850
#define BNO055_ACCEL_DEEPSUSPEND    (0X05)
851

    
852
/* Mag data output rate*/
853
#define BNO055_MAG_DATA_OUTRATE_2HZ         (0X00)
854
#define BNO055_MAG_DATA_OUTRATE_6HZ         (0X01)
855
#define BNO055_MAG_DATA_OUTRATE_8HZ         (0X02)
856
#define BNO055_MAG_DATA_OUTRATE_10HZ        (0X03)
857
#define BNO055_MAG_DATA_OUTRATE_15HZ        (0X04)
858
#define BNO055_MAG_DATA_OUTRATE_20HZ        (0X05)
859
#define BNO055_MAG_DATA_OUTRATE_25HZ        (0X06)
860
#define BNO055_MAG_DATA_OUTRATE_30HZ        (0X07)
861

    
862
/* Mag Operation mode*/
863
#define BNO055_MAG_OPERATION_MODE_LOWPOWER              (0X00)
864
#define BNO055_MAG_OPERATION_MODE_REGULAR               (0X01)
865
#define BNO055_MAG_OPERATION_MODE_ENHANCED_REGULAR      (0X02)
866
#define BNO055_MAG_OPERATION_MODE_HIGH_ACCURACY         (0X03)
867

    
868
/* Mag power mode*/
869
#define BNO055_MAG_POWER_MODE_NORMAL            (0X00)
870
#define BNO055_MAG_POWER_MODE_SLEEP             (0X01)
871
#define BNO055_MAG_POWER_MODE_SUSPEND           (0X02)
872
#define BNO055_MAG_POWER_MODE_FORCE_MODE        (0X03)
873

    
874
/* Gyro range*/
875
#define BNO055_GYRO_RANGE_2000DPS       (0x00)
876
#define BNO055_GYRO_RANGE_1000DPS       (0x01)
877
#define BNO055_GYRO_RANGE_500DPS        (0x02)
878
#define BNO055_GYRO_RANGE_250DPS        (0x03)
879
#define BNO055_GYRO_RANGE_125DPS        (0x04)
880

    
881
/* Gyro Bandwidth*/
882
#define BNO055_GYRO_BW_523HZ    (0x00)
883
#define BNO055_GYRO_BW_230HZ    (0x01)
884
#define BNO055_GYRO_BW_116HZ    (0x02)
885
#define BNO055_GYRO_BW_47HZ     (0x03)
886
#define BNO055_GYRO_BW_23HZ     (0x04)
887
#define BNO055_GYRO_BW_12HZ     (0x05)
888
#define BNO055_GYRO_BW_64HZ     (0x06)
889
#define BNO055_GYRO_BW_32HZ     (0x07)
890

    
891
/* Gyro power mode*/
892
#define BNO055_GYRO_POWER_MODE_NORMAL               (0X00)
893
#define BNO055_GYRO_POWER_MODE_FASTPOWERUP          (0X01)
894
#define BNO055_GYRO_POWER_MODE_DEEPSUSPEND          (0X02)
895
#define BNO055_GYRO_POWER_MODE_SUSPEND              (0X03)
896
#define BNO055_GYRO_POWER_MODE_ADVANCE_POWERSAVE    (0X04)
897

    
898
/* Accel Sleep Duration */
899
#define BNO055_ACCEL_SLEEP_DURN_0_5MS        (0x05)
900
/* sets sleep duration to 0.5 ms  */
901
#define BNO055_ACCEL_SLEEP_DURN_1MS          (0x06)
902
/* sets sleep duration to 1 ms */
903
#define BNO055_ACCEL_SLEEP_DURN_2MS          (0x07)
904
/* sets sleep duration to 2 ms */
905
#define BNO055_ACCEL_SLEEP_DURN_4MS          (0x08)
906
/* sets sleep duration to 4 ms */
907
#define BNO055_ACCEL_SLEEP_DURN_6MS          (0x09)
908
/* sets sleep duration to 6 ms*/
909
#define BNO055_ACCEL_SLEEP_DURN_10MS         (0x0A)
910
/* sets sleep duration to 10 ms */
911
#define BNO055_ACCEL_SLEEP_DURN_25MS         (0x0B)
912
/* sets sleep duration to 25 ms */
913
#define BNO055_ACCEL_SLEEP_DURN_50MS         (0x0C)
914
/* sets sleep duration to 50 ms */
915
#define BNO055_ACCEL_SLEEP_DURN_100MS        (0x0D)
916
/* sets sleep duration to 100 ms */
917
#define BNO055_ACCEL_SLEEP_DURN_500MS        (0x0E)
918
/* sets sleep duration to 500 ms */
919
#define BNO055_ACCEL_SLEEP_DURN_1S           (0x0F)
920
/* sets sleep duration to 1 s */
921

    
922
/* Gyro Auto sleep duration*/
923
#define BNO055_GYRO_No_AUTOSLPDUR       (0x00)
924
#define BNO055_GYRO_4MS_AUTOSLPDUR      (0x01)
925
#define BNO055_GYRO_5MS_AUTOSLPDUR      (0x02)
926
#define BNO055_GYRO_8MS_AUTOSLPDUR      (0x03)
927
#define BNO055_GYRO_10MS_AUTOSLPDUR     (0x04)
928
#define BNO055_GYRO_15MS_AUTOSLPDUR     (0x05)
929
#define BNO055_GYRO_20MS_AUTOSLPDUR     (0x06)
930
#define BNO055_GYRO_40MS_AUTOSLPDUR     (0x07)
931

    
932
/* Accel Any/No motion axis selection*/
933
#define BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS        (0)
934
#define BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS        (1)
935
#define BNO055_ACCEL_ANY_MOTION_NO_MOTION_Z_AXIS        (2)
936

    
937
/* Accel High g axis selection*/
938
#define BNO055_ACCEL_HIGH_G_X_AXIS      (0)
939
#define BNO055_ACCEL_HIGH_G_Y_AXIS      (1)
940
#define BNO055_ACCEL_HIGH_G_Z_AXIS      (2)
941

    
942
/* Gyro Any motion axis selection*/
943
#define BNO055_GYRO_ANY_MOTION_X_AXIS       (0)
944
#define BNO055_GYRO_ANY_MOTION_Y_AXIS       (1)
945
#define BNO055_GYRO_ANY_MOTION_Z_AXIS       (2)
946

    
947
/* Gyro High rate axis selection*/
948
#define BNO055_GYRO_HIGHRATE_X_AXIS     (0)
949
#define BNO055_GYRO_HIGHRATE_Y_AXIS     (1)
950
#define BNO055_GYRO_HIGHRATE_Z_AXIS     (2)
951

    
952
/* Axis remap values*/
953
#define BNO055_REMAP_X_Y            (0X21)
954
#define BNO055_REMAP_Y_Z            (0X18)
955
#define BNO055_REMAP_Z_X            (0X06)
956
#define BNO055_REMAP_X_Y_Z_TYPE0    (0X12)
957
#define BNO055_REMAP_X_Y_Z_TYPE1    (0X09)
958
#define BNO055_DEFAULT_AXIS         (0X24)
959

    
960
/* Axis remap sign */
961
#define BNO055_REMAP_AXIS_POSITIVE  (0X00)
962
#define BNO055_REMAP_AXIS_NEGATIVE  (0X01)
963

    
964
/* Gyro anymotion and high rate filter configuration */
965
#define BNO055_GYRO_FILTERED_CONFIG     (0x00)
966
#define BNO055_GYRO_UNFILTERED_CONFIG   (0x01)
967

    
968
/* mask definitions*/
969
#define BNO055_SIC_HEX_0_0_F_F_DATA     (0x00FF)
970
/****************************************************/
971
/**\name    ARRAY SIZE DEFINITIONS      */
972
/***************************************************/
973
#define BNO055_REV_ID_SIZE                      (2)
974
#define BNO055_ACCEL_DATA_SIZE                  (2)
975
#define BNO055_ACCEL_XYZ_DATA_SIZE              (6)
976
#define BNO055_MAG_DATA_SIZE                    (2)
977
#define BNO055_MAG_XYZ_DATA_SIZE                (6)
978
#define BNO055_GYRO_DATA_SIZE                   (2)
979
#define BNO055_GYRO_XYZ_DATA_SIZE               (6)
980
#define BNO055_EULER_DATA_SIZE                  (2)
981
#define BNO055_EULER_HRP_DATA_SIZE              (6)
982
#define BNO055_QUATERNION_DATA_SIZE             (2)
983
#define BNO055_QUATERNION_WXYZ_DATA_SIZE        (8)
984
#define BNO055_GRAVITY_DATA_SIZE                (2)
985
#define BNO055_GRAVITY_XYZ_DATA_SIZE            (6)
986
#define BNO055_ACCEL_OFFSET_ARRAY               (6)
987
#define BNO055_MAG_OFFSET_ARRAY                 (6)
988
#define BNO055_GYRO_OFFSET_ARRAY                (6)
989
#define BNO055_SOFT_IRON_CALIBRATION_MATRIX_SIZE        (18)
990

    
991
/*ARRAY INDEX DEFINITIONS*/
992
#define BNO055_SW_ID_LSB                        (0)
993
#define BNO055_SW_ID_MSB                        (1)
994
#define BNO055_SENSOR_DATA_LSB                  (0)
995
#define BNO055_SENSOR_DATA_MSB                  (1)
996
#define BNO055_SENSOR_DATA_EULER_LSB            (0)
997
#define BNO055_SENSOR_DATA_EULER_MSB            (1)
998
#define BNO055_SENSOR_DATA_QUATERNION_LSB       (0)
999
#define BNO055_SENSOR_DATA_QUATERNION_MSB       (1)
1000

    
1001
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_W_LSB            (0)
1002
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_W_MSB            (1)
1003
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_X_LSB            (2)
1004
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_X_MSB            (3)
1005
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_Y_LSB            (4)
1006
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_Y_MSB            (5)
1007
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_Z_LSB            (6)
1008
#define BNO055_SENSOR_DATA_QUATERNION_WXYZ_Z_MSB            (7)
1009

    
1010
#define BNO055_SENSOR_DATA_XYZ_X_LSB                (0)
1011
#define BNO055_SENSOR_DATA_XYZ_X_MSB                (1)
1012
#define BNO055_SENSOR_DATA_XYZ_Y_LSB                (2)
1013
#define BNO055_SENSOR_DATA_XYZ_Y_MSB                (3)
1014
#define BNO055_SENSOR_DATA_XYZ_Z_LSB                (4)
1015
#define BNO055_SENSOR_DATA_XYZ_Z_MSB                (5)
1016

    
1017
#define BNO055_SENSOR_DATA_EULER_HRP_H_LSB          (0)
1018
#define BNO055_SENSOR_DATA_EULER_HRP_H_MSB          (1)
1019
#define BNO055_SENSOR_DATA_EULER_HRP_R_LSB          (2)
1020
#define BNO055_SENSOR_DATA_EULER_HRP_R_MSB          (3)
1021
#define BNO055_SENSOR_DATA_EULER_HRP_P_LSB          (4)
1022
#define BNO055_SENSOR_DATA_EULER_HRP_P_MSB          (5)
1023

    
1024
#define BNO055_SOFT_IRON_CALIB_0_LSB    (0)
1025
#define BNO055_SOFT_IRON_CALIB_0_MSB    (1)
1026
#define BNO055_SOFT_IRON_CALIB_1_LSB    (2)
1027
#define BNO055_SOFT_IRON_CALIB_1_MSB    (3)
1028
#define BNO055_SOFT_IRON_CALIB_2_LSB    (4)
1029
#define BNO055_SOFT_IRON_CALIB_2_MSB    (5)
1030
#define BNO055_SOFT_IRON_CALIB_3_LSB    (6)
1031
#define BNO055_SOFT_IRON_CALIB_3_MSB    (7)
1032
#define BNO055_SOFT_IRON_CALIB_4_LSB    (8)
1033
#define BNO055_SOFT_IRON_CALIB_4_MSB    (9)
1034
#define BNO055_SOFT_IRON_CALIB_5_LSB    (10)
1035
#define BNO055_SOFT_IRON_CALIB_5_MSB    (11)
1036
#define BNO055_SOFT_IRON_CALIB_6_LSB    (12)
1037
#define BNO055_SOFT_IRON_CALIB_6_MSB    (13)
1038
#define BNO055_SOFT_IRON_CALIB_7_LSB    (14)
1039
#define BNO055_SOFT_IRON_CALIB_7_MSB    (15)
1040
#define BNO055_SOFT_IRON_CALIB_8_LSB    (16)
1041
#define BNO055_SOFT_IRON_CALIB_8_MSB    (17)
1042

    
1043
#define BNO055_SENSOR_OFFSET_DATA_X_LSB (0)
1044
#define BNO055_SENSOR_OFFSET_DATA_X_MSB (1)
1045
#define BNO055_SENSOR_OFFSET_DATA_Y_LSB (2)
1046
#define BNO055_SENSOR_OFFSET_DATA_Y_MSB (3)
1047
#define BNO055_SENSOR_OFFSET_DATA_Z_LSB (4)
1048
#define BNO055_SENSOR_OFFSET_DATA_Z_MSB (5)
1049

    
1050
#define BNO055_OFFSET_RADIUS_LSB (0)
1051
#define BNO055_OFFSET_RADIUS_MSB (1)
1052
/*********************************************************/
1053
/**\name PAGE0 DATA REGISTERS DEFINITION */
1054
/*********************************************************/
1055
/* Chip ID */
1056
#define BNO055_CHIP_ID_POS             (0)
1057
#define BNO055_CHIP_ID_MSK             (0xFF)
1058
#define BNO055_CHIP_ID_LEN             (8)
1059
#define BNO055_CHIP_ID_REG             BNO055_CHIP_ID_ADDR
1060

    
1061
/* Accel revision id*/
1062
#define BNO055_ACCEL_REV_ID_POS             (0)
1063
#define BNO055_ACCEL_REV_ID_MSK             (0xFF)
1064
#define BNO055_ACCEL_REV_ID_LEN             (8)
1065
#define BNO055_ACCEL_REV_ID_REG             BNO055_ACCEL_REV_ID_ADDR
1066

    
1067
/* Mag revision id*/
1068
#define BNO055_MAG_REV_ID_POS             (0)
1069
#define BNO055_MAG_REV_ID_MSK             (0xFF)
1070
#define BNO055_MAG_REV_ID_LEN             (8)
1071
#define BNO055_MAG_REV_ID_REG             BNO055_MAG_REV_ID_ADDR
1072

    
1073
/* Gyro revision id*/
1074
#define BNO055_GYRO_REV_ID_POS             (0)
1075
#define BNO055_GYRO_REV_ID_MSK             (0xFF)
1076
#define BNO055_GYRO_REV_ID_LEN             (8)
1077
#define BNO055_GYRO_REV_ID_REG             BNO055_GYRO_REV_ID_ADDR
1078

    
1079
/*Software revision id LSB*/
1080
#define BNO055_SW_REV_ID_LSB_POS             (0)
1081
#define BNO055_SW_REV_ID_LSB_MSK             (0xFF)
1082
#define BNO055_SW_REV_ID_LSB_LEN             (8)
1083
#define BNO055_SW_REV_ID_LSB_REG             BNO055_SW_REV_ID_LSB_ADDR
1084

    
1085
/*Software revision id MSB*/
1086
#define BNO055_SW_REV_ID_MSB_POS             (0)
1087
#define BNO055_SW_REV_ID_MSB_MSK             (0xFF)
1088
#define BNO055_SW_REV_ID_MSB_LEN             (8)
1089
#define BNO055_SW_REV_ID_MSB_REG             BNO055_SW_REV_ID_MSB_ADDR
1090

    
1091
/* BOOTLODER revision id*/
1092
#define BNO055_BL_REV_ID_POS             (0)
1093
#define BNO055_BL_REV_ID_MSK             (0xFF)
1094
#define BNO055_BL_REV_ID_LEN             (8)
1095
#define BNO055_BL_REV_ID_REG             BNO055_BL_REV_ID_ADDR
1096

    
1097
/*Page id*/
1098
#define BNO055_PAGE_ID_POS             (0)
1099
#define BNO055_PAGE_ID_MSK             (0xFF)
1100
#define BNO055_PAGE_ID_LEN             (8)
1101
#define BNO055_PAGE_ID_REG             BNO055_PAGE_ID_ADDR
1102

    
1103
/* Accel data X-LSB register*/
1104
#define BNO055_ACCEL_DATA_X_LSB_VALUEX_POS             (0)
1105
#define BNO055_ACCEL_DATA_X_LSB_VALUEX_MSK             (0xFF)
1106
#define BNO055_ACCEL_DATA_X_LSB_VALUEX_LEN             (8)
1107
#define BNO055_ACCEL_DATA_X_LSB_VALUEX_REG             \
1108
BNO055_ACCEL_DATA_X_LSB_ADDR
1109

    
1110
/* Accel data X-MSB register*/
1111
#define BNO055_ACCEL_DATA_X_MSB_VALUEX_POS             (0)
1112
#define BNO055_ACCEL_DATA_X_MSB_VALUEX_MSK             (0xFF)
1113
#define BNO055_ACCEL_DATA_X_MSB_VALUEX_LEN             (8)
1114
#define BNO055_ACCEL_DATA_X_MSB_VALUEX_REG             \
1115
BNO055_ACCEL_DATA_X_MSB_ADDR
1116

    
1117
/* Accel data Y-LSB register*/
1118
#define BNO055_ACCEL_DATA_Y_LSB_VALUEY_POS             (0)
1119
#define BNO055_ACCEL_DATA_Y_LSB_VALUEY_MSK             (0xFF)
1120
#define BNO055_ACCEL_DATA_Y_LSB_VALUEY_LEN             (8)
1121
#define BNO055_ACCEL_DATA_Y_LSB_VALUEY_REG             \
1122
BNO055_ACCEL_DATA_Y_LSB_ADDR
1123

    
1124
/* Accel data Y-MSB register*/
1125
#define BNO055_ACCEL_DATA_Y_MSB_VALUEY_POS             (0)
1126
#define BNO055_ACCEL_DATA_Y_MSB_VALUEY_MSK             (0xFF)
1127
#define BNO055_ACCEL_DATA_Y_MSB_VALUEY_LEN             (8)
1128
#define BNO055_ACCEL_DATA_Y_MSB_VALUEY_REG             \
1129
BNO055_ACCEL_DATA_Y_MSB_ADDR
1130

    
1131
/* Accel data Z-LSB register*/
1132
#define BNO055_ACCEL_DATA_Z_LSB_VALUEZ_POS      (0)
1133
#define BNO055_ACCEL_DATA_Z_LSB_VALUEZ_MSK      (0xFF)
1134
#define BNO055_ACCEL_DATA_Z_LSB_VALUEZ_LEN      (8)
1135
#define BNO055_ACCEL_DATA_Z_LSB_VALUEZ_REG     \
1136
BNO055_ACCEL_DATA_Z_LSB_ADDR
1137

    
1138
/* Accel data Z-MSB register*/
1139
#define BNO055_ACCEL_DATA_Z_MSB_VALUEZ_POS      (0)
1140
#define BNO055_ACCEL_DATA_Z_MSB_VALUEZ_MSK      (0xFF)
1141
#define BNO055_ACCEL_DATA_Z_MSB_VALUEZ_LEN      (8)
1142
#define BNO055_ACCEL_DATA_Z_MSB_VALUEZ_REG     \
1143
BNO055_ACCEL_DATA_Z_MSB_ADDR
1144

    
1145
/* Mag data X-LSB register*/
1146
#define BNO055_MAG_DATA_X_LSB_VALUEX_POS             (0)
1147
#define BNO055_MAG_DATA_X_LSB_VALUEX_MSK             (0xFF)
1148
#define BNO055_MAG_DATA_X_LSB_VALUEX_LEN             (8)
1149
#define BNO055_MAG_DATA_X_LSB_VALUEX_REG             \
1150
BNO055_MAG_DATA_X_LSB_ADDR
1151

    
1152
/* Mag data X-MSB register*/
1153
#define BNO055_MAG_DATA_X_MSB_VALUEX_POS             (0)
1154
#define BNO055_MAG_DATA_X_MSB_VALUEX_MSK             (0xFF)
1155
#define BNO055_MAG_DATA_X_MSB_VALUEX_LEN             (8)
1156
#define BNO055_MAG_DATA_X_MSB_VALUEX_REG             BNO055_MAG_DATA_X_MSB_ADDR
1157

    
1158
/* Mag data Y-LSB register*/
1159
#define BNO055_MAG_DATA_Y_LSB_VALUEY_POS             (0)
1160
#define BNO055_MAG_DATA_Y_LSB_VALUEY_MSK             (0xFF)
1161
#define BNO055_MAG_DATA_Y_LSB_VALUEY_LEN             (8)
1162
#define BNO055_MAG_DATA_Y_LSB_VALUEY_REG             BNO055_MAG_DATA_Y_LSB_ADDR
1163

    
1164
/* Mag data Y-MSB register*/
1165
#define BNO055_MAG_DATA_Y_MSB_VALUEY_POS             (0)
1166
#define BNO055_MAG_DATA_Y_MSB_VALUEY_MSK             (0xFF)
1167
#define BNO055_MAG_DATA_Y_MSB_VALUEY_LEN             (8)
1168
#define BNO055_MAG_DATA_Y_MSB_VALUEY_REG             BNO055_MAG_DATA_Y_MSB_ADDR
1169

    
1170
/* Mag data Z-LSB register*/
1171
#define BNO055_MAG_DATA_Z_LSB_VALUEZ_POS             (0)
1172
#define BNO055_MAG_DATA_Z_LSB_VALUEZ_MSK             (0xFF)
1173
#define BNO055_MAG_DATA_Z_LSB_VALUEZ_LEN             (8)
1174
#define BNO055_MAG_DATA_Z_LSB_VALUEZ_REG             BNO055_MAG_DATA_Z_LSB_ADDR
1175

    
1176
/* Mag data Z-MSB register*/
1177
#define BNO055_MAG_DATA_Z_MSB_VALUEZ_POS             (0)
1178
#define BNO055_MAG_DATA_Z_MSB_VALUEZ_MSK             (0xFF)
1179
#define BNO055_MAG_DATA_Z_MSB_VALUEZ_LEN             (8)
1180
#define BNO055_MAG_DATA_Z_MSB_VALUEZ_REG             BNO055_MAG_DATA_Z_MSB_ADDR
1181

    
1182
/* Gyro data X-LSB register*/
1183
#define BNO055_GYRO_DATA_X_LSB_VALUEX_POS   (0)
1184
#define BNO055_GYRO_DATA_X_LSB_VALUEX_MSK   (0xFF)
1185
#define BNO055_GYRO_DATA_X_LSB_VALUEX_LEN   (8)
1186
#define BNO055_GYRO_DATA_X_LSB_VALUEX_REG   BNO055_GYRO_DATA_X_LSB_ADDR
1187

    
1188
/* Gyro data X-MSB register*/
1189
#define BNO055_GYRO_DATA_X_MSB_VALUEX_POS   (0)
1190
#define BNO055_GYRO_DATA_X_MSB_VALUEX_MSK   (0xFF)
1191
#define BNO055_GYRO_DATA_X_MSB_VALUEX_LEN   (8)
1192
#define BNO055_GYRO_DATA_X_MSB_VALUEX_REG   BNO055_GYRO_DATA_X_MSB_ADDR
1193

    
1194
/* Gyro data Y-LSB register*/
1195
#define BNO055_GYRO_DATA_Y_LSB_VALUEY_POS   (0)
1196
#define BNO055_GYRO_DATA_Y_LSB_VALUEY_MSK   (0xFF)
1197
#define BNO055_GYRO_DATA_Y_LSB_VALUEY_LEN   (8)
1198
#define BNO055_GYRO_DATA_Y_LSB_VALUEY_REG   BNO055_GYRO_DATA_Y_LSB_ADDR
1199

    
1200
/* Gyro data Y-MSB register*/
1201
#define BNO055_GYRO_DATA_Y_MSB_VALUEY_POS   (0)
1202
#define BNO055_GYRO_DATA_Y_MSB_VALUEY_MSK   (0xFF)
1203
#define BNO055_GYRO_DATA_Y_MSB_VALUEY_LEN   (8)
1204
#define BNO055_GYRO_DATA_Y_MSB_VALUEY_REG   BNO055_GYRO_DATA_Y_MSB_ADDR
1205

    
1206
/* Gyro data Z-LSB register*/
1207
#define BNO055_GYRO_DATA_Z_LSB_VALUEZ_POS   (0)
1208
#define BNO055_GYRO_DATA_Z_LSB_VALUEZ_MSK   (0xFF)
1209
#define BNO055_GYRO_DATA_Z_LSB_VALUEZ_LEN   (8)
1210
#define BNO055_GYRO_DATA_Z_LSB_VALUEZ_REG   BNO055_GYRO_DATA_Z_LSB_ADDR
1211

    
1212
/* Gyro data Z-MSB register*/
1213
#define BNO055_GYRO_DATA_Z_MSB_VALUEZ_POS   (0)
1214
#define BNO055_GYRO_DATA_Z_MSB_VALUEZ_MSK   (0xFF)
1215
#define BNO055_GYRO_DATA_Z_MSB_VALUEZ_LEN   (8)
1216
#define BNO055_GYRO_DATA_Z_MSB_VALUEZ_REG   BNO055_GYRO_DATA_Z_MSB_ADDR
1217

    
1218
/* Euler data HEADING-LSB register*/
1219
#define BNO055_EULER_H_LSB_VALUEH_POS   (0)
1220
#define BNO055_EULER_H_LSB_VALUEH_MSK   (0xFF)
1221
#define BNO055_EULER_H_LSB_VALUEH_LEN   (8)
1222
#define BNO055_EULER_H_LSB_VALUEH_REG  BNO055_EULER_H_LSB_ADDR
1223

    
1224
/* Euler data HEADING-MSB register*/
1225
#define BNO055_EULER_H_MSB_VALUEH_POS  (0)
1226
#define BNO055_EULER_H_MSB_VALUEH_MSK  (0xFF)
1227
#define BNO055_EULER_H_MSB_VALUEH_LEN  (8)
1228
#define BNO055_EULER_H_MSB_VALUEH_REG  BNO055_EULER_H_MSB_ADDR
1229

    
1230
/* Euler data ROLL-LSB register*/
1231
#define BNO055_EULER_R_LSB_VALUER_POS  (0)
1232
#define BNO055_EULER_R_LSB_VALUER_MSK  (0xFF)
1233
#define BNO055_EULER_R_LSB_VALUER_LEN  (8)
1234
#define BNO055_EULER_R_LSB_VALUER_REG  BNO055_EULER_R_LSB_ADDR
1235

    
1236
/* Euler data ROLL-MSB register*/
1237
#define BNO055_EULER_R_MSB_VALUER_POS  (0)
1238
#define BNO055_EULER_R_MSB_VALUER_MSK  (0xFF)
1239
#define BNO055_EULER_R_MSB_VALUER_LEN  (8)
1240
#define BNO055_EULER_R_MSB_VALUER_REG  BNO055_EULER_R_MSB_ADDR
1241

    
1242
/* Euler data PITCH-LSB register*/
1243
#define BNO055_EULER_P_LSB_VALUEP_POS  (0)
1244
#define BNO055_EULER_P_LSB_VALUEP_MSK  (0xFF)
1245
#define BNO055_EULER_P_LSB_VALUEP_LEN  (8)
1246
#define BNO055_EULER_P_LSB_VALUEP_REG  BNO055_EULER_P_LSB_ADDR
1247

    
1248
/* Euler data HEADING-MSB register*/
1249
#define BNO055_EULER_P_MSB_VALUEP_POS  (0)
1250
#define BNO055_EULER_P_MSB_VALUEP_MSK  (0xFF)
1251
#define BNO055_EULER_P_MSB_VALUEP_LEN  (8)
1252
#define BNO055_EULER_P_MSB_VALUEP_REG  BNO055_EULER_P_MSB_ADDR
1253

    
1254
/* Quaternion data W-LSB register*/
1255
#define BNO055_QUATERNION_DATA_W_LSB_VALUEW_POS  (0)
1256
#define BNO055_QUATERNION_DATA_W_LSB_VALUEW_MSK  (0xFF)
1257
#define BNO055_QUATERNION_DATA_W_LSB_VALUEW_LEN  (8)
1258
#define BNO055_QUATERNION_DATA_W_LSB_VALUEW_REG  \
1259
BNO055_QUATERNION_DATA_W_LSB_ADDR
1260

    
1261
/* Quaternion data W-MSB register*/
1262
#define BNO055_QUATERNION_DATA_W_MSB_VALUEW_POS  (0)
1263
#define BNO055_QUATERNION_DATA_W_MSB_VALUEW_MSK  (0xFF)
1264
#define BNO055_QUATERNION_DATA_W_MSB_VALUEW_LEN  (8)
1265
#define BNO055_QUATERNION_DATA_W_MSB_VALUEW_REG  \
1266
BNO055_QUATERNION_DATA_W_MSB_ADDR
1267

    
1268
/* Quaternion data X-LSB register*/
1269
#define BNO055_QUATERNION_DATA_X_LSB_VALUEX_POS  (0)
1270
#define BNO055_QUATERNION_DATA_X_LSB_VALUEX_MSK  (0xFF)
1271
#define BNO055_QUATERNION_DATA_X_LSB_VALUEX_LEN  (8)
1272
#define BNO055_QUATERNION_DATA_X_LSB_VALUEX_REG  \
1273
BNO055_QUATERNION_DATA_X_LSB_ADDR
1274

    
1275
/* Quaternion data X-MSB register*/
1276
#define BNO055_QUATERNION_DATA_X_MSB_VALUEX_POS  (0)
1277
#define BNO055_QUATERNION_DATA_X_MSB_VALUEX_MSK  (0xFF)
1278
#define BNO055_QUATERNION_DATA_X_MSB_VALUEX_LEN  (8)
1279
#define BNO055_QUATERNION_DATA_X_MSB_VALUEX_REG \
1280
BNO055_QUATERNION_DATA_X_MSB_ADDR
1281

    
1282
/* Quaternion data Y-LSB register*/
1283
#define BNO055_QUATERNION_DATA_Y_LSB_VALUEY_POS  (0)
1284
#define BNO055_QUATERNION_DATA_Y_LSB_VALUEY_MSK  (0xFF)
1285
#define BNO055_QUATERNION_DATA_Y_LSB_VALUEY_LEN  (8)
1286
#define BNO055_QUATERNION_DATA_Y_LSB_VALUEY_REG \
1287
BNO055_QUATERNION_DATA_Y_LSB_ADDR
1288

    
1289
/* Quaternion data Y-MSB register*/
1290
#define BNO055_QUATERNION_DATA_Y_MSB_VALUEY_POS  (0)
1291
#define BNO055_QUATERNION_DATA_Y_MSB_VALUEY_MSK  (0xFF)
1292
#define BNO055_QUATERNION_DATA_Y_MSB_VALUEY_LEN  (8)
1293
#define BNO055_QUATERNION_DATA_Y_MSB_VALUEY_REG  \
1294
BNO055_QUATERNION_DATA_Y_MSB_ADDR
1295

    
1296
/* Quaternion data Z-LSB register*/
1297
#define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ_POS  (0)
1298
#define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ_MSK  (0xFF)
1299
#define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ_LEN  (8)
1300
#define BNO055_QUATERNION_DATA_Z_LSB_VALUEZ_REG \
1301
BNO055_QUATERNION_DATA_Z_LSB_ADDR
1302

    
1303
/* Quaternion data Z-MSB register*/
1304
#define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ_POS  (0)
1305
#define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ_MSK  (0xFF)
1306
#define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ_LEN  (8)
1307
#define BNO055_QUATERNION_DATA_Z_MSB_VALUEZ_REG  \
1308
BNO055_QUATERNION_DATA_Z_MSB_ADDR
1309

    
1310
/* Linear acceleration data X-LSB register*/
1311
#define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX_POS  (0)
1312
#define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX_MSK  (0xFF)
1313
#define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX_LEN  (8)
1314
#define BNO055_LINEAR_ACCEL_DATA_X_LSB_VALUEX_REG  \
1315
BNO055_LINEAR_ACCEL_DATA_X_LSB_ADDR
1316

    
1317
/* Linear acceleration data X-MSB register*/
1318
#define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX_POS  (0)
1319
#define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX_MSK  (0xFF)
1320
#define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX_LEN  (8)
1321
#define BNO055_LINEAR_ACCEL_DATA_X_MSB_VALUEX_REG  \
1322
BNO055_LINEAR_ACCEL_DATA_X_MSB_ADDR
1323

    
1324
/* Linear acceleration data Y-LSB register*/
1325
#define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY_POS  (0)
1326
#define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY_MSK  (0xFF)
1327
#define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY_LEN  (8)
1328
#define BNO055_LINEAR_ACCEL_DATA_Y_LSB_VALUEY_REG  \
1329
BNO055_LINEAR_ACCEL_DATA_Y_LSB_ADDR
1330

    
1331
/* Linear acceleration data Y-MSB register*/
1332
#define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY_POS  (0)
1333
#define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY_MSK  (0xFF)
1334
#define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY_LEN  (8)
1335
#define BNO055_LINEAR_ACCEL_DATA_Y_MSB_VALUEY_REG  \
1336
BNO055_LINEAR_ACCEL_DATA_Y_MSB_ADDR
1337

    
1338
/* Linear acceleration data Z-LSB register*/
1339
#define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ_POS  (0)
1340
#define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ_MSK  (0xFF)
1341
#define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ_LEN  (8)
1342
#define BNO055_LINEAR_ACCEL_DATA_Z_LSB_VALUEZ_REG \
1343
BNO055_LINEAR_ACCEL_DATA_Z_LSB_ADDR
1344

    
1345
/* Linear acceleration data Z-MSB register*/
1346
#define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ_POS  (0)
1347
#define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ_MSK  (0xFF)
1348
#define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ_LEN  (8)
1349
#define BNO055_LINEAR_ACCEL_DATA_Z_MSB_VALUEZ_REG  \
1350
BNO055_LINEAR_ACCEL_DATA_Z_MSB_ADDR
1351

    
1352
/* Gravity data X-LSB register*/
1353
#define BNO055_GRAVITY_DATA_X_LSB_VALUEX_POS  (0)
1354
#define BNO055_GRAVITY_DATA_X_LSB_VALUEX_MSK  (0xFF)
1355
#define BNO055_GRAVITY_DATA_X_LSB_VALUEX_LEN  (8)
1356
#define BNO055_GRAVITY_DATA_X_LSB_VALUEX_REG  \
1357
BNO055_GRAVITY_DATA_X_LSB_ADDR
1358

    
1359
/* Gravity data X-MSB register*/
1360
#define BNO055_GRAVITY_DATA_X_MSB_VALUEX_POS  (0)
1361
#define BNO055_GRAVITY_DATA_X_MSB_VALUEX_MSK  (0xFF)
1362
#define BNO055_GRAVITY_DATA_X_MSB_VALUEX_LEN  (8)
1363
#define BNO055_GRAVITY_DATA_X_MSB_VALUEX_REG  \
1364
BNO055_GRAVITY_DATA_X_MSB_ADDR
1365

    
1366
/* Gravity data Y-LSB register*/
1367
#define BNO055_GRAVITY_DATA_Y_LSB_VALUEY_POS  (0)
1368
#define BNO055_GRAVITY_DATA_Y_LSB_VALUEY_MSK  (0xFF)
1369
#define BNO055_GRAVITY_DATA_Y_LSB_VALUEY_LEN  (8)
1370
#define BNO055_GRAVITY_DATA_Y_LSB_VALUEY_REG  \
1371
BNO055_GRAVITY_DATA_Y_LSB_ADDR
1372

    
1373
/* Gravity data Y-MSB register*/
1374
#define BNO055_GRAVITY_DATA_Y_MSB_VALUEY_POS  (0)
1375
#define BNO055_GRAVITY_DATA_Y_MSB_VALUEY_MSK  (0xFF)
1376
#define BNO055_GRAVITY_DATA_Y_MSB_VALUEY_LEN  (8)
1377
#define BNO055_GRAVITY_DATA_Y_MSB_VALUEY_REG  \
1378
BNO055_GRAVITY_DATA_Y_MSB_ADDR
1379

    
1380
/* Gravity data Z-LSB register*/
1381
#define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ_POS  (0)
1382
#define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ_MSK  (0xFF)
1383
#define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ_LEN  (8)
1384
#define BNO055_GRAVITY_DATA_Z_LSB_VALUEZ_REG  \
1385
BNO055_GRAVITY_DATA_Z_LSB_ADDR
1386

    
1387
/* Gravity data Z-MSB register*/
1388
#define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ_POS  (0)
1389
#define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ_MSK  (0xFF)
1390
#define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ_LEN  (8)
1391
#define BNO055_GRAVITY_DATA_Z_MSB_VALUEZ_REG  \
1392
BNO055_GRAVITY_DATA_Z_MSB_ADDR
1393

    
1394
/* Temperature register*/
1395
#define BNO055_TEMP_POS             (0)
1396
#define BNO055_TEMP_MSK             (0xFF)
1397
#define BNO055_TEMP_LEN             (8)
1398
#define BNO055_TEMP_REG             BNO055_TEMP_ADDR
1399

    
1400
/*Mag_Calib status register*/
1401
#define BNO055_MAG_CALIB_STAT_POS             (0)
1402
#define BNO055_MAG_CALIB_STAT_MSK             (0X03)
1403
#define BNO055_MAG_CALIB_STAT_LEN             (2)
1404
#define BNO055_MAG_CALIB_STAT_REG             BNO055_CALIB_STAT_ADDR
1405

    
1406
/*Acc_Calib status register*/
1407
#define BNO055_ACCEL_CALIB_STAT_POS             (2)
1408
#define BNO055_ACCEL_CALIB_STAT_MSK             (0X0C)
1409
#define BNO055_ACCEL_CALIB_STAT_LEN             (2)
1410
#define BNO055_ACCEL_CALIB_STAT_REG             BNO055_CALIB_STAT_ADDR
1411

    
1412
/*Gyro_Calib status register*/
1413
#define BNO055_GYRO_CALIB_STAT_POS             (4)
1414
#define BNO055_GYRO_CALIB_STAT_MSK             (0X30)
1415
#define BNO055_GYRO_CALIB_STAT_LEN             (2)
1416
#define BNO055_GYRO_CALIB_STAT_REG             BNO055_CALIB_STAT_ADDR
1417

    
1418
/*Sys_Calib status register*/
1419
#define BNO055_SYS_CALIB_STAT_POS             (6)
1420
#define BNO055_SYS_CALIB_STAT_MSK             (0XC0)
1421
#define BNO055_SYS_CALIB_STAT_LEN             (2)
1422
#define BNO055_SYS_CALIB_STAT_REG             BNO055_CALIB_STAT_ADDR
1423

    
1424
/*ST_ACCEL register*/
1425
#define BNO055_SELFTEST_ACCEL_POS             (0)
1426
#define BNO055_SELFTEST_ACCEL_MSK             (0X01)
1427
#define BNO055_SELFTEST_ACCEL_LEN             (1)
1428
#define BNO055_SELFTEST_ACCEL_REG             BNO055_SELFTEST_RESULT_ADDR
1429

    
1430
/*ST_MAG register*/
1431
#define BNO055_SELFTEST_MAG_POS             (1)
1432
#define BNO055_SELFTEST_MAG_MSK             (0X02)
1433
#define BNO055_SELFTEST_MAG_LEN             (1)
1434
#define BNO055_SELFTEST_MAG_REG             BNO055_SELFTEST_RESULT_ADDR
1435

    
1436
/*ST_GYRO register*/
1437
#define BNO055_SELFTEST_GYRO_POS             (2)
1438
#define BNO055_SELFTEST_GYRO_MSK             (0X04)
1439
#define BNO055_SELFTEST_GYRO_LEN             (1)
1440
#define BNO055_SELFTEST_GYRO_REG             BNO055_SELFTEST_RESULT_ADDR
1441

    
1442
/*ST_MCU register*/
1443
#define BNO055_SELFTEST_MCU_POS             (3)
1444
#define BNO055_SELFTEST_MCU_MSK             (0X08)
1445
#define BNO055_SELFTEST_MCU_LEN             (1)
1446
#define BNO055_SELFTEST_MCU_REG             BNO055_SELFTEST_RESULT_ADDR
1447

    
1448
/*Interrupt status registers*/
1449
#define BNO055_INTR_STAT_GYRO_ANY_MOTION_POS        (2)
1450
#define BNO055_INTR_STAT_GYRO_ANY_MOTION_MSK        (0X04)
1451
#define BNO055_INTR_STAT_GYRO_ANY_MOTION_LEN        (1)
1452
#define BNO055_INTR_STAT_GYRO_ANY_MOTION_REG        BNO055_INTR_STAT_ADDR
1453

    
1454
#define BNO055_INTR_STAT_GYRO_HIGHRATE_POS      (3)
1455
#define BNO055_INTR_STAT_GYRO_HIGHRATE_MSK      (0X08)
1456
#define BNO055_INTR_STAT_GYRO_HIGHRATE_LEN      (1)
1457
#define BNO055_INTR_STAT_GYRO_HIGHRATE_REG      BNO055_INTR_STAT_ADDR
1458

    
1459
#define BNO055_INTR_STAT_ACCEL_HIGH_G_POS       (5)
1460
#define BNO055_INTR_STAT_ACCEL_HIGH_G_MSK       (0X20)
1461
#define BNO055_INTR_STAT_ACCEL_HIGH_G_LEN       (1)
1462
#define BNO055_INTR_STAT_ACCEL_HIGH_G_REG       BNO055_INTR_STAT_ADDR
1463

    
1464
#define BNO055_INTR_STAT_ACCEL_ANY_MOTION_POS       (6)
1465
#define BNO055_INTR_STAT_ACCEL_ANY_MOTION_MSK       (0X40)
1466
#define BNO055_INTR_STAT_ACCEL_ANY_MOTION_LEN       (1)
1467
#define BNO055_INTR_STAT_ACCEL_ANY_MOTION_REG       BNO055_INTR_STAT_ADDR
1468

    
1469
#define BNO055_INTR_STAT_ACCEL_NO_MOTION_POS        (7)
1470
#define BNO055_INTR_STAT_ACCEL_NO_MOTION_MSK        (0X80)
1471
#define BNO055_INTR_STAT_ACCEL_NO_MOTION_LEN        (1)
1472
#define BNO055_INTR_STAT_ACCEL_NO_MOTION_REG        BNO055_INTR_STAT_ADDR
1473

    
1474
/* system clock status register*/
1475
#define BNO055_SYS_MAIN_CLK_POS     (0)
1476
#define BNO055_SYS_MAIN_CLK_MSK     (0X10)
1477
#define BNO055_SYS_MAIN_CLK_LEN     (1)
1478
#define BNO055_SYS_MAIN_CLK_REG     BNO055_SYS_CLK_STAT_ADDR
1479

    
1480
/* System registers*/
1481
#define BNO055_SYS_STAT_CODE_POS        (0)
1482
#define BNO055_SYS_STAT_CODE_MSK        (0XFF)
1483
#define BNO055_SYS_STAT_CODE_LEN        (8)
1484
#define BNO055_SYS_STAT_CODE_REG        BNO055_SYS_STAT_ADDR
1485

    
1486
#define BNO055_SYS_ERROR_CODE_POS           (0)
1487
#define BNO055_SYS_ERROR_CODE_MSK           (0XFF)
1488
#define BNO055_SYS_ERROR_CODE_LEN           (8)
1489
#define BNO055_SYS_ERROR_CODE_REG           BNO055_SYS_ERR_ADDR
1490

    
1491
/* Accel_Unit register*/
1492
#define BNO055_ACCEL_UNIT_POS             (0)
1493
#define BNO055_ACCEL_UNIT_MSK             (0X01)
1494
#define BNO055_ACCEL_UNIT_LEN             (1)
1495
#define BNO055_ACCEL_UNIT_REG             BNO055_UNIT_SEL_ADDR
1496

    
1497
/* Gyro_Unit register*/
1498
#define BNO055_GYRO_UNIT_POS             (1)
1499
#define BNO055_GYRO_UNIT_MSK             (0X02)
1500
#define BNO055_GYRO_UNIT_LEN             (1)
1501
#define BNO055_GYRO_UNIT_REG             BNO055_UNIT_SEL_ADDR
1502

    
1503
/* Euler_Unit register*/
1504
#define BNO055_EULER_UNIT_POS             (2)
1505
#define BNO055_EULER_UNIT_MSK             (0X04)
1506
#define BNO055_EULER_UNIT_LEN             (1)
1507
#define BNO055_EULER_UNIT_REG             BNO055_UNIT_SEL_ADDR
1508

    
1509
/* Tilt_Unit register*/
1510
#define BNO055_TILT_UNIT_POS             (3)
1511
#define BNO055_TILT_UNIT_MSK             (0X08)
1512
#define BNO055_TILT_UNIT_LEN             (1)
1513
#define BNO055_TILT_UNIT_REG             BNO055_UNIT_SEL_ADDR
1514

    
1515
/* Temperature_Unit register*/
1516
#define BNO055_TEMP_UNIT_POS             (4)
1517
#define BNO055_TEMP_UNIT_MSK             (0X10)
1518
#define BNO055_TEMP_UNIT_LEN             (1)
1519
#define BNO055_TEMP_UNIT_REG             BNO055_UNIT_SEL_ADDR
1520

    
1521
/* ORI android-windows register*/
1522
#define BNO055_DATA_OUTPUT_FORMAT_POS             (7)
1523
#define BNO055_DATA_OUTPUT_FORMAT_MSK             (0X80)
1524
#define BNO055_DATA_OUTPUT_FORMAT_LEN             (1)
1525
#define BNO055_DATA_OUTPUT_FORMAT_REG             BNO055_UNIT_SEL_ADDR
1526
/*Operation Mode data register*/
1527
#define BNO055_OPERATION_MODE_POS           (0)
1528
#define BNO055_OPERATION_MODE_MSK           (0X0F)
1529
#define BNO055_OPERATION_MODE_LEN           (4)
1530
#define BNO055_OPERATION_MODE_REG           BNO055_OPR_MODE_ADDR
1531
/* Power Mode register*/
1532
#define BNO055_POWER_MODE_POS             (0)
1533
#define BNO055_POWER_MODE_MSK             (0X03)
1534
#define BNO055_POWER_MODE_LEN             (2)
1535
#define BNO055_POWER_MODE_REG             BNO055_PWR_MODE_ADDR
1536

    
1537
/*Self Test register*/
1538
#define BNO055_SELFTEST_POS         (0)
1539
#define BNO055_SELFTEST_MSK         (0X01)
1540
#define BNO055_SELFTEST_LEN         (1)
1541
#define BNO055_SELFTEST_REG         BNO055_SYS_TRIGGER_ADDR
1542

    
1543
/* RST_SYS register*/
1544
#define BNO055_SYS_RST_POS             (5)
1545
#define BNO055_SYS_RST_MSK             (0X20)
1546
#define BNO055_SYS_RST_LEN             (1)
1547
#define BNO055_SYS_RST_REG             BNO055_SYS_TRIGGER_ADDR
1548

    
1549
/* RST_INT register*/
1550
#define BNO055_INTR_RST_POS             (6)
1551
#define BNO055_INTR_RST_MSK             (0X40)
1552
#define BNO055_INTR_RST_LEN             (1)
1553
#define BNO055_INTR_RST_REG             BNO055_SYS_TRIGGER_ADDR
1554

    
1555
/* CLK_SRC register*/
1556
#define BNO055_CLK_SRC_POS             (7)
1557
#define BNO055_CLK_SRC_MSK             (0X80)
1558
#define BNO055_CLK_SRC_LEN             (1)
1559
#define BNO055_CLK_SRC_REG             BNO055_SYS_TRIGGER_ADDR
1560

    
1561
/* Temp source register*/
1562
#define BNO055_TEMP_SOURCE_POS      (0)
1563
#define BNO055_TEMP_SOURCE_MSK      (0X03)
1564
#define BNO055_TEMP_SOURCE_LEN      (2)
1565
#define BNO055_TEMP_SOURCE_REG      BNO055_TEMP_SOURCE_ADDR
1566

    
1567
/* Axis remap value register*/
1568
#define BNO055_REMAP_AXIS_VALUE_POS     (0)
1569
#define BNO055_REMAP_AXIS_VALUE_MSK     (0X3F)
1570
#define BNO055_REMAP_AXIS_VALUE_LEN     (6)
1571
#define BNO055_REMAP_AXIS_VALUE_REG     BNO055_AXIS_MAP_CONFIG_ADDR
1572

    
1573
/* Axis sign value register*/
1574
#define BNO055_REMAP_Z_SIGN_POS     (0)
1575
#define BNO055_REMAP_Z_SIGN_MSK     (0X01)
1576
#define BNO055_REMAP_Z_SIGN_LEN     (1)
1577
#define BNO055_REMAP_Z_SIGN_REG     BNO055_AXIS_MAP_SIGN_ADDR
1578

    
1579
#define BNO055_REMAP_Y_SIGN_POS     (1)
1580
#define BNO055_REMAP_Y_SIGN_MSK     (0X02)
1581
#define BNO055_REMAP_Y_SIGN_LEN     (1)
1582
#define BNO055_REMAP_Y_SIGN_REG     BNO055_AXIS_MAP_SIGN_ADDR
1583

    
1584
#define BNO055_REMAP_X_SIGN_POS     (2)
1585
#define BNO055_REMAP_X_SIGN_MSK     (0X04)
1586
#define BNO055_REMAP_X_SIGN_LEN     (1)
1587
#define BNO055_REMAP_X_SIGN_REG     BNO055_AXIS_MAP_SIGN_ADDR
1588

    
1589
/* Soft Iron Calibration matrix register*/
1590
#define BNO055_SIC_MATRIX_0_LSB_POS     (0)
1591
#define BNO055_SIC_MATRIX_0_LSB_MSK     (0XFF)
1592
#define BNO055_SIC_MATRIX_0_LSB_LEN     (8)
1593
#define BNO055_SIC_MATRIX_0_LSB_REG     BNO055_SIC_MATRIX_0_LSB_ADDR
1594

    
1595
#define BNO055_SIC_MATRIX_0_MSB_POS     (0)
1596
#define BNO055_SIC_MATRIX_0_MSB_MSK     (0XFF)
1597
#define BNO055_SIC_MATRIX_0_MSB_LEN     (8)
1598
#define BNO055_SIC_MATRIX_0_MSB_REG     BNO055_SIC_MATRIX_0_MSB_ADDR
1599

    
1600
#define BNO055_SIC_MATRIX_1_LSB_POS     (0)
1601
#define BNO055_SIC_MATRIX_1_LSB_MSK     (0XFF)
1602
#define BNO055_SIC_MATRIX_1_LSB_LEN     (8)
1603
#define BNO055_SIC_MATRIX_1_LSB_REG     BNO055_SIC_MATRIX_1_LSB_ADDR
1604

    
1605
#define BNO055_SIC_MATRIX_1_MSB_POS     (0)
1606
#define BNO055_SIC_MATRIX_1_MSB_MSK     (0XFF)
1607
#define BNO055_SIC_MATRIX_1_MSB_LEN     (8)
1608
#define BNO055_SIC_MATRIX_1_MSB_REG     BNO055_SIC_MATRIX_1_MSB_ADDR
1609

    
1610
#define BNO055_SIC_MATRIX_2_LSB_POS     (0)
1611
#define BNO055_SIC_MATRIX_2_LSB_MSK     (0XFF)
1612
#define BNO055_SIC_MATRIX_2_LSB_LEN     (8)
1613
#define BNO055_SIC_MATRIX_2_LSB_REG     BNO055_SIC_MATRIX_2_LSB_ADDR
1614

    
1615
#define BNO055_SIC_MATRIX_2_MSB_POS     (0)
1616
#define BNO055_SIC_MATRIX_2_MSB_MSK     (0XFF)
1617
#define BNO055_SIC_MATRIX_2_MSB_LEN     (8)
1618
#define BNO055_SIC_MATRIX_2_MSB_REG     BNO055_SIC_MATRIX_2_MSB_ADDR
1619

    
1620
#define BNO055_SIC_MATRIX_3_LSB_POS     (0)
1621
#define BNO055_SIC_MATRIX_3_LSB_MSK     (0XFF)
1622
#define BNO055_SIC_MATRIX_3_LSB_LEN     (8)
1623
#define BNO055_SIC_MATRIX_3_LSB_REG     BNO055_SIC_MATRIX_3_LSB_ADDR
1624

    
1625
#define BNO055_SIC_MATRIX_3_MSB_POS     (0)
1626
#define BNO055_SIC_MATRIX_3_MSB_MSK     (0XFF)
1627
#define BNO055_SIC_MATRIX_3_MSB_LEN     (8)
1628
#define BNO055_SIC_MATRIX_3_MSB_REG     BNO055_SIC_MATRIX_3_MSB_ADDR
1629

    
1630
#define BNO055_SIC_MATRIX_4_LSB_POS     (0)
1631
#define BNO055_SIC_MATRIX_4_LSB_MSK     (0XFF)
1632
#define BNO055_SIC_MATRIX_4_LSB_LEN     (8)
1633
#define BNO055_SIC_MATRIX_4_LSB_REG     BNO055_SIC_MATRIX_4_LSB_ADDR
1634

    
1635
#define BNO055_SIC_MATRIX_4_MSB_POS     (0)
1636
#define BNO055_SIC_MATRIX_4_MSB_MSK     (0XFF)
1637
#define BNO055_SIC_MATRIX_4_MSB_LEN     (8)
1638
#define BNO055_SIC_MATRIX_4_MSB_REG     BNO055_SIC_MATRIX_4_MSB_ADDR
1639

    
1640
#define BNO055_SIC_MATRIX_5_LSB_POS     (0)
1641
#define BNO055_SIC_MATRIX_5_LSB_MSK     (0XFF)
1642
#define BNO055_SIC_MATRIX_5_LSB_LEN     (8)
1643
#define BNO055_SIC_MATRIX_5_LSB_REG     BNO055_SIC_MATRIX_5_LSB_ADDR
1644

    
1645
#define BNO055_SIC_MATRIX_5_MSB_POS     (0)
1646
#define BNO055_SIC_MATRIX_5_MSB_MSK     (0XFF)
1647
#define BNO055_SIC_MATRIX_5_MSB_LEN     (8)
1648
#define BNO055_SIC_MATRIX_5_MSB_REG     BNO055_SIC_MATRIX_5_MSB_ADDR
1649

    
1650
#define BNO055_SIC_MATRIX_6_LSB_POS     (0)
1651
#define BNO055_SIC_MATRIX_6_LSB_MSK     (0XFF)
1652
#define BNO055_SIC_MATRIX_6_LSB_LEN     (8)
1653
#define BNO055_SIC_MATRIX_6_LSB_REG     BNO055_SIC_MATRIX_6_LSB_ADDR
1654

    
1655
#define BNO055_SIC_MATRIX_6_MSB_POS     (0)
1656
#define BNO055_SIC_MATRIX_6_MSB_MSK     (0XFF)
1657
#define BNO055_SIC_MATRIX_6_MSB_LEN     (8)
1658
#define BNO055_SIC_MATRIX_6_MSB_REG     BNO055_SIC_MATRIX_6_MSB_ADDR
1659

    
1660
#define BNO055_SIC_MATRIX_7_LSB_POS     (0)
1661
#define BNO055_SIC_MATRIX_7_LSB_MSK     (0XFF)
1662
#define BNO055_SIC_MATRIX_7_LSB_LEN     (8)
1663
#define BNO055_SIC_MATRIX_7_LSB_REG     BNO055_SIC_MATRIX_7_LSB_ADDR
1664

    
1665
#define BNO055_SIC_MATRIX_7_MSB_POS     (0)
1666
#define BNO055_SIC_MATRIX_7_MSB_MSK     (0XFF)
1667
#define BNO055_SIC_MATRIX_7_MSB_LEN     (8)
1668
#define BNO055_SIC_MATRIX_7_MSB_REG     BNO055_SIC_MATRIX_7_MSB_ADDR
1669

    
1670
#define BNO055_SIC_MATRIX_8_LSB_POS     (0)
1671
#define BNO055_SIC_MATRIX_8_LSB_MSK     (0XFF)
1672
#define BNO055_SIC_MATRIX_8_LSB_LEN     (8)
1673
#define BNO055_SIC_MATRIX_8_LSB_REG     BNO055_SIC_MATRIX_8_LSB_ADDR
1674

    
1675
#define BNO055_SIC_MATRIX_8_MSB_POS     (0)
1676
#define BNO055_SIC_MATRIX_8_MSB_MSK     (0XFF)
1677
#define BNO055_SIC_MATRIX_8_MSB_LEN     (8)
1678
#define BNO055_SIC_MATRIX_8_MSB_REG     BNO055_SIC_MATRIX_8_MSB_ADDR
1679

    
1680
/*Accel Offset registers*/
1681
#define BNO055_ACCEL_OFFSET_X_LSB_POS       (0)
1682
#define BNO055_ACCEL_OFFSET_X_LSB_MSK       (0XFF)
1683
#define BNO055_ACCEL_OFFSET_X_LSB_LEN       (8)
1684
#define BNO055_ACCEL_OFFSET_X_LSB_REG       BNO055_ACCEL_OFFSET_X_LSB_ADDR
1685

    
1686
#define BNO055_ACCEL_OFFSET_X_MSB_POS       (0)
1687
#define BNO055_ACCEL_OFFSET_X_MSB_MSK       (0XFF)
1688
#define BNO055_ACCEL_OFFSET_X_MSB_LEN       (8)
1689
#define BNO055_ACCEL_OFFSET_X_MSB_REG       BNO055_ACCEL_OFFSET_X_MSB_ADDR
1690

    
1691
#define BNO055_ACCEL_OFFSET_Y_LSB_POS       (0)
1692
#define BNO055_ACCEL_OFFSET_Y_LSB_MSK       (0XFF)
1693
#define BNO055_ACCEL_OFFSET_Y_LSB_LEN       (8)
1694
#define BNO055_ACCEL_OFFSET_Y_LSB_REG       BNO055_ACCEL_OFFSET_Y_LSB_ADDR
1695

    
1696
#define BNO055_ACCEL_OFFSET_Y_MSB_POS       (0)
1697
#define BNO055_ACCEL_OFFSET_Y_MSB_MSK       (0XFF)
1698
#define BNO055_ACCEL_OFFSET_Y_MSB_LEN       (8)
1699
#define BNO055_ACCEL_OFFSET_Y_MSB_REG       BNO055_ACCEL_OFFSET_Y_MSB_ADDR
1700

    
1701
#define BNO055_ACCEL_OFFSET_Z_LSB_POS       (0)
1702
#define BNO055_ACCEL_OFFSET_Z_LSB_MSK       (0XFF)
1703
#define BNO055_ACCEL_OFFSET_Z_LSB_LEN       (8)
1704
#define BNO055_ACCEL_OFFSET_Z_LSB_REG       BNO055_ACCEL_OFFSET_Z_LSB_ADDR
1705

    
1706
#define BNO055_ACCEL_OFFSET_Z_MSB_POS       (0)
1707
#define BNO055_ACCEL_OFFSET_Z_MSB_MSK       (0XFF)
1708
#define BNO055_ACCEL_OFFSET_Z_MSB_LEN       (8)
1709
#define BNO055_ACCEL_OFFSET_Z_MSB_REG       BNO055_ACCEL_OFFSET_Z_MSB_ADDR
1710

    
1711
/*Mag Offset registers*/
1712
#define BNO055_MAG_OFFSET_X_LSB_POS     (0)
1713
#define BNO055_MAG_OFFSET_X_LSB_MSK     (0XFF)
1714
#define BNO055_MAG_OFFSET_X_LSB_LEN     (8)
1715
#define BNO055_MAG_OFFSET_X_LSB_REG     BNO055_MAG_OFFSET_X_LSB_ADDR
1716

    
1717
#define BNO055_MAG_OFFSET_X_MSB_POS     (0)
1718
#define BNO055_MAG_OFFSET_X_MSB_MSK     (0XFF)
1719
#define BNO055_MAG_OFFSET_X_MSB_LEN     (8)
1720
#define BNO055_MAG_OFFSET_X_MSB_REG     BNO055_MAG_OFFSET_X_MSB_ADDR
1721

    
1722
#define BNO055_MAG_OFFSET_Y_LSB_POS     (0)
1723
#define BNO055_MAG_OFFSET_Y_LSB_MSK     (0XFF)
1724
#define BNO055_MAG_OFFSET_Y_LSB_LEN     (8)
1725
#define BNO055_MAG_OFFSET_Y_LSB_REG     BNO055_MAG_OFFSET_Y_LSB_ADDR
1726

    
1727
#define BNO055_MAG_OFFSET_Y_MSB_POS     (0)
1728
#define BNO055_MAG_OFFSET_Y_MSB_MSK     (0XFF)
1729
#define BNO055_MAG_OFFSET_Y_MSB_LEN     (8)
1730
#define BNO055_MAG_OFFSET_Y_MSB_REG     BNO055_MAG_OFFSET_Y_MSB_ADDR
1731

    
1732
#define BNO055_MAG_OFFSET_Z_LSB_POS     (0)
1733
#define BNO055_MAG_OFFSET_Z_LSB_MSK     (0XFF)
1734
#define BNO055_MAG_OFFSET_Z_LSB_LEN     (8)
1735
#define BNO055_MAG_OFFSET_Z_LSB_REG     BNO055_MAG_OFFSET_Z_LSB_ADDR
1736

    
1737
#define BNO055_MAG_OFFSET_Z_MSB_POS     (0)
1738
#define BNO055_MAG_OFFSET_Z_MSB_MSK     (0XFF)
1739
#define BNO055_MAG_OFFSET_Z_MSB_LEN     (8)
1740
#define BNO055_MAG_OFFSET_Z_MSB_REG     BNO055_MAG_OFFSET_Z_MSB_ADDR
1741

    
1742
/* Gyro Offset registers*/
1743
#define BNO055_GYRO_OFFSET_X_LSB_POS        (0)
1744
#define BNO055_GYRO_OFFSET_X_LSB_MSK        (0XFF)
1745
#define BNO055_GYRO_OFFSET_X_LSB_LEN        (8)
1746
#define BNO055_GYRO_OFFSET_X_LSB_REG        BNO055_GYRO_OFFSET_X_LSB_ADDR
1747

    
1748
#define BNO055_GYRO_OFFSET_X_MSB_POS        (0)
1749
#define BNO055_GYRO_OFFSET_X_MSB_MSK        (0XFF)
1750
#define BNO055_GYRO_OFFSET_X_MSB_LEN        (8)
1751
#define BNO055_GYRO_OFFSET_X_MSB_REG        BNO055_GYRO_OFFSET_X_MSB_ADDR
1752

    
1753
#define BNO055_GYRO_OFFSET_Y_LSB_POS        (0)
1754
#define BNO055_GYRO_OFFSET_Y_LSB_MSK        (0XFF)
1755
#define BNO055_GYRO_OFFSET_Y_LSB_LEN        (8)
1756
#define BNO055_GYRO_OFFSET_Y_LSB_REG        BNO055_GYRO_OFFSET_Y_LSB_ADDR
1757

    
1758
#define BNO055_GYRO_OFFSET_Y_MSB_POS        (0)
1759
#define BNO055_GYRO_OFFSET_Y_MSB_MSK        (0XFF)
1760
#define BNO055_GYRO_OFFSET_Y_MSB_LEN        (8)
1761
#define BNO055_GYRO_OFFSET_Y_MSB_REG        BNO055_GYRO_OFFSET_Y_MSB_ADDR
1762

    
1763
#define BNO055_GYRO_OFFSET_Z_LSB_POS        (0)
1764
#define BNO055_GYRO_OFFSET_Z_LSB_MSK        (0XFF)
1765
#define BNO055_GYRO_OFFSET_Z_LSB_LEN        (8)
1766
#define BNO055_GYRO_OFFSET_Z_LSB_REG        BNO055_GYRO_OFFSET_Z_LSB_ADDR
1767

    
1768
#define BNO055_GYRO_OFFSET_Z_MSB_POS        (0)
1769
#define BNO055_GYRO_OFFSET_Z_MSB_MSK        (0XFF)
1770
#define BNO055_GYRO_OFFSET_Z_MSB_LEN        (8)
1771
#define BNO055_GYRO_OFFSET_Z_MSB_REG        BNO055_GYRO_OFFSET_Z_MSB_ADDR
1772

    
1773
/* Radius register definition*/
1774
#define BNO055_ACCEL_RADIUS_LSB_POS     (0)
1775
#define BNO055_ACCEL_RADIUS_LSB_MSK     (0XFF)
1776
#define BNO055_ACCEL_RADIUS_LSB_LEN     (8)
1777
#define BNO055_ACCEL_RADIUS_LSB_REG     BNO055_ACCEL_RADIUS_LSB_ADDR
1778

    
1779
#define BNO055_ACCEL_RADIUS_MSB_POS     (0)
1780
#define BNO055_ACCEL_RADIUS_MSB_MSK     (0XFF)
1781
#define BNO055_ACCEL_RADIUS_MSB_LEN     (8)
1782
#define BNO055_ACCEL_RADIUS_MSB_REG     BNO055_ACCEL_RADIUS_MSB_ADDR
1783

    
1784
#define BNO055_MAG_RADIUS_LSB_POS       (0)
1785
#define BNO055_MAG_RADIUS_LSB_MSK       (0XFF)
1786
#define BNO055_MAG_RADIUS_LSB_LEN       (8)
1787
#define BNO055_MAG_RADIUS_LSB_REG       BNO055_MAG_RADIUS_LSB_ADDR
1788

    
1789
#define BNO055_MAG_RADIUS_MSB_POS       (0)
1790
#define BNO055_MAG_RADIUS_MSB_MSK       (0XFF)
1791
#define BNO055_MAG_RADIUS_MSB_LEN       (8)
1792
#define BNO055_MAG_RADIUS_MSB_REG       BNO055_MAG_RADIUS_MSB_ADDR
1793

    
1794
/* PAGE0 DATA REGISTERS DEFINITION END*/
1795
/*************************************************/
1796
/**\name PAGE1 DATA REGISTERS DEFINITION   */
1797
/*************************************************/
1798
/* Configuration registers*/
1799
/* Accel range configuration register*/
1800
#define BNO055_ACCEL_RANGE_POS      (0)
1801
#define BNO055_ACCEL_RANGE_MSK      (0X03)
1802
#define BNO055_ACCEL_RANGE_LEN      (2)
1803
#define BNO055_ACCEL_RANGE_REG      BNO055_ACCEL_CONFIG_ADDR
1804

    
1805
/* Accel bandwidth configuration register*/
1806
#define BNO055_ACCEL_BW_POS         (2)
1807
#define BNO055_ACCEL_BW_MSK         (0X1C)
1808
#define BNO055_ACCEL_BW_LEN         (3)
1809
#define BNO055_ACCEL_BW_REG         BNO055_ACCEL_CONFIG_ADDR
1810

    
1811
/* Accel power mode configuration register*/
1812
#define BNO055_ACCEL_POWER_MODE_POS     (5)
1813
#define BNO055_ACCEL_POWER_MODE_MSK     (0XE0)
1814
#define BNO055_ACCEL_POWER_MODE_LEN     (3)
1815
#define BNO055_ACCEL_POWER_MODE_REG     BNO055_ACCEL_CONFIG_ADDR
1816

    
1817
/* Mag data output rate configuration register*/
1818
#define BNO055_MAG_DATA_OUTPUT_RATE_POS     (0)
1819
#define BNO055_MAG_DATA_OUTPUT_RATE_MSK     (0X07)
1820
#define BNO055_MAG_DATA_OUTPUT_RATE_LEN     (3)
1821
#define BNO055_MAG_DATA_OUTPUT_RATE_REG     BNO055_MAG_CONFIG_ADDR
1822

    
1823
/* Mag operation mode configuration register*/
1824
#define BNO055_MAG_OPERATION_MODE_POS       (3)
1825
#define BNO055_MAG_OPERATION_MODE_MSK       (0X18)
1826
#define BNO055_MAG_OPERATION_MODE_LEN       (2)
1827
#define BNO055_MAG_OPERATION_MODE_REG       BNO055_MAG_CONFIG_ADDR
1828

    
1829
/* Mag power mode configuration register*/
1830
#define BNO055_MAG_POWER_MODE_POS       (5)
1831
#define BNO055_MAG_POWER_MODE_MSK       (0X60)
1832
#define BNO055_MAG_POWER_MODE_LEN       (2)
1833
#define BNO055_MAG_POWER_MODE_REG       BNO055_MAG_CONFIG_ADDR
1834

    
1835
/* Gyro range configuration register*/
1836
#define BNO055_GYRO_RANGE_POS       (0)
1837
#define BNO055_GYRO_RANGE_MSK       (0X07)
1838
#define BNO055_GYRO_RANGE_LEN       (3)
1839
#define BNO055_GYRO_RANGE_REG       BNO055_GYRO_CONFIG_ADDR
1840

    
1841
/* Gyro bandwidth configuration register*/
1842
#define BNO055_GYRO_BW_POS      (3)
1843
#define BNO055_GYRO_BW_MSK      (0X38)
1844
#define BNO055_GYRO_BW_LEN      (3)
1845
#define BNO055_GYRO_BW_REG      BNO055_GYRO_CONFIG_ADDR
1846

    
1847
/* Gyro power mode configuration register*/
1848
#define BNO055_GYRO_POWER_MODE_POS      (0)
1849
#define BNO055_GYRO_POWER_MODE_MSK      (0X07)
1850
#define BNO055_GYRO_POWER_MODE_LEN      (3)
1851
#define BNO055_GYRO_POWER_MODE_REG      BNO055_GYRO_MODE_CONFIG_ADDR
1852

    
1853
/* Sleep configuration registers*/
1854
/* Accel sleep mode configuration register*/
1855
#define BNO055_ACCEL_SLEEP_MODE_POS     (0)
1856
#define BNO055_ACCEL_SLEEP_MODE_MSK     (0X01)
1857
#define BNO055_ACCEL_SLEEP_MODE_LEN     (1)
1858
#define BNO055_ACCEL_SLEEP_MODE_REG     BNO055_ACCEL_SLEEP_CONFIG_ADDR
1859

    
1860
/* Accel sleep duration configuration register*/
1861
#define BNO055_ACCEL_SLEEP_DURN_POS     (1)
1862
#define BNO055_ACCEL_SLEEP_DURN_MSK     (0X1E)
1863
#define BNO055_ACCEL_SLEEP_DURN_LEN     (4)
1864
#define BNO055_ACCEL_SLEEP_DURN_REG     BNO055_ACCEL_SLEEP_CONFIG_ADDR
1865

    
1866
/* Gyro sleep duration configuration register*/
1867
#define BNO055_GYRO_SLEEP_DURN_POS      (0)
1868
#define BNO055_GYRO_SLEEP_DURN_MSK      (0X07)
1869
#define BNO055_GYRO_SLEEP_DURN_LEN      (3)
1870
#define BNO055_GYRO_SLEEP_DURN_REG      BNO055_GYRO_SLEEP_CONFIG_ADDR
1871

    
1872
/* Gyro auto sleep duration configuration register*/
1873
#define BNO055_GYRO_AUTO_SLEEP_DURN_POS     (3)
1874
#define BNO055_GYRO_AUTO_SLEEP_DURN_MSK     (0X38)
1875
#define BNO055_GYRO_AUTO_SLEEP_DURN_LEN     (3)
1876
#define BNO055_GYRO_AUTO_SLEEP_DURN_REG     BNO055_GYRO_SLEEP_CONFIG_ADDR
1877

    
1878
/* Mag sleep mode configuration register*/
1879
#define BNO055_MAG_SLEEP_MODE_POS       (0)
1880
#define BNO055_MAG_SLEEP_MODE_MSK       (0X01)
1881
#define BNO055_MAG_SLEEP_MODE_LEN       (1)
1882
#define BNO055_MAG_SLEEP_MODE_REG       BNO055_MAG_SLEEP_CONFIG_ADDR
1883

    
1884
/* Mag sleep duration configuration register*/
1885
#define BNO055_MAG_SLEEP_DURN_POS       (1)
1886
#define BNO055_MAG_SLEEP_DURN_MSK       (0X1E)
1887
#define BNO055_MAG_SLEEP_DURN_LEN       (4)
1888
#define BNO055_MAG_SLEEP_DURN_REG       BNO055_MAG_SLEEP_CONFIG_ADDR
1889

    
1890
/* Interrupt registers*/
1891
/* Gyro any motion interrupt msk register*/
1892
#define BNO055_GYRO_ANY_MOTION_INTR_MASK_POS        (2)
1893
#define BNO055_GYRO_ANY_MOTION_INTR_MASK_MSK        (0X04)
1894
#define BNO055_GYRO_ANY_MOTION_INTR_MASK_LEN        (1)
1895
#define BNO055_GYRO_ANY_MOTION_INTR_MASK_REG        BNO055_INT_MASK_ADDR
1896

    
1897
/* Gyro high rate interrupt msk register*/
1898
#define BNO055_GYRO_HIGHRATE_INTR_MASK_POS      (3)
1899
#define BNO055_GYRO_HIGHRATE_INTR_MASK_MSK      (0X08)
1900
#define BNO055_GYRO_HIGHRATE_INTR_MASK_LEN      (1)
1901
#define BNO055_GYRO_HIGHRATE_INTR_MASK_REG      BNO055_INT_MASK_ADDR
1902

    
1903
/* Accel high g interrupt msk register*/
1904
#define BNO055_ACCEL_HIGH_G_INTR_MASK_POS       (5)
1905
#define BNO055_ACCEL_HIGH_G_INTR_MASK_MSK       (0X20)
1906
#define BNO055_ACCEL_HIGH_G_INTR_MASK_LEN       (1)
1907
#define BNO055_ACCEL_HIGH_G_INTR_MASK_REG       BNO055_INT_MASK_ADDR
1908

    
1909
/* Accel any motion interrupt msk register*/
1910
#define BNO055_ACCEL_ANY_MOTION_INTR_MASK_POS       (6)
1911
#define BNO055_ACCEL_ANY_MOTION_INTR_MASK_MSK       (0X40)
1912
#define BNO055_ACCEL_ANY_MOTION_INTR_MASK_LEN       (1)
1913
#define BNO055_ACCEL_ANY_MOTION_INTR_MASK_REG       BNO055_INT_MASK_ADDR
1914

    
1915
/* Accel any motion interrupt msk register*/
1916
#define BNO055_ACCEL_NO_MOTION_INTR_MASK_POS        (7)
1917
#define BNO055_ACCEL_NO_MOTION_INTR_MASK_MSK        (0X80)
1918
#define BNO055_ACCEL_NO_MOTION_INTR_MASK_LEN        (1)
1919
#define BNO055_ACCEL_NO_MOTION_INTR_MASK_REG        BNO055_INT_MASK_ADDR
1920

    
1921
/* Gyro any motion interrupt register*/
1922
#define BNO055_GYRO_ANY_MOTION_INTR_POS     (2)
1923
#define BNO055_GYRO_ANY_MOTION_INTR_MSK     (0X04)
1924
#define BNO055_GYRO_ANY_MOTION_INTR_LEN     (1)
1925
#define BNO055_GYRO_ANY_MOTION_INTR_REG     BNO055_INT_ADDR
1926

    
1927
/* Gyro high rate interrupt register*/
1928
#define BNO055_GYRO_HIGHRATE_INTR_POS       (3)
1929
#define BNO055_GYRO_HIGHRATE_INTR_MSK       (0X08)
1930
#define BNO055_GYRO_HIGHRATE_INTR_LEN       (1)
1931
#define BNO055_GYRO_HIGHRATE_INTR_REG       BNO055_INT_ADDR
1932

    
1933
/* Accel high g interrupt register*/
1934
#define BNO055_ACCEL_HIGH_G_INTR_POS        (5)
1935
#define BNO055_ACCEL_HIGH_G_INTR_MSK        (0X20)
1936
#define BNO055_ACCEL_HIGH_G_INTR_LEN        (1)
1937
#define BNO055_ACCEL_HIGH_G_INTR_REG        BNO055_INT_ADDR
1938

    
1939
/* Accel any motion interrupt register*/
1940
#define BNO055_ACCEL_ANY_MOTION_INTR_POS        (6)
1941
#define BNO055_ACCEL_ANY_MOTION_INTR_MSK        (0X40)
1942
#define BNO055_ACCEL_ANY_MOTION_INTR_LEN        (1)
1943
#define BNO055_ACCEL_ANY_MOTION_INTR_REG        BNO055_INT_ADDR
1944

    
1945
/*Accel any motion interrupt register*/
1946
#define BNO055_ACCEL_NO_MOTION_INTR_POS     (7)
1947
#define BNO055_ACCEL_NO_MOTION_INTR_MSK     (0X80)
1948
#define BNO055_ACCEL_NO_MOTION_INTR_LEN     (1)
1949
#define BNO055_ACCEL_NO_MOTION_INTR_REG     BNO055_INT_ADDR
1950

    
1951
/*Accel any motion threshold setting*/
1952
#define BNO055_ACCEL_ANY_MOTION_THRES_POS   (0)
1953
#define BNO055_ACCEL_ANY_MOTION_THRES_MSK   (0XFF)
1954
#define BNO055_ACCEL_ANY_MOTION_THRES_LEN   (8)
1955
#define BNO055_ACCEL_ANY_MOTION_THRES_REG  BNO055_ACCEL_ANY_MOTION_THRES_ADDR
1956

    
1957
/*Accel interrupt setting register*/
1958
#define BNO055_ACCEL_ANY_MOTION_DURN_SET_POS        (0)
1959
#define BNO055_ACCEL_ANY_MOTION_DURN_SET_MSK        (0X03)
1960
#define BNO055_ACCEL_ANY_MOTION_DURN_SET_LEN        (2)
1961
#define BNO055_ACCEL_ANY_MOTION_DURN_SET_REG  BNO055_ACCEL_INTR_SETTINGS_ADDR
1962

    
1963
/* Accel AM/NM axis selection register*/
1964
#define BNO055_ACCEL_ANY_MOTION_X_AXIS_POS      (2)
1965
#define BNO055_ACCEL_ANY_MOTION_X_AXIS_MSK      (0X04)
1966
#define BNO055_ACCEL_ANY_MOTION_X_AXIS_LEN      (1)
1967
#define BNO055_ACCEL_ANY_MOTION_X_AXIS_REG  BNO055_ACCEL_INTR_SETTINGS_ADDR
1968

    
1969
#define BNO055_ACCEL_ANY_MOTION_Y_AXIS_POS      (3)
1970
#define BNO055_ACCEL_ANY_MOTION_Y_AXIS_MSK      (0X08)
1971
#define BNO055_ACCEL_ANY_MOTION_Y_AXIS_LEN      (1)
1972
#define BNO055_ACCEL_ANY_MOTION_Y_AXIS_REG  BNO055_ACCEL_INTR_SETTINGS_ADDR
1973

    
1974
#define BNO055_ACCEL_ANY_MOTION_Z_AXIS_POS      (4)
1975
#define BNO055_ACCEL_ANY_MOTION_Z_AXIS_MSK      (0X10)
1976
#define BNO055_ACCEL_ANY_MOTION_Z_AXIS_LEN      (1)
1977
#define BNO055_ACCEL_ANY_MOTION_Z_AXIS_REG  BNO055_ACCEL_INTR_SETTINGS_ADDR
1978

    
1979
/* Accel high g axis selection register*/
1980
#define BNO055_ACCEL_HIGH_G_X_AXIS_POS      (5)
1981
#define BNO055_ACCEL_HIGH_G_X_AXIS_MSK      (0X20)
1982
#define BNO055_ACCEL_HIGH_G_X_AXIS_LEN      (1)
1983
#define BNO055_ACCEL_HIGH_G_X_AXIS_REG      BNO055_ACCEL_INTR_SETTINGS_ADDR
1984

    
1985
#define BNO055_ACCEL_HIGH_G_Y_AXIS_POS      (6)
1986
#define BNO055_ACCEL_HIGH_G_Y_AXIS_MSK      (0X40)
1987
#define BNO055_ACCEL_HIGH_G_Y_AXIS_LEN      (1)
1988
#define BNO055_ACCEL_HIGH_G_Y_AXIS_REG      BNO055_ACCEL_INTR_SETTINGS_ADDR
1989

    
1990
#define BNO055_ACCEL_HIGH_G_Z_AXIS_POS      (7)
1991
#define BNO055_ACCEL_HIGH_G_Z_AXIS_MSK      (0X80)
1992
#define BNO055_ACCEL_HIGH_G_Z_AXIS_LEN      (1)
1993
#define BNO055_ACCEL_HIGH_G_Z_AXIS_REG      BNO055_ACCEL_INTR_SETTINGS_ADDR
1994

    
1995
/* Accel High g duration setting register*/
1996
#define BNO055_ACCEL_HIGH_G_DURN_POS        (0)
1997
#define BNO055_ACCEL_HIGH_G_DURN_MSK        (0XFF)
1998
#define BNO055_ACCEL_HIGH_G_DURN_LEN        (8)
1999
#define BNO055_ACCEL_HIGH_G_DURN_REG        BNO055_ACCEL_HIGH_G_DURN_ADDR
2000

    
2001
/* Accel High g threshold setting register*/
2002
#define BNO055_ACCEL_HIGH_G_THRES_POS       (0)
2003
#define BNO055_ACCEL_HIGH_G_THRES_MSK       (0XFF)
2004
#define BNO055_ACCEL_HIGH_G_THRES_LEN       (8)
2005
#define BNO055_ACCEL_HIGH_G_THRES_REG       BNO055_ACCEL_HIGH_G_THRES_ADDR
2006

    
2007
/* Accel no/slow motion threshold setting*/
2008
#define BNO055_ACCEL_SLOW_NO_MOTION_THRES_POS       (0)
2009
#define BNO055_ACCEL_SLOW_NO_MOTION_THRES_MSK       (0XFF)
2010
#define BNO055_ACCEL_SLOW_NO_MOTION_THRES_LEN       (8)
2011
#define BNO055_ACCEL_SLOW_NO_MOTION_THRES_REG       \
2012
BNO055_ACCEL_NO_MOTION_THRES_ADDR
2013

    
2014
/* Accel no/slow motion enable setting*/
2015
#define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE_POS      (0)
2016
#define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE_MSK      (0X01)
2017
#define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE_LEN      (1)
2018
#define BNO055_ACCEL_SLOW_NO_MOTION_ENABLE_REG BNO055_ACCEL_NO_MOTION_SET_ADDR
2019

    
2020
/* Accel no/slow motion duration setting*/
2021
#define BNO055_ACCEL_SLOW_NO_MOTION_DURN_POS        (1)
2022
#define BNO055_ACCEL_SLOW_NO_MOTION_DURN_MSK        (0X7E)
2023
#define BNO055_ACCEL_SLOW_NO_MOTION_DURN_LEN        (6)
2024
#define BNO055_ACCEL_SLOW_NO_MOTION_DURN_REG   BNO055_ACCEL_NO_MOTION_SET_ADDR
2025

    
2026
/*Gyro interrupt setting register*/
2027
/*Gyro any motion axis setting*/
2028
#define BNO055_GYRO_ANY_MOTION_X_AXIS_POS       (0)
2029
#define BNO055_GYRO_ANY_MOTION_X_AXIS_MSK       (0X01)
2030
#define BNO055_GYRO_ANY_MOTION_X_AXIS_LEN       (1)
2031
#define BNO055_GYRO_ANY_MOTION_X_AXIS_REG    BNO055_GYRO_INTR_SETING_ADDR
2032

    
2033
#define BNO055_GYRO_ANY_MOTION_Y_AXIS_POS       (1)
2034
#define BNO055_GYRO_ANY_MOTION_Y_AXIS_MSK       (0X02)
2035
#define BNO055_GYRO_ANY_MOTION_Y_AXIS_LEN       (1)
2036
#define BNO055_GYRO_ANY_MOTION_Y_AXIS_REG    BNO055_GYRO_INTR_SETING_ADDR
2037

    
2038
#define BNO055_GYRO_ANY_MOTION_Z_AXIS_POS       (2)
2039
#define BNO055_GYRO_ANY_MOTION_Z_AXIS_MSK       (0X04)
2040
#define BNO055_GYRO_ANY_MOTION_Z_AXIS_LEN       (1)
2041
#define BNO055_GYRO_ANY_MOTION_Z_AXIS_REG     BNO055_GYRO_INTR_SETING_ADDR
2042

    
2043
/*Gyro high rate axis setting*/
2044
#define BNO055_GYRO_HIGHRATE_X_AXIS_POS     (3)
2045
#define BNO055_GYRO_HIGHRATE_X_AXIS_MSK     (0X08)
2046
#define BNO055_GYRO_HIGHRATE_X_AXIS_LEN     (1)
2047
#define BNO055_GYRO_HIGHRATE_X_AXIS_REG     BNO055_GYRO_INTR_SETING_ADDR
2048

    
2049
#define BNO055_GYRO_HIGHRATE_Y_AXIS_POS     (4)
2050
#define BNO055_GYRO_HIGHRATE_Y_AXIS_MSK     (0X10)
2051
#define BNO055_GYRO_HIGHRATE_Y_AXIS_LEN     (1)
2052
#define BNO055_GYRO_HIGHRATE_Y_AXIS_REG     BNO055_GYRO_INTR_SETING_ADDR
2053

    
2054
#define BNO055_GYRO_HIGHRATE_Z_AXIS_POS     (5)
2055
#define BNO055_GYRO_HIGHRATE_Z_AXIS_MSK     (0X20)
2056
#define BNO055_GYRO_HIGHRATE_Z_AXIS_LEN     (1)
2057
#define BNO055_GYRO_HIGHRATE_Z_AXIS_REG     BNO055_GYRO_INTR_SETING_ADDR
2058

    
2059
/* Gyro filter setting*/
2060
#define BNO055_GYRO_ANY_MOTION_FILTER_POS       (6)
2061
#define BNO055_GYRO_ANY_MOTION_FILTER_MSK       (0X40)
2062
#define BNO055_GYRO_ANY_MOTION_FILTER_LEN       (1)
2063
#define BNO055_GYRO_ANY_MOTION_FILTER_REG    BNO055_GYRO_INTR_SETING_ADDR
2064

    
2065
#define BNO055_GYRO_HIGHRATE_FILTER_POS     (7)
2066
#define BNO055_GYRO_HIGHRATE_FILTER_MSK     (0X80)
2067
#define BNO055_GYRO_HIGHRATE_FILTER_LEN     (1)
2068
#define BNO055_GYRO_HIGHRATE_FILTER_REG     BNO055_GYRO_INTR_SETING_ADDR
2069

    
2070
/* Gyro high rate X axis settings*/
2071
#define BNO055_GYRO_HIGHRATE_X_THRES_POS        (0)
2072
#define BNO055_GYRO_HIGHRATE_X_THRES_MSK        (0X1F)
2073
#define BNO055_GYRO_HIGHRATE_X_THRES_LEN        (5)
2074
#define BNO055_GYRO_HIGHRATE_X_THRES_REG    BNO055_GYRO_HIGHRATE_X_SET_ADDR
2075

    
2076
#define BNO055_GYRO_HIGHRATE_X_HYST_POS     (5)
2077
#define BNO055_GYRO_HIGHRATE_X_HYST_MSK     (0X60)
2078
#define BNO055_GYRO_HIGHRATE_X_HYST_LEN     (2)
2079
#define BNO055_GYRO_HIGHRATE_X_HYST_REG     BNO055_GYRO_HIGHRATE_X_SET_ADDR
2080

    
2081
#define BNO055_GYRO_HIGHRATE_X_DURN_POS     (0)
2082
#define BNO055_GYRO_HIGHRATE_X_DURN_MSK     (0XFF)
2083
#define BNO055_GYRO_HIGHRATE_X_DURN_LEN     (8)
2084
#define BNO055_GYRO_HIGHRATE_X_DURN_REG     BNO055_GYRO_DURN_X_ADDR
2085

    
2086
/* Gyro high rate Y axis settings*/
2087
#define BNO055_GYRO_HIGHRATE_Y_THRES_POS        (0)
2088
#define BNO055_GYRO_HIGHRATE_Y_THRES_MSK        (0X1F)
2089
#define BNO055_GYRO_HIGHRATE_Y_THRES_LEN        (5)
2090
#define BNO055_GYRO_HIGHRATE_Y_THRES_REG    BNO055_GYRO_HIGHRATE_Y_SET_ADDR
2091

    
2092
#define BNO055_GYRO_HIGHRATE_Y_HYST_POS     (5)
2093
#define BNO055_GYRO_HIGHRATE_Y_HYST_MSK     (0X60)
2094
#define BNO055_GYRO_HIGHRATE_Y_HYST_LEN     (2)
2095
#define BNO055_GYRO_HIGHRATE_Y_HYST_REG     BNO055_GYRO_HIGHRATE_Y_SET_ADDR
2096

    
2097
#define BNO055_GYRO_HIGHRATE_Y_DURN_POS     (0)
2098
#define BNO055_GYRO_HIGHRATE_Y_DURN_MSK     (0XFF)
2099
#define BNO055_GYRO_HIGHRATE_Y_DURN_LEN     (8)
2100
#define BNO055_GYRO_HIGHRATE_Y_DURN_REG     BNO055_GYRO_DURN_Y_ADDR
2101

    
2102
/* Gyro high rate Z axis settings*/
2103
#define BNO055_GYRO_HIGHRATE_Z_THRES_POS        (0)
2104
#define BNO055_GYRO_HIGHRATE_Z_THRES_MSK        (0X1F)
2105
#define BNO055_GYRO_HIGHRATE_Z_THRES_LEN        (5)
2106
#define BNO055_GYRO_HIGHRATE_Z_THRES_REG    BNO055_GYRO_HIGHRATE_Z_SET_ADDR
2107

    
2108
#define BNO055_GYRO_HIGHRATE_Z_HYST_POS     (5)
2109
#define BNO055_GYRO_HIGHRATE_Z_HYST_MSK     (0X60)
2110
#define BNO055_GYRO_HIGHRATE_Z_HYST_LEN     (2)
2111
#define BNO055_GYRO_HIGHRATE_Z_HYST_REG     BNO055_GYRO_HIGHRATE_Z_SET_ADDR
2112

    
2113
#define BNO055_GYRO_HIGHRATE_Z_DURN_POS     (0)
2114
#define BNO055_GYRO_HIGHRATE_Z_DURN_MSK     (0XFF)
2115
#define BNO055_GYRO_HIGHRATE_Z_DURN_LEN     (8)
2116
#define BNO055_GYRO_HIGHRATE_Z_DURN_REG     (BNO055_GYRO_DURN_Z_ADDR)
2117

    
2118
/*Gyro any motion threshold setting*/
2119
#define BNO055_GYRO_ANY_MOTION_THRES_POS        (0)
2120
#define BNO055_GYRO_ANY_MOTION_THRES_MSK        (0X7F)
2121
#define BNO055_GYRO_ANY_MOTION_THRES_LEN        (7)
2122
#define BNO055_GYRO_ANY_MOTION_THRES_REG        \
2123
BNO055_GYRO_ANY_MOTION_THRES_ADDR
2124

    
2125
/* Gyro any motion slope sample setting*/
2126
#define BNO055_GYRO_SLOPE_SAMPLES_POS       (0)
2127
#define BNO055_GYRO_SLOPE_SAMPLES_MSK       (0X03)
2128
#define BNO055_GYRO_SLOPE_SAMPLES_LEN       (2)
2129
#define BNO055_GYRO_SLOPE_SAMPLES_REG       BNO055_GYRO_ANY_MOTION_SET_ADDR
2130

    
2131
/* Gyro awake duration setting*/
2132
#define BNO055_GYRO_AWAKE_DURN_POS      (2)
2133
#define BNO055_GYRO_AWAKE_DURN_MSK      (0X0C)
2134
#define BNO055_GYRO_AWAKE_DURN_LEN      (2)
2135
#define BNO055_GYRO_AWAKE_DURN_REG      BNO055_GYRO_ANY_MOTION_SET_ADDR
2136

    
2137
/* PAGE1 DATA REGISTERS DEFINITION END*/
2138
/*************************************************/
2139
/**\name GET AND SET BITSLICE FUNCTIONS    */
2140
/*************************************************/
2141
#define BNO055_GET_BITSLICE(regvar, bitname)\
2142
((regvar & bitname##_MSK) >> bitname##_POS)
2143

    
2144
#define BNO055_SET_BITSLICE(regvar, bitname, val)\
2145
((regvar & ~bitname##_MSK) | ((val<<bitname##_POS)&bitname##_MSK))
2146
/*************************************************/
2147
/**\name FUNCTION DECLARATION    */
2148
/*************************************************/
2149
/**************************************************/
2150
/**\name INITIALIZATION AND REVISION ID FUNCTIONS */
2151
/**************************************************/
2152
/*!
2153
 *  @brief
2154
 *  This API is used for initialize
2155
 *  bus read, bus write function pointers,device
2156
 *  address,accel revision id, gyro revision id
2157
 *  mag revision id, software revision id, boot loader
2158
 *  revision id and page id
2159
 *
2160
 *  @param  bno055 - structure pointer
2161
 *
2162
 *
2163
 *  @return results of bus communication function
2164
 *  @retval 0 -> BNO055_SUCCESS
2165
 *  @retval 1 -> BNO055_ERROR
2166
 *
2167
 *  @note While changing the parameter of the bno055_t
2168
 *  consider the following point:
2169
 *  Changing the reference value of the parameter
2170
 *  will changes the local copy or local reference
2171
 *  make sure your changes will not
2172
 *  affect the reference value of the parameter
2173
 *  (Better case don't change the reference value of the parameter)
2174
 */
2175
BNO055_RETURN_FUNCTION_TYPE bno055_init(struct bno055_t *bno055);
2176
/*!
2177
 *  @brief
2178
 *  This API gives data to the given register and
2179
 *  the data is written in the corresponding register address
2180
 *
2181
 *  @param addr_u8 : Address of the register
2182
 *  @param data_u8 : Data to be written to the register
2183
 *  @param len_u8  : Length of the Data
2184
 *
2185
 *  @return results of bus communication function
2186
 *  @retval 0 -> BNO055_SUCCESS
2187
 *  @retval 1 -> BNO055_ERROR
2188
 *
2189
 *
2190
 */
2191
BNO055_RETURN_FUNCTION_TYPE bno055_write_register(u8 addr_u8, u8 *data_u8,
2192
        u8 len_u8);
2193
/*!
2194
 *  @brief This API reads the data from
2195
 *  the given register address
2196
 *
2197
 *  @param addr_u8 : Address of the register
2198
 *  @param data_u8 : address of the variable,
2199
 *  read value will be kept
2200
 *  @param len_u8  : Length of the data
2201
 *
2202
 *
2203
 *  @return results of bus communication function
2204
 *  @retval 0 -> BNO055_SUCCESS
2205
 *  @retval 1 -> BNO055_ERROR
2206
 *
2207
 */
2208
BNO055_RETURN_FUNCTION_TYPE bno055_read_register(u8 addr_u8, u8 *data_u8,
2209
        u8 len_u8);
2210
/*!
2211
 *  @brief This API reads chip id
2212
 *  from register 0x00 it is a byte of data
2213
 *
2214
 *
2215
 *  @param chip_id_u8 : The chip id value 0xA0
2216
 *
2217
 *  @return results of bus communication function
2218
 *  @retval 0 -> BNO055_SUCCESS
2219
 *  @retval 1 -> BNO055_ERROR
2220
 */
2221
BNO055_RETURN_FUNCTION_TYPE bno055_read_chip_id(u8 *chip_id_u8);
2222
/*!
2223
 *  @brief This API reads software revision id
2224
 *  from register 0x04 and 0x05 it is a two byte of data
2225
 *
2226
 *  @param sw_id_u8 : The SW revision id
2227
 *
2228
 *  @return results of bus communication function
2229
 *  @retval 0 -> BNO055_SUCCESS
2230
 *  @retval 1 -> BNO055_ERROR
2231
 *
2232
 *
2233
 */
2234
BNO055_RETURN_FUNCTION_TYPE bno055_read_sw_rev_id(u16 *sw_id_u8);
2235
/*!
2236
 *  @brief This API reads page id
2237
 *  from register 0x07 it is a byte of data
2238
 *
2239
 *
2240
 *  @param page_id_u8 : The value of page id
2241
 *
2242
 *  BNO055_PAGE_ZERO -> 0x00
2243
 *  BNO055_PAGE_ONE  -> 0x01
2244
 *
2245
 *  @return results of bus communication function
2246
 *  @retval 0 -> BNO055_SUCCESS
2247
 *  @retval 1 -> BNO055_ERROR
2248
 *
2249
 *
2250
 */
2251
BNO055_RETURN_FUNCTION_TYPE bno055_read_page_id(u8 *page_id_u8);
2252
/*!
2253
 *  @brief This API used to write
2254
 *  the page id register 0x07
2255
 *
2256
 *  @param page_id_u8 : The value of page id
2257
 *
2258
 *  BNO055_PAGE_ZERO -> 0x00
2259
 *  BNO055_PAGE_ONE  -> 0x01
2260
 *
2261
 *  @return results of bus communication function
2262
 *  @retval 0 -> BNO055_SUCCESS
2263
 *  @retval 1 -> BNO055_ERROR
2264
 *
2265
 *
2266
 */
2267
BNO055_RETURN_FUNCTION_TYPE bno055_write_page_id(u8 page_id_u8);
2268
/*!
2269
 *  @brief This API reads accel revision id
2270
 *  from register 0x01 it is a byte of value
2271
 *
2272
 *  @param accel_rev_id_u8 : The accel revision id 0xFB
2273
 *
2274
 *  @return results of bus communication function
2275
 *  @retval 0 -> BNO055_SUCCESS
2276
 *  @retval 1 -> BNO055_ERROR
2277
 *
2278
 *
2279
 */
2280
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_rev_id(u8 *accel_rev_id_u8);
2281
/*!
2282
 *  @brief This API reads mag revision id
2283
 *  from register 0x02 it is a byte of value
2284
 *
2285
 *  @param mag_rev_id_u8 : The mag revision id 0x32
2286
 *
2287
 *  @return results of bus communication function
2288
 *  @retval 0 -> BNO055_SUCCESS
2289
 *  @retval 1 -> BNO055_ERROR
2290
 *
2291
 *
2292
 */
2293
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_rev_id(u8 *mag_rev_id_u8);
2294
/*!
2295
 *  @brief This API reads gyro revision id
2296
 *  from register 0x03 it is a byte of value
2297
 *
2298
 *  @param gyro_rev_id_u8 : The gyro revision id 0xF0
2299
 *
2300
 *
2301
 *
2302
 *  @return results of bus communication function
2303
 *  @retval 0 -> BNO055_SUCCESS
2304
 *  @retval 1 -> BNO055_ERROR
2305
 *
2306
 *
2307
 */
2308
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_rev_id(u8 *gyro_rev_id_u8);
2309
/*!
2310
 *  @brief This API used to read boot loader revision id
2311
 *  from register 0x06 it is a byte of value
2312
 *
2313
 *  @param bl_rev_id_u8 : The boot loader revision id
2314
 *
2315
 *
2316
 *  @return results of bus communication function
2317
 *  @retval 0 -> BNO055_SUCCESS
2318
 *  @retval 1 -> BNO055_ERROR
2319
 *
2320
 *
2321
 */
2322
BNO055_RETURN_FUNCTION_TYPE bno055_read_bl_rev_id(u8 *bl_rev_id_u8);
2323
/**************************************************/
2324
/**\name ACCEL DATA READ FUNCTIONS */
2325
/**************************************************/
2326
/*!
2327
 *  @brief This API reads acceleration data X values
2328
 *  from register 0x08 and 0x09 it is a two byte data
2329
 *
2330
 *
2331
 *
2332
 *
2333
 *  @param accel_x_s16 : The X raw data
2334
 *
2335
 *
2336
 *
2337
 *  @return results of bus communication function
2338
 *  @retval 0 -> BNO055_SUCCESS
2339
 *  @retval 1 -> BNO055_ERROR
2340
 *
2341
 *
2342
 */
2343
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_x(s16 *accel_x_s16);
2344
/*!
2345
 *  @brief This API reads acceleration data Y values
2346
 *  from register 0x0A and 0x0B it is a two byte data
2347
 *
2348
 *
2349
 *
2350
 *
2351
 *  @param accel_y_s16 : The Y raw data
2352
 *
2353
 *
2354
 *
2355
 *  @return results of bus communication function
2356
 *  @retval 0 -> BNO055_SUCCESS
2357
 *  @retval 1 -> BNO055_ERROR
2358
 *
2359
 *
2360
 */
2361
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_y(s16 *accel_y_s16);
2362
/*!
2363
 *  @brief This API reads acceleration data z values
2364
 *  from register 0x0C and 0x0D it is a two byte data
2365
 *
2366
 *
2367
 *
2368
 *
2369
 *  @param accel_z_s16 : The z raw data
2370
 *
2371
 *
2372
 *
2373
 *  @return results of bus communication function
2374
 *  @retval 0 -> BNO055_SUCCESS
2375
 *  @retval 1 -> BNO055_ERROR
2376
 *
2377
 *
2378
 */
2379
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_z(s16 *accel_z_s16);
2380
/*!
2381
 *  @brief This API reads acceleration data xyz values
2382
 *  from register 0x08 to 0x0D it is a six byte data
2383
 *
2384
 *
2385
 *  @param accel : The value of accel xyz data
2386
 *
2387
 *  Parameter |    result
2388
 *  --------- | -----------------
2389
 *   x        | The accel x data
2390
 *   y        | The accel y data
2391
 *   z        | The accel z data
2392
 *
2393
 *
2394
 *
2395
 *  @return results of bus communication function
2396
 *  @retval 0 -> BNO055_SUCCESS
2397
 *  @retval 1 -> BNO055_ERROR
2398
 *
2399
 */
2400
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_xyz(struct bno055_accel_t *accel);
2401
/**************************************************/
2402
/**\name MAG DATA READ FUNCTIONS */
2403
/**************************************************/
2404
/*!
2405
 *  @brief This API reads mag data x values
2406
 *  from register 0x0E and 0x0F it is a two byte data
2407
 *
2408
 *
2409
 *
2410
 *
2411
 *  @param mag_x_s16 : The x raw data
2412
 *
2413
 *
2414
 *
2415
 *  @return results of bus communication function
2416
 *  @retval 0 -> BNO055_SUCCESS
2417
 *  @retval 1 -> BNO055_ERROR
2418
 *
2419
 *
2420
 *
2421
 */
2422
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_x(s16 *mag_x_s16);
2423
/*!
2424
 *  @brief This API reads mag data y values
2425
 *  from register 0x10 and 0x11 it is a two byte data
2426
 *
2427
 *
2428
 *
2429
 *
2430
 *  @param mag_y_s16 : The y raw data
2431
 *
2432
 *
2433
 *
2434
 *  @return results of bus communication function
2435
 *  @retval 0 -> BNO055_SUCCESS
2436
 *  @retval 1 -> BNO055_ERROR
2437
 *
2438
 *
2439
 */
2440
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_y(s16 *mag_y_s16);
2441
/*!
2442
 *  @brief This API reads mag data z values
2443
 *  from register 0x12 and 0x13 it is a two byte data
2444
 *
2445
 *
2446
 *
2447
 *
2448
 *  @param mag_z_s16 : The z raw data
2449
 *
2450
 *
2451
 *
2452
 *  @return results of bus communication function
2453
 *  @retval 0 -> BNO055_SUCCESS
2454
 *  @retval 1 -> BNO055_ERROR
2455
 *
2456
 *
2457
 *
2458
 */
2459
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_z(s16 *mag_z_s16);
2460
/*!
2461
 *  @brief This API reads mag data xyz values
2462
 *  from register 0x0E to 0x13 it is a six byte data
2463
 *
2464
 *
2465
 *  @param mag : The mag xyz values
2466
 *
2467
 *  Parameter |    result
2468
 *  --------- | -----------------
2469
 *   x        | The mag x data
2470
 *   y        | The mag y data
2471
 *   z        | The mag z data
2472
 *
2473
 *
2474
 *
2475
 *  @return results of bus communication function
2476
 *  @retval 0 -> BNO055_SUCCESS
2477
 *  @retval 1 -> BNO055_ERROR
2478
 *
2479
 */
2480
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_xyz(struct bno055_mag_t *mag);
2481
/**************************************************/
2482
/**\name GYRO DATA READ FUNCTIONS */
2483
/**************************************************/
2484
/*!
2485
 *  @brief This API reads gyro data x values
2486
 *  from register 0x14 and 0x15 it is a two byte data
2487
 *
2488
 *
2489
 *
2490
 *
2491
 *  @param gyro_x_s16 : The x raw data
2492
 *
2493
 *
2494
 *
2495
 *  @return results of bus communication function
2496
 *  @retval 0 -> BNO055_SUCCESS
2497
 *  @retval 1 -> BNO055_ERROR
2498
 *
2499
 *
2500
 */
2501
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_x(s16 *gyro_x_s16);
2502
/*!
2503
 *  @brief This API reads gyro data y values
2504
 *  from register 0x16 and 0x17 it is a two byte data
2505
 *
2506
 *
2507
 *
2508
 *
2509
 *  @param gyro_y_s16 : The y raw data
2510
 *
2511
 *
2512
 *
2513
 *  @return results of bus communication function
2514
 *  @retval 0 -> BNO055_SUCCESS
2515
 *  @retval 1 -> BNO055_ERROR
2516
 *
2517
 *
2518
 */
2519
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_y(s16 *gyro_y_s16);
2520
/*!
2521
 *  @brief This API reads gyro data z values
2522
 *  from register 0x18 and 0x19 it is a two byte data
2523
 *
2524
 *  @param gyro_z_s16 : The z raw data
2525
 *
2526
 *  @return results of bus communication function
2527
 *  @retval 0 -> BNO055_SUCCESS
2528
 *  @retval 1 -> BNO055_ERROR
2529
 *
2530
 *
2531
 */
2532
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_z(s16 *gyro_z_s16);
2533
/*!
2534
 *  @brief This API reads gyro data xyz values
2535
 *  from register 0x14 to 0x19 it is a six byte data
2536
 *
2537
 *
2538
 *  @param gyro : The value of gyro xyz data's
2539
 *
2540
 *  Parameter |    result
2541
 *  --------- | -----------------
2542
 *   x        | The gyro x data
2543
 *   y        | The gyro y data
2544
 *   z        | The gyro z data
2545
 *
2546
 *
2547
 *
2548
 *  @return results of bus communication function
2549
 *  @retval 0 -> BNO055_SUCCESS
2550
 *  @retval 1 -> BNO055_ERROR
2551
 *
2552
 */
2553
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_xyz(struct bno055_gyro_t *gyro);
2554
/**************************************************/
2555
/**\name EULER DATA READ FUNCTIONS */
2556
/**************************************************/
2557
/*!
2558
 *  @brief This API reads gyro data z values
2559
 *  from register 0x1A and 0x1B it is a two byte data
2560
 *
2561
 *  @param euler_h_s16 : The raw h data
2562
 *
2563
 *  @return results of bus communication function
2564
 *  @retval 0 -> BNO055_SUCCESS
2565
 *  @retval 1 -> BNO055_ERROR
2566
 *
2567
 */
2568
BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_h(s16 *euler_h_s16);
2569
/*!
2570
 *  @brief This API reads Euler data r values
2571
 *  from register 0x1C and 0x1D it is a two byte data
2572
 *
2573
 *  @param euler_r_s16 : The raw r data
2574
 *
2575
 *  @return results of bus communication function
2576
 *  @retval 0 -> BNO055_SUCCESS
2577
 *  @retval 1 -> BNO055_ERROR
2578
 *
2579
 */
2580
BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_r(s16 *euler_r_s16);
2581
/*!
2582
 *  @brief This API reads Euler data p values
2583
 *  from register 0x1E and 0x1F it is a two byte data
2584
 *
2585
 *  @param euler_p_s16 : The raw p data
2586
 *
2587
 *  @return results of bus communication function
2588
 *  @retval 0 -> BNO055_SUCCESS
2589
 *  @retval 1 -> BNO055_ERROR
2590
 *
2591
 *
2592
 */
2593
BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_p(s16 *euler_p_s16);
2594
/*!
2595
 *  @brief This API reads Euler data hrp values
2596
 *  from register 0x1A to 0x1F it is a six byte data
2597
 *
2598
 *
2599
 *  @param euler : The Euler hrp data's
2600
 *
2601
 *  Parameter |    result
2602
 *  --------- | -----------------
2603
 *   h        | The Euler h data
2604
 *   r        | The Euler r data
2605
 *   p        | The Euler p data
2606
 *
2607
 *
2608
 *  @return results of bus communication function
2609
 *  @retval 0 -> BNO055_SUCCESS
2610
 *  @retval 1 -> BNO055_ERROR
2611
 *
2612
 */
2613
BNO055_RETURN_FUNCTION_TYPE bno055_read_euler_hrp(struct bno055_euler_t *euler);
2614
/**************************************************/
2615
/**\name QUATERNION DATA READ FUNCTIONS */
2616
/**************************************************/
2617
/*!
2618
 *  @brief This API reads quaternion data w values
2619
 *  from register 0x20 and 0x21 it is a two byte data
2620
 *
2621
 *  @param quaternion_w_s16 : The raw w data
2622
 *
2623
 *  @return results of bus communication function
2624
 *  @retval 0 -> BNO055_SUCCESS
2625
 *  @retval 1 -> BNO055_ERROR
2626
 *
2627
 *
2628
 */
2629
BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_w(s16 *quaternion_w_s16);
2630
/*!
2631
 *  @brief This API reads quaternion data x values
2632
 *  from register 0x22 and 0x23 it is a two byte data
2633
 *
2634
 *  @param quaternion_x_s16 : The raw x data
2635
 *
2636
 *  @return results of bus communication function
2637
 *  @retval 0 -> BNO055_SUCCESS
2638
 *  @retval 1 -> BNO055_ERROR
2639
 *
2640
 *
2641
 */
2642
BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_x(s16 *quaternion_x_s16);
2643
/*!
2644
 *  @brief This API reads quaternion data y values
2645
 *  from register 0x24 and 0x25 it is a two byte data
2646
 *
2647
 *  @param quaternion_y_s16 : The raw y data
2648
 *
2649
 *  @return results of bus communication function
2650
 *  @retval 0 -> BNO055_SUCCESS
2651
 *  @retval 1 -> BNO055_ERROR
2652
 *
2653
 *
2654
 */
2655
BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_y(s16 *quaternion_y_s16);
2656
/*!
2657
 *  @brief This API reads quaternion data z values
2658
 *  from register 0x26 and 0x27 it is a two byte data
2659
 *
2660
 *  @param quaternion_z_s16 : The raw z data
2661
 *
2662
 *  @return results of bus communication function
2663
 *  @retval 0 -> BNO055_SUCCESS
2664
 *  @retval 1 -> BNO055_ERROR
2665
 *
2666
 *
2667
 */
2668
BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_z(s16 *quaternion_z_s16);
2669
/*!
2670
 *  @brief This API reads Quaternion data wxyz values
2671
 *  from register 0x20 to 0x27 it is a six byte data
2672
 *
2673
 *
2674
 *  @param quaternion : The value of quaternion wxyz data's
2675
 *
2676
 *  Parameter |    result
2677
 *  --------- | -----------------
2678
 *   w        | The quaternion w data
2679
 *   x        | The quaternion x data
2680
 *   y        | The quaternion y data
2681
 *   z        | The quaternion z data
2682
 *
2683
 *
2684
 *
2685
 *  @return results of bus communication function
2686
 *  @retval 0 -> BNO055_SUCCESS
2687
 *  @retval 1 -> BNO055_ERROR
2688
 *
2689
 */
2690
BNO055_RETURN_FUNCTION_TYPE bno055_read_quaternion_wxyz(
2691
        struct bno055_quaternion_t *quaternion);
2692
/**************************************************/
2693
/**\name LINEAR ACCEL DATA READ FUNCTIONS */
2694
/**************************************************/
2695
/*!
2696
 *  @brief This API reads Linear accel data x values
2697
 *  from register 0x29 and 0x2A it is a two byte data
2698
 *
2699
 *  @param linear_accel_x_s16 : The raw x data
2700
 *
2701
 *  @return results of bus communication function
2702
 *  @retval 0 -> BNO055_SUCCESS
2703
 *  @retval 1 -> BNO055_ERROR
2704
 *
2705
 *
2706
 */
2707
BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_x(s16 *linear_accel_x_s16);
2708
/*!
2709
 *  @brief This API reads Linear accel data x values
2710
 *  from register 0x2B and 0x2C it is a two byte data
2711
 *
2712
 *  @param linear_accel_y_s16 : The raw y data
2713
 *
2714
 *  @return results of bus communication function
2715
 *  @retval 0 -> BNO055_SUCCESS
2716
 *  @retval 1 -> BNO055_ERROR
2717
 *
2718
 *
2719
 */
2720
BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_y(s16 *linear_accel_y_s16);
2721
/*!
2722
 *  @brief This API reads Linear accel data x values
2723
 *  from register 0x2C and 0x2D it is a two byte data
2724
 *
2725
 *  @param linear_accel_z_s16 : The raw z data
2726
 *
2727
 *  @return results of bus communication function
2728
 *  @retval 0 -> BNO055_SUCCESS
2729
 *  @retval 1 -> BNO055_ERROR
2730
 *
2731
 *
2732
 */
2733
BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_z(s16 *linear_accel_z_s16);
2734
/*!
2735
 *  @brief This API reads Linear accel data xyz values
2736
 *  from register 0x28 to 0x2D it is a six byte data
2737
 *
2738
 *
2739
 *  @param linear_accel : The value of linear accel xyz data's
2740
 *
2741
 *  Parameter |    result
2742
 *  --------- | -----------------
2743
 *   x        | The linear accel x data
2744
 *   y        | The linear accel y data
2745
 *   z        | The linear accel z data
2746
 *
2747
 *
2748
 *  @return results of bus communication function
2749
 *  @retval 0 -> BNO055_SUCCESS
2750
 *  @retval 1 -> BNO055_ERROR
2751
 */
2752
BNO055_RETURN_FUNCTION_TYPE bno055_read_linear_accel_xyz(
2753
        struct bno055_linear_accel_t *linear_accel);
2754
/**************************************************/
2755
/**\name GRAVITY DATA READ FUNCTIONS */
2756
/**************************************************/
2757
/*!
2758
 *  @brief This API reads gravity data x values
2759
 *  from register 0x2E and 0x2F it is a two byte data
2760
 *
2761
 *  @param gravity_x_s16 : The raw x data
2762
 *
2763
 *  @return results of bus communication function
2764
 *  @retval 0 -> BNO055_SUCCESS
2765
 *  @retval 1 -> BNO055_ERROR
2766
 *
2767
 *
2768
 */
2769
BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_x(s16 *gravity_x_s16);
2770
/*!
2771
 *  @brief This API reads gravity data y values
2772
 *  from register 0x30 and 0x31 it is a two byte data
2773
 *
2774
 *  @param gravity_y_s16 : The raw y data
2775
 *
2776
 *  @return results of bus communication function
2777
 *  @retval 0 -> BNO055_SUCCESS
2778
 *  @retval 1 -> BNO055_ERROR
2779
 *
2780
 *
2781
 */
2782
BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_y(s16 *gravity_y_s16);
2783
/*!
2784
 *  @brief This API reads gravity data z values
2785
 *  from register 0x32 and 0x33 it is a two byte data
2786
 *
2787
 *  @param gravity_z_s16 : The raw z data
2788
 *
2789
 *  @return results of bus communication function
2790
 *  @retval 0 -> BNO055_SUCCESS
2791
 *  @retval 1 -> BNO055_ERROR
2792
 *
2793
 *
2794
 */
2795
BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_z(s16 *gravity_z_s16);
2796
/*!
2797
 * @brief This API reads gravity data xyz values
2798
 *  from register 0x2E to 0x33 it is a six byte data
2799
 *
2800
 *
2801
 *  @param gravity : The value of gravity xyz data's
2802
 *
2803
 *  Parameter |    result
2804
 *  --------- | -----------------
2805
 *   x        | The gravity x data
2806
 *   y        | The gravity y data
2807
 *   z        | The gravity z data
2808
 *
2809
 *
2810
 *  @return results of bus communication function
2811
 *  @retval 0 -> BNO055_SUCCESS
2812
 *  @retval 1 -> BNO055_ERROR
2813
 *
2814
 */
2815
BNO055_RETURN_FUNCTION_TYPE bno055_read_gravity_xyz(
2816
        struct bno055_gravity_t *gravity);
2817
/**************************************************/
2818
/**\name TEMPERATURE DATA READ FUNCTIONS */
2819
/**************************************************/
2820
/*!
2821
 *  @brief This API reads temperature values
2822
 *  from register 0x33 it is a byte data
2823
 *
2824
 *  @param temp_s8 : The raw temperature data
2825
 *
2826
 *  @return results of bus communication function
2827
 *  @retval 0 -> BNO055_SUCCESS
2828
 *  @retval 1 -> BNO055_ERROR
2829
 *
2830
 *
2831
 */
2832
BNO055_RETURN_FUNCTION_TYPE bno055_read_temp_data(s8 *temp_s8);
2833
#ifdef  BNO055_FLOAT_ENABLE
2834
/********************************************************************/
2835
/**\name FUNCTIONS FOR READING ACCEL DATA OUTPUT AS FLOAT PRECISION */
2836
/********************************************************************/
2837
/*!
2838
 *  @brief This API is used to convert the accel x raw data
2839
 *  to meterpersecseq output as float
2840
 *
2841
 *  @param accel_x_f : The accel x meterpersecseq data
2842
 *
2843
 *
2844
 *
2845
 *  @return results of bus communication function
2846
 *  @retval 0 -> BNO055_SUCCESS
2847
 *  @retval 1 -> BNO055_ERROR
2848
 *
2849
 *
2850
 */
2851
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_x_msq(float *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 accel_y_f : The accel y meterpersecseq data
2857
 *
2858
 *
2859
 *
2860
 *  @return results of bus communication function
2861
 *  @retval 0 -> BNO055_SUCCESS
2862
 *  @retval 1 -> BNO055_ERROR
2863
 *
2864
 *
2865
 */
2866
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_y_msq(float *accel_y_f);
2867
/*!
2868
 *  @brief This API is used to convert the accel z raw data
2869
 *  to meterpersecseq output as float
2870
 *
2871
 *  @param accel_z_f : The accel z meterpersecseq data
2872
 *
2873
 *
2874
 *
2875
 *  @return results of bus communication function
2876
 *  @retval 0 -> BNO055_SUCCESS
2877
 *  @retval 1 -> BNO055_ERROR
2878
 *
2879
 *
2880
 */
2881
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_z_msq(float *accel_z_f);
2882
/*!
2883
 *  @brief This API is used to convert the accel y raw data
2884
 *  to millig output as float
2885
 *
2886
 *  @param accel_x_f : The accel y millig data
2887
 *
2888
 *
2889
 *
2890
 *  @return results of bus communication function
2891
 *  @retval 0 -> BNO055_SUCCESS
2892
 *  @retval 1 -> BNO055_ERROR
2893
 *
2894
 */
2895
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_x_mg(float *accel_x_f);
2896
/*!
2897
 *  @brief This API is used to convert the accel y raw data
2898
 *  to millig output as float
2899
 *
2900
 *  @param accel_y_f : The accel y millig data
2901
 *
2902
 *
2903
 *
2904
 *  @return results of bus communication function
2905
 *  @retval 0 -> BNO055_SUCCESS
2906
 *  @retval 1 -> BNO055_ERROR
2907
 *
2908
 */
2909
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_y_mg(float *accel_y_f);
2910
/*!
2911
 *  @brief This API is used to convert the accel z raw data
2912
 *  to millig output as float
2913
 *
2914
 *  @param accel_z_f : The accel z millig data
2915
 *
2916
 *
2917
 *
2918
 *  @return results of bus communication function
2919
 *  @retval 0 -> BNO055_SUCCESS
2920
 *  @retval 1 -> BNO055_ERROR
2921
 *
2922
 *
2923
 */
2924
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_z_mg(float *accel_z_f);
2925
/*!
2926
 *  @brief This API is used to convert the accel xyz raw data
2927
 *  to meterpersecseq output as float
2928
 *
2929
 *  @param accel_xyz : The meterpersecseq data of accel xyz
2930
 *
2931
 *  Parameter |    result
2932
 *  --------- | -----------------
2933
 *   x        | meterpersecseq data of accel
2934
 *   y        | meterpersecseq data of accel
2935
 *   z        | meterpersecseq data of accel
2936
 *
2937
 *  @return results of bus communication function
2938
 *  @retval 0 -> BNO055_SUCCESS
2939
 *  @retval 1 -> BNO055_ERROR
2940
 *
2941
 *
2942
 */
2943
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_xyz_msq(
2944
        struct bno055_accel_float_t *accel_xyz);
2945
/*!
2946
 *  @brief This API is used to convert the accel xyz raw data
2947
 *  to millig output as float
2948
 *
2949
 *  @param accel_xyz : The millig data of accel xyz
2950
 *
2951
 *  Parameter |    result
2952
 *  --------- | -----------------
2953
 *   x        | millig data of accel
2954
 *   y        | millig data of accel
2955
 *   z        | millig data of accel
2956
 *
2957
 *
2958
 *  @return results of bus communication function
2959
 *  @retval 0 -> BNO055_SUCCESS
2960
 *  @retval 1 -> BNO055_ERROR
2961
 *
2962
 *
2963
 */
2964
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_accel_xyz_mg(
2965
        struct bno055_accel_float_t *accel_xyz);
2966
/********************************************************************/
2967
/**\name FUNCTIONS FOR READING MAG DATA OUTPUT AS FLOAT PRECISION */
2968
/********************************************************************/
2969
/*!
2970
 *  @brief This API is used to convert the mag x raw data
2971
 *  to microTesla output as float
2972
 *
2973
 *  @param mag_x_f : The mag x microTesla data
2974
 *
2975
 *
2976
 *
2977
 *  @return results of bus communication function
2978
 *  @retval 0 -> BNO055_SUCCESS
2979
 *  @retval 1 -> BNO055_ERROR
2980
 *
2981
 *
2982
 */
2983
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_x_uT(float *mag_x_f);
2984
/*!
2985
 *  @brief This API is used to convert the mag y raw data
2986
 *  to microTesla output as float
2987
 *
2988
 *  @param mag_y_f : The mag y microTesla data
2989
 *
2990
 *
2991
 *
2992
 *  @return results of bus communication function
2993
 *  @retval 0 -> BNO055_SUCCESS
2994
 *  @retval 1 -> BNO055_ERROR
2995
 *
2996
 */
2997
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_y_uT(float *mag_y_f);
2998
/*!
2999
 *  @brief This API is used to convert the mag z raw data
3000
 *  to microTesla output as float
3001
 *
3002
 *  @param mag_z_f : The mag z microTesla data
3003
 *
3004
 *
3005
 *
3006
 *  @return results of bus communication function
3007
 *  @retval 0 -> BNO055_SUCCESS
3008
 *  @retval 1 -> BNO055_ERROR
3009
 *
3010
 */
3011
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_z_uT(float *mag_z_f);
3012
/*!
3013
 *  @brief This API is used to convert the mag yz raw data
3014
 *  to microTesla output as float
3015
 *
3016
 *  @param mag_xyz_data : The microTesla data of mag xyz
3017
 *
3018
 *  Parameter |    result
3019
 *  --------- | -----------------
3020
 *    x       | microTesla data of mag
3021
 *    y       | microTesla data of mag
3022
 *    z       | microTesla data of mag
3023
 *
3024
 *
3025
 *  @return results of bus communication function
3026
 *  @retval 0 -> BNO055_SUCCESS
3027
 *  @retval 1 -> BNO055_ERROR
3028
 *
3029
 */
3030
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_mag_xyz_uT(
3031
        struct bno055_mag_float_t *mag_xyz_data);
3032
/********************************************************************/
3033
/**\name FUNCTIONS FOR READING GYRO DATA OUTPUT AS FLOAT PRECISION */
3034
/********************************************************************/
3035
/*!
3036
 *  @brief This API is used to convert the gyro x raw data
3037
 *  to dps output as float
3038
 *
3039
 *  @param gyro_x_f : The gyro x dps float data
3040
 *
3041
 *
3042
 *
3043
 *  @return results of bus communication function
3044
 *  @retval 0 -> BNO055_SUCCESS
3045
 *  @retval 1 -> BNO055_ERROR
3046
 */
3047
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_x_dps(float *gyro_x_f);
3048
/*!
3049
 *  @brief This API is used to convert the gyro x raw data
3050
 *  to rps output as float
3051
 *
3052
 *  @param gyro_x_f : The gyro x dps float data
3053
 *
3054
 *
3055
 *
3056
 *  @return results of bus communication function
3057
 *  @retval 0 -> BNO055_SUCCESS
3058
 *  @retval 1 -> BNO055_ERROR
3059
 *
3060
 */
3061
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_x_rps(float *gyro_x_f);
3062
/*!
3063
 *  @brief This API is used to convert the gyro y raw data
3064
 *  to dps output as float
3065
 *
3066
 *  @param gyro_y_f : The gyro y dps float data
3067
 *
3068
 *
3069
 *
3070
 *  @return results of bus communication function
3071
 *  @retval 0 -> BNO055_SUCCESS
3072
 *  @retval 1 -> BNO055_ERROR
3073
 *
3074
 */
3075
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_y_dps(float *gyro_y_f);
3076
/*!
3077
 *  @brief This API is used to convert the gyro y raw data
3078
 *  to rps output as float
3079
 *
3080
 *  @param gyro_y_f : The gyro y dps float data
3081
 *
3082
 *
3083
 *
3084
 *  @return results of bus communication function
3085
 *  @retval 0 -> BNO055_SUCCESS
3086
 *  @retval 1 -> BNO055_ERROR
3087
 *
3088
 *
3089
 */
3090
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_y_rps(float *gyro_y_f);
3091
/*!
3092
 *  @brief This API is used to convert the gyro z raw data
3093
 *  to dps output as float
3094
 *
3095
 *  @param gyro_z_f : The gyro z dps float data
3096
 *
3097
 *
3098
 *
3099
 *  @return results of bus communication function
3100
 *  @retval 0 -> BNO055_SUCCESS
3101
 *  @retval 1 -> BNO055_ERROR
3102
 *
3103
 */
3104
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_z_dps(float *gyro_z_f);
3105
/*!
3106
 *  @brief This API is used to convert the gyro z raw data
3107
 *  to rps output as float
3108
 *
3109
 *  @param gyro_z_f : The gyro z rps float data
3110
 *
3111
 *
3112
 *
3113
 *  @return results of bus communication function
3114
 *  @retval 0 -> BNO055_SUCCESS
3115
 *  @retval 1 -> BNO055_ERROR
3116
 *
3117
 */
3118
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_z_rps(float *gyro_z_f);
3119
/*!
3120
 *  @brief This API is used to convert the gyro xyz raw data
3121
 *  to dps output as float
3122
 *
3123
 *  @param gyro_xyz_data : The dps data of gyro xyz
3124
 *
3125
 *  Parameter |    result
3126
 *  --------- | -----------------
3127
 *    x       | dps data of gyro
3128
 *    y       | dps data of gyro
3129
 *    z       | dps data of gyro
3130
 *
3131
 *
3132
 *  @return results of bus communication function
3133
 *  @retval 0 -> BNO055_SUCCESS
3134
 *  @retval 1 -> BNO055_ERROR
3135
 *
3136
 *
3137
 */
3138
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_xyz_dps(
3139
        struct bno055_gyro_float_t *gyro_xyz_data);
3140
/*!
3141
 *  @brief This API is used to convert the gyro xyz raw data
3142
 *  to rps output as float
3143
 *
3144
 *  @param gyro_xyz_data : The rps data of gyro xyz
3145
 *
3146
 *  Parameter |    result
3147
 *  --------- | -----------------
3148
 *    x       | rps data of gyro
3149
 *    y       | rps data of gyro
3150
 *    z       | rps data of gyro
3151
 *
3152
 *
3153
 *  @return results of bus communication function
3154
 *  @retval 0 -> BNO055_SUCCESS
3155
 *  @retval 1 -> BNO055_ERROR
3156
 *
3157
 *
3158
 */
3159
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gyro_xyz_rps(
3160
        struct bno055_gyro_float_t *gyro_xyz_data);
3161
/********************************************************************/
3162
/**\name FUNCTIONS FOR READING EULER DATA OUTPUT AS FLOAT PRECISION */
3163
/********************************************************************/
3164
/*!
3165
 *  @brief This API is used to convert the Euler h raw data
3166
 *  to degree output as float
3167
 *
3168
 *  @param euler_h_f : The float value of Euler h degree
3169
 *
3170
 *  @return results of bus communication function
3171
 *  @retval 0 -> BNO055_SUCCESS
3172
 *  @retval 1 -> BNO055_ERROR
3173
 *
3174
 *
3175
 */
3176
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_h_deg(float *euler_h_f);
3177
/*!
3178
 *  @brief This API is used to convert the Euler h raw data
3179
 *  to radians output as float
3180
 *
3181
 *  @param euler_h_f : The float value of Euler h radians
3182
 *
3183
 *  @return results of bus communication function
3184
 *  @retval 0 -> BNO055_SUCCESS
3185
 *  @retval 1 -> BNO055_ERROR
3186
 *
3187
 *
3188
 */
3189
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_h_rad(float *euler_h_f);
3190
/*!
3191
 *  @brief This API is used to convert the Euler r raw data
3192
 *  to degree output as float
3193
 *
3194
 *  @param euler_r_f : The float value of Euler r degree
3195
 *
3196
 *  @return results of bus communication function
3197
 *  @retval 0 -> BNO055_SUCCESS
3198
 *  @retval 1 -> BNO055_ERROR
3199
 *
3200
 */
3201
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_r_deg(float *euler_r_f);
3202
/*!
3203
 *  @brief This API is used to convert the Euler r raw data
3204
 *  to radians output as float
3205
 *
3206
 *  @param euler_r_f : The float value of Euler r radians
3207
 *
3208
 *  @return results of bus communication function
3209
 *  @retval 0 -> BNO055_SUCCESS
3210
 *  @retval 1 -> BNO055_ERROR
3211
 *
3212
 */
3213
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_r_rad(float *euler_r_f);
3214
/*!
3215
 *  @brief This API is used to convert the Euler p raw data
3216
 *  to degree output as float
3217
 *
3218
 *  @param euler_p_f : The float value of Euler p degree
3219
 *
3220
 *  @return results of bus communication function
3221
 *  @retval 0 -> BNO055_SUCCESS
3222
 *  @retval 1 -> BNO055_ERROR
3223
 *
3224
 */
3225
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_p_deg(float *euler_p_f);
3226
/*!
3227
 *  @brief This API is used to convert the Euler p raw data
3228
 *  to radians output as float
3229
 *
3230
 *  @param euler_p_f : The float value of Euler p radians
3231
 *
3232
 *  @return results of bus communication function
3233
 *  @retval 0 -> BNO055_SUCCESS
3234
 *  @retval 1 -> BNO055_ERROR
3235
 *
3236
 *
3237
 */
3238
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_p_rad(float *euler_p_f);
3239
/*!
3240
 *  @brief This API is used to convert the Euler hrp raw data
3241
 *  to degree output as float
3242
 *
3243
 *  @param euler_hpr : The degree data of Euler hrp
3244
 *
3245
 *  Parameter |    result
3246
 *  --------- | -----------------
3247
 *    h       | degree data of Euler
3248
 *    r       | degree data of Euler
3249
 *    p       | degree data of Euler
3250
 *
3251
 *
3252
 *  @return results of bus communication function
3253
 *  @retval 0 -> BNO055_SUCCESS
3254
 *  @retval 1 -> BNO055_ERROR
3255
 *
3256
 */
3257
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_hpr_deg(
3258
        struct bno055_euler_float_t *euler_hpr);
3259
/*!
3260
 *  @brief This API is used to convert the Euler xyz raw data
3261
 *  to radians output as float
3262
 *
3263
 *  @param euler_hpr : The radians data of Euler hrp
3264
 *
3265
 *  Parameter |    result
3266
 *  --------- | -----------------
3267
 *    h       | radians data of Euler
3268
 *    r       | radians data of Euler
3269
 *    p       | radians data of Euler
3270
 *
3271
 *
3272
 *  @return results of bus communication function
3273
 *  @retval 0 -> BNO055_SUCCESS
3274
 *  @retval 1 -> BNO055_ERROR
3275
 *
3276
 */
3277
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_euler_hpr_rad(
3278
        struct bno055_euler_float_t *euler_hpr);
3279
/***************************************************************************/
3280
/**\name FUNCTIONS FOR READING LINEAR ACCEL DATA OUTPUT AS FLOAT PRECISION */
3281
/**************************************************************************/
3282
/*!
3283
 *  @brief This API is used to convert the linear
3284
 *  accel x raw data to meterpersecseq output as float
3285
 *
3286
 *  @param linear_accel_x_f : The float value of linear accel x meterpersecseq
3287
 *
3288
 *  @return results of bus communication function
3289
 *  @retval 0 -> BNO055_SUCCESS
3290
 *  @retval 1 -> BNO055_ERROR
3291
 */
3292
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_x_msq(
3293
        float *linear_accel_x_f);
3294
/*!
3295
 *  @brief This API is used to convert the linear
3296
 *  accel y raw data to meterpersecseq output as float
3297
 *
3298
 *  @param linear_accel_y_f : The float value of linear accel y meterpersecseq
3299
 *
3300
 *  @return results of bus communication function
3301
 *  @retval 0 -> BNO055_SUCCESS
3302
 *  @retval 1 -> BNO055_ERROR
3303
 */
3304
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_y_msq(
3305
        float *linear_accel_y_f);
3306
/*!
3307
 *  @brief This API is used to convert the linear
3308
 *  accel z raw data to meterpersecseq output as float
3309
 *
3310
 *  @param linear_accel_z_f : The float value of linear accel z meterpersecseq
3311
 *
3312
 *  @return results of bus communication function
3313
 *  @retval 0 -> BNO055_SUCCESS
3314
 *  @retval 1 -> BNO055_ERROR
3315
 *
3316
 */
3317
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_z_msq(
3318
        float *linear_accel_z_f);
3319
/*!
3320
 *  @brief This API is used to convert the linear accel xyz raw data
3321
 *  to meterpersecseq output as float
3322
 *
3323
 *  @param linear_accel_xyz : The meterpersecseq data of linear accel xyz
3324
 *
3325
 *  Parameter |    result
3326
 *  --------- | -----------------
3327
 *    x       | meterpersecseq data of linear accel
3328
 *    y       | meterpersecseq data of linear accel
3329
 *    z       | meterpersecseq data of linear accel
3330
 *
3331
 *
3332
 *  @return results of bus communication function
3333
 *  @retval 0 -> BNO055_SUCCESS
3334
 *  @retval 1 -> BNO055_ERROR
3335
 *
3336
 *
3337
 */
3338
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_linear_accel_xyz_msq(
3339
        struct bno055_linear_accel_float_t *linear_accel_xyz);
3340
/********************************************************************/
3341
/**\name FUNCTIONS FOR READING GRAVITY DATA OUTPUT AS FLOAT PRECISION */
3342
/********************************************************************/
3343
/*!
3344
 *  @brief This API is used to convert the gravity
3345
 *  x raw data to meterpersecseq output as float
3346
 *
3347
 *  @param gravity_x_f : The float value of gravity x meterpersecseq
3348
 *
3349
 *  @return results of bus communication function
3350
 *  @retval 0 -> BNO055_SUCCESS
3351
 *  @retval 1 -> BNO055_ERROR
3352
 *
3353
 *
3354
 */
3355
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_x_msq(
3356
        float *gravity_x_f);
3357
/*!
3358
 *  @brief This API is used to convert the gravity
3359
 *  y raw data to meterpersecseq output as float
3360
 *
3361
 *  @param gravity_y_f : The float value of gravity y meterpersecseq
3362
 *
3363
 *  @return results of bus communication function
3364
 *  @retval 0 -> BNO055_SUCCESS
3365
 *  @retval 1 -> BNO055_ERROR
3366
 *
3367
 *
3368
 */
3369
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_y_msq(
3370
        float *gravity_y_f);
3371
/*!
3372
 *  @brief This API is used to convert the gravity
3373
 *  z raw data to meterpersecseq output as float
3374
 *
3375
 *  @param gravity_z_f : The float value of gravity z meterpersecseq
3376
 *
3377
 *  @return results of bus communication function
3378
 *  @retval 0 -> BNO055_SUCCESS
3379
 *  @retval 1 -> BNO055_ERROR
3380
 *
3381
 */
3382
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_float_z_msq(
3383
        float *gravity_z_f);
3384
/*!
3385
 *  @brief This API is used to convert the gravity xyz raw data
3386
 *  to meterpersecseq output as float
3387
 *
3388
 *  @param gravity_xyz : The meterpersecseq data of gravity xyz
3389
 *
3390
 *  Parameter |    result
3391
 *  --------- | -----------------
3392
 *    x       | meterpersecseq data of gravity
3393
 *    y       | meterpersecseq data of gravity
3394
 *    z       | meterpersecseq data of gravity
3395
 *
3396
 *
3397
 *  @return results of bus communication function
3398
 *  @retval 0 -> BNO055_SUCCESS
3399
 *  @retval 1 -> BNO055_ERROR
3400
 *
3401
 *
3402
 */
3403
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_gravity_xyz_msq(
3404
        struct bno055_gravity_float_t *gravity_xyz);
3405
/**************************************************************************/
3406
/**\name FUNCTIONS FOR READING TEMPERATURE DATA OUTPUT AS FLOAT PRECISION */
3407
/*************************************************************************/
3408
/*!
3409
 *  @brief This API is used to convert the temperature
3410
 *  data to Fahrenheit output as float
3411
 *
3412
 *  @param temp_f : The float value of temperature Fahrenheit
3413
 *
3414
 *  @return results of bus communication function
3415
 *  @retval 0 -> BNO055_SUCCESS
3416
 *  @retval 1 -> BNO055_ERROR
3417
 *
3418
 *
3419
 */
3420
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_temp_fahrenheit(float *temp_f);
3421
/*!
3422
 *  @brief This API is used to convert the temperature
3423
 *  data to Celsius output as float
3424
 *
3425
 *  @param temp_f : The float value of temperature Celsius
3426
 *
3427
 *  @return results of bus communication function
3428
 *  @retval 0 -> BNO055_SUCCESS
3429
 *  @retval 1 -> BNO055_ERROR
3430
 *
3431
 *
3432
 *
3433
 */
3434
BNO055_RETURN_FUNCTION_TYPE bno055_convert_float_temp_celsius(float *temp_f);
3435
#endif
3436
#ifdef  BNO055_DOUBLE_ENABLE
3437
/**************************************************************************/
3438
/**\name FUNCTIONS FOR READING ACCEL DATA OUTPUT AS DOUBLE PRECISION */
3439
/*************************************************************************/
3440
/*!
3441
 *  @brief This API is used to convert the accel x raw data
3442
 *  to meterpersecseq output as double
3443
 *
3444
 *  @param accel_x_d : The accel x meterpersecseq data
3445
 *
3446
 *
3447
 *
3448
 *  @return results of bus communication function
3449
 *  @retval 0 -> BNO055_SUCCESS
3450
 *  @retval 1 -> BNO055_ERROR
3451
 *
3452
 *
3453
 */
3454
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_x_msq(double *accel_x_d);
3455
/*!
3456
 *  @brief This API is used to convert the accel y raw data
3457
 *  to meterpersecseq output as double
3458
 *
3459
 *  @param accel_y_d : The accel y meterpersecseq data
3460
 *
3461
 *
3462
 *
3463
 *  @return results of bus communication function
3464
 *  @retval 0 -> BNO055_SUCCESS
3465
 *  @retval 1 -> BNO055_ERROR
3466
 *
3467
 *
3468
 *
3469
 */
3470
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_y_msq(double *accel_y_d);
3471
/*!
3472
 *  @brief This API is used to convert the accel z raw data
3473
 *  to meterpersecseq output as double
3474
 *
3475
 *  @param accel_z_d : The accel z meterpersecseq data
3476
 *
3477
 *
3478
 *
3479
 *  @return results of bus communication function
3480
 *  @retval 0 -> BNO055_SUCCESS
3481
 *  @retval 1 -> BNO055_ERROR
3482
 */
3483
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_z_msq(double *accel_z_d);
3484
/*!
3485
 *  @brief This API is used to convert the accel x raw data
3486
 *  to millig output as double
3487
 *
3488
 *  @param accel_x_d : The accel x millig data
3489
 *
3490
 *
3491
 *
3492
 *  @return results of bus communication function
3493
 *  @retval 0 -> BNO055_SUCCESS
3494
 *  @retval 1 -> BNO055_ERROR
3495
 *
3496
 *
3497
 *
3498
 */
3499
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_x_mg(double *accel_x_d);
3500
/*!
3501
 *  @brief This API is used to convert the accel y raw data
3502
 *  to millig output as double
3503
 *
3504
 *  @param accel_y_d : The accel y millig data
3505
 *
3506
 *
3507
 *
3508
 *  @return results of bus communication function
3509
 *  @retval 0 -> BNO055_SUCCESS
3510
 *  @retval 1 -> BNO055_ERROR
3511
 *
3512
 *
3513
 */
3514
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_y_mg(double *accel_y_d);
3515
/*!
3516
 *  @brief This API is used to convert the accel z raw data
3517
 *  to millig output as double
3518
 *
3519
 *  @param accel_z_d : The accel z millig data
3520
 *
3521
 *
3522
 *
3523
 *  @return results of bus communication function
3524
 *  @retval 0 -> BNO055_SUCCESS
3525
 *  @retval 1 -> BNO055_ERROR
3526
 *
3527
 */
3528
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_z_mg(double *accel_z_d);
3529
/*!
3530
 *  @brief This API is used to convert the accel xyz raw data
3531
 *  to meterpersecseq output as double
3532
 *
3533
 *  @param accel_xyz : The meterpersecseq data of accel xyz
3534
 *
3535
 *  Parameter |    result
3536
 *  --------- | -----------------
3537
 *   x        | meterpersecseq data of accel
3538
 *   y        | meterpersecseq data of accel
3539
 *   z        | meterpersecseq data of accel
3540
 *
3541
 *
3542
 *  @return results of bus communication function
3543
 *  @retval 0 -> BNO055_SUCCESS
3544
 *  @retval 1 -> BNO055_ERROR
3545
 *
3546
 *
3547
 */
3548
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_xyz_msq(
3549
        struct bno055_accel_double_t *accel_xyz);
3550
/*!
3551
 *  @brief This API is used to convert the accel xyz raw data
3552
 *  to millig output as double
3553
 *
3554
 *  @param accel_xyz : The millig data of accel xyz
3555
 *
3556
 *  Parameter |    result
3557
 *  --------- | -----------------
3558
 *   x        | millig data of accel
3559
 *   y        | millig data of accel
3560
 *   z        | millig data of accel
3561
 *
3562
 *
3563
 *  @return results of bus communication function
3564
 *  @retval 0 -> BNO055_SUCCESS
3565
 *  @retval 1 -> BNO055_ERROR
3566
 *
3567
 */
3568
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_accel_xyz_mg(
3569
        struct bno055_accel_double_t *accel_xyz);
3570
/**************************************************************************/
3571
/**\name FUNCTIONS FOR READING MAG DATA OUTPUT AS DOUBLE PRECISION */
3572
/*************************************************************************/
3573
/*!
3574
 *  @brief This API is used to convert the mag x raw data
3575
 *  to microTesla output as double
3576
 *
3577
 *  @param mag_x_d : The mag x microTesla data
3578
 *
3579
 *
3580
 *
3581
 *  @return results of bus communication function
3582
 *  @retval 0 -> BNO055_SUCCESS
3583
 *  @retval 1 -> BNO055_ERROR
3584
 *
3585
 *
3586
 *
3587
 */
3588
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_x_uT(double *mag_x_d);
3589
/*!
3590
 *  @brief This API is used to convert the mag x raw data
3591
 *  to microTesla output as double
3592
 *
3593
 *  @param mag_y_d : The mag x microTesla data
3594
 *
3595
 *
3596
 *
3597
 *  @return results of bus communication function
3598
 *  @retval 0 -> BNO055_SUCCESS
3599
 *  @retval 1 -> BNO055_ERROR
3600
 *
3601
 *
3602
 *
3603
 */
3604
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_y_uT(double *mag_y_d);
3605
/*!
3606
 *  @brief This API is used to convert the mag z raw data
3607
 *  to microTesla output as double
3608
 *
3609
 *  @param mag_z_d : The mag z microTesla data
3610
 *
3611
 *
3612
 *
3613
 *  @return results of bus communication function
3614
 *  @retval 0 -> BNO055_SUCCESS
3615
 *  @retval 1 -> BNO055_ERROR
3616
 *
3617
 *
3618
 */
3619
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_z_uT(double *mag_z_d);
3620
/*!
3621
 *  @brief This API is used to convert the mag yz raw data
3622
 *  to microTesla output as double
3623
 *
3624
 *  @param mag_xyz : The microTesla data of mag xyz
3625
 *
3626
 *  Parameter |    result
3627
 *  --------- | -----------------
3628
 *   x        | microTesla data of mag
3629
 *   y        | microTesla data of mag
3630
 *   z        | microTesla data of mag
3631
 *
3632
 *
3633
 *  @return results of bus communication function
3634
 *  @retval 0 -> BNO055_SUCCESS
3635
 *  @retval 1 -> BNO055_ERROR
3636
 *
3637
 */
3638
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_mag_xyz_uT(
3639
        struct bno055_mag_double_t *mag_xyz);
3640
/**************************************************************************/
3641
/**\name FUNCTIONS FOR READING GYRO DATA OUTPUT AS DOUBLE PRECISION */
3642
/*************************************************************************/
3643
/*!
3644
 *  @brief This API is used to convert the gyro x raw data
3645
 *  to dps output as double
3646
 *
3647
 *  @param gyro_x_d : The gyro x dps double data
3648
 *
3649
 *
3650
 *
3651
 *  @return results of bus communication function
3652
 *  @retval 0 -> BNO055_SUCCESS
3653
 *  @retval 1 -> BNO055_ERROR
3654
 *
3655
 *
3656
 */
3657
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_x_dps(double *gyro_x_d);
3658
/*!
3659
 *  @brief This API is used to convert the gyro y raw data
3660
 *  to dps output as double
3661
 *
3662
 *  @param gyro_y_d : The gyro y dps double data
3663
 *
3664
 *
3665
 *
3666
 *  @return results of bus communication function
3667
 *  @retval 0 -> BNO055_SUCCESS
3668
 *  @retval 1 -> BNO055_ERROR
3669
 *
3670
 *
3671
 */
3672
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_y_dps(double *gyro_y_d);
3673
/*!
3674
 *  @brief This API is used to convert the gyro z raw data
3675
 *  to dps output as double
3676
 *
3677
 *  @param gyro_z_d : The gyro z dps double data
3678
 *
3679
 *
3680
 *
3681
 *  @return results of bus communication function
3682
 *  @retval 0 -> BNO055_SUCCESS
3683
 *  @retval 1 -> BNO055_ERROR
3684
 *
3685
 *
3686
 */
3687
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_z_dps(double *gyro_z_d);
3688
/*!
3689
 *  @brief This API is used to convert the gyro x raw data
3690
 *  to rps output as double
3691
 *
3692
 *  @param gyro_x_d : The gyro x dps double data
3693
 *
3694
 *
3695
 *
3696
 *  @return results of bus communication function
3697
 *  @retval 0 -> BNO055_SUCCESS
3698
 *  @retval 1 -> BNO055_ERROR
3699
 *
3700
 *
3701
 */
3702
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_x_rps(double *gyro_x_d);
3703
/*!
3704
 *  @brief This API is used to convert the gyro y raw data
3705
 *  to rps output as double
3706
 *
3707
 *  @param gyro_y_d : The gyro y dps double data
3708
 *
3709
 *
3710
 *
3711
 *  @return results of bus communication function
3712
 *  @retval 0 -> BNO055_SUCCESS
3713
 *  @retval 1 -> BNO055_ERROR
3714
 *
3715
 *
3716
 */
3717
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_y_rps(double *gyro_y_d);
3718
/*!
3719
 *  @brief This API is used to convert the gyro z raw data
3720
 *  to rps output as double
3721
 *
3722
 *  @param gyro_z_d : The gyro z rps double data
3723
 *
3724
 *
3725
 *
3726
 *  @return results of bus communication function
3727
 *  @retval 0 -> BNO055_SUCCESS
3728
 *  @retval 1 -> BNO055_ERROR
3729
 *
3730
 *
3731
 */
3732
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_z_rps(double *gyro_z_d);
3733
/*!
3734
 *  @brief This API is used to convert the gyro xyz raw data
3735
 *  to dps output as double
3736
 *
3737
 *  @param gyro_xyz : The dps data of gyro xyz
3738
 *
3739
 *  Parameter |    result
3740
 *  --------- | -----------------
3741
 *   x        | dps data of gyro
3742
 *   y        | dps data of gyro
3743
 *   z        | dps data of gyro
3744
 *
3745
 *
3746
 *  @return results of bus communication function
3747
 *  @retval 0 -> BNO055_SUCCESS
3748
 *  @retval 1 -> BNO055_ERROR
3749
 *
3750
 */
3751
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_xyz_dps(
3752
        struct bno055_gyro_double_t *gyro_xyz);
3753
/*!
3754
 *  @brief This API is used to convert the gyro xyz raw data
3755
 *  to rps output as double
3756
 *
3757
 *  @param gyro_xyz : The rps data of gyro xyz
3758
 *
3759
 *  Parameter |    result
3760
 *  --------- | -----------------
3761
 *   x        | rps data of gyro
3762
 *   y        | rps data of gyro
3763
 *   z        | rps data of gyro
3764
 *
3765
 *
3766
 *  @return results of bus communication function
3767
 *  @retval 0 -> BNO055_SUCCESS
3768
 *  @retval 1 -> BNO055_ERROR
3769
 *
3770
 */
3771
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gyro_xyz_rps(
3772
        struct bno055_gyro_double_t *gyro_xyz);
3773
/**************************************************************************/
3774
/**\name FUNCTIONS FOR READING EULER DATA OUTPUT AS DOUBLE PRECISION */
3775
/*************************************************************************/
3776
/*!
3777
 *  @brief This API is used to convert the Euler h raw data
3778
 *  to degree output as double
3779
 *
3780
 *  @param euler_h_d : The double value of Euler h degree
3781
 *
3782
 *  @return results of bus communication function
3783
 *  @retval 0 -> BNO055_SUCCESS
3784
 *  @retval 1 -> BNO055_ERROR
3785
 *
3786
 *
3787
 */
3788
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_h_deg(double *euler_h_d);
3789
/*!
3790
 *  @brief This API is used to convert the Euler p raw data
3791
 *  to degree output as double
3792
 *
3793
 *  @param euler_p_d : The double value of Euler p degree
3794
 *
3795
 *  @return results of bus communication function
3796
 *  @retval 0 -> BNO055_SUCCESS
3797
 *  @retval 1 -> BNO055_ERROR
3798
 *
3799
 *
3800
 */
3801
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_p_deg(double *euler_p_d);
3802
/*!
3803
 *  @brief This API is used to convert the Euler r raw data
3804
 *  to degree output as double
3805
 *
3806
 *  @param euler_r_d : The double value of Euler r degree
3807
 *
3808
 *  @return results of bus communication function
3809
 *  @retval 0 -> BNO055_SUCCESS
3810
 *  @retval 1 -> BNO055_ERROR
3811
 *
3812
 *
3813
 */
3814
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_r_deg(double *euler_r_d);
3815
/*!
3816
 *  @brief This API is used to convert the Euler h raw data
3817
 *  to radians output as double
3818
 *
3819
 *  @param euler_h_d : The double value of Euler h radians
3820
 *
3821
 *  @return results of bus communication function
3822
 *  @retval 0 -> BNO055_SUCCESS
3823
 *  @retval 1 -> BNO055_ERROR
3824
 *
3825
 *
3826
 */
3827
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_h_rad(double *euler_h_d);
3828
/*!
3829
 *  @brief This API is used to convert the Euler p raw data
3830
 *  to radians output as double
3831
 *
3832
 *  @param euler_p_d : The double value of Euler p radians
3833
 *
3834
 *  @return results of bus communication function
3835
 *  @retval 0 -> BNO055_SUCCESS
3836
 *  @retval 1 -> BNO055_ERROR
3837
 *
3838
 *
3839
 */
3840

    
3841
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_p_rad(double *euler_p_d);
3842
/*!
3843
 *  @brief This API is used to convert the Euler r raw data
3844
 *  to radians output as double
3845
 *
3846
 *  @param euler_r_d : The double value of Euler r radians
3847
 *
3848
 *  @return results of bus communication function
3849
 *  @retval 0 -> BNO055_SUCCESS
3850
 *  @retval 1 -> BNO055_ERROR
3851
 *
3852
 *
3853
 */
3854
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_r_rad(double *euler_r_d);
3855
/*!
3856
 *  @brief This API is used to convert the Euler hpr raw data
3857
 *  to degree output as double
3858
 *
3859
 *  @param euler_hpr : The degree data of Euler hpr
3860
 *
3861
 *  Parameter |    result
3862
 *  --------- | -----------------
3863
 *   h        | degree data of Euler
3864
 *   r        | degree data of Euler
3865
 *   p        | degree data of Euler
3866
 *
3867
 *
3868
 *  @return results of bus communication function
3869
 *  @retval 0 -> BNO055_SUCCESS
3870
 *  @retval 1 -> BNO055_ERROR
3871
 *
3872
 */
3873
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_hpr_deg(
3874
        struct bno055_euler_double_t *euler_hpr);
3875
/*!
3876
 *  @brief This API is used to convert the Euler hpr raw data
3877
 *  to radians output as double
3878
 *
3879
 *  @param euler_hpr : The radians data of Euler hpr
3880
 *
3881
 *  Parameter |    result
3882
 *  --------- | -----------------
3883
 *   h        | radians data of Euler
3884
 *   r        | radians data of Euler
3885
 *   p        | radians data of Euler
3886
 *
3887
 *
3888
 *  @return results of bus communication function
3889
 *  @retval 0 -> BNO055_SUCCESS
3890
 *  @retval 1 -> BNO055_ERROR
3891
 *
3892
 */
3893
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_euler_hpr_rad(
3894
        struct bno055_euler_double_t *euler_hpr);
3895
/****************************************************************************/
3896
/**\name FUNCTIONS FOR READING LINEAR ACCEL DATA OUTPUT AS DOUBLE PRECISION */
3897
/****************************************************************************/
3898
/*!
3899
 *  @brief This API is used to convert the linear
3900
 *  accel x raw data to meterpersecseq output as double
3901
 *
3902
 *  @param linear_accel_x_d : The double value of
3903
 *  linear accel x meterpersecseq
3904
 *
3905
 *  @return results of bus communication function
3906
 *  @retval 0 -> BNO055_SUCCESS
3907
 *  @retval 1 -> BNO055_ERROR
3908
 *
3909
 *
3910
 */
3911
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_x_msq(
3912
        double *linear_accel_x_d);
3913
/*!
3914
 *  @brief This API is used to convert the linear
3915
 *  accel y raw data to meterpersecseq output as double
3916
 *
3917
 *  @param linear_accel_y_d : The double value of
3918
 *  linear accel y meterpersecseq
3919
 *
3920
 *  @return results of bus communication function
3921
 *  @retval 0 -> BNO055_SUCCESS
3922
 *  @retval 1 -> BNO055_ERROR
3923
 *
3924
 *
3925
 */
3926
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_y_msq(
3927
        double *linear_accel_y_d);
3928
/*!
3929
 *  @brief This API is used to convert the linear
3930
 *  accel z raw data to meterpersecseq output as double
3931
 *
3932
 *  @param linear_accel_z_d : The double value of
3933
 *  linear accel z meterpersecseq
3934
 *
3935
 *  @return results of bus communication function
3936
 *  @retval 0 -> BNO055_SUCCESS
3937
 *  @retval 1 -> BNO055_ERROR
3938
 *
3939
 *
3940
 */
3941

    
3942
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_z_msq(
3943
        double *linear_accel_z_d);
3944
/*!
3945
 *  @brief This API is used to convert the linear accel xyz raw data
3946
 *  to meterpersecseq output as double
3947
 *
3948
 *  @param linear_accel_xyz : The meterpersecseq data of linear accel xyz
3949
 *
3950
 *  Parameter |    result
3951
 *  --------- | -----------------
3952
 *   x        | meterpersecseq data of linear accel
3953
 *   y        | meterpersecseq data of linear accel
3954
 *   z        | meterpersecseq data of linear accel
3955
 *
3956
 *
3957
 *  @return results of bus communication function
3958
 *  @retval 0 -> BNO055_SUCCESS
3959
 *  @retval 1 -> BNO055_ERROR
3960
 *
3961
 */
3962

    
3963
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_linear_accel_xyz_msq(
3964
        struct bno055_linear_accel_double_t *linear_accel_xyz);
3965
/**************************************************************************/
3966
/**\name FUNCTIONS FOR READING GRAVITY DATA OUTPUT AS DOUBLE PRECISION */
3967
/*************************************************************************/
3968
/*!
3969
 *  @brief This API is used to convert the gravity
3970
 *  x raw data to meterpersecseq output as double
3971
 *
3972
 *  @param gravity_x_d : The double value of gravity x meterpersecseq
3973
 *
3974
 *  @return results of bus communication function
3975
 *  @retval 0 -> BNO055_SUCCESS
3976
 *  @retval 1 -> BNO055_ERROR
3977
 *
3978
 *
3979
 */
3980
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_x_msq(
3981
        double *gravity_x_d);
3982
/*!
3983
 *  @brief This API is used to convert the gravity
3984
 *  y raw data to meterpersecseq output as double
3985
 *
3986
 *  @param gravity_y_d : The double value of gravity y meterpersecseq
3987
 *
3988
 *  @return results of bus communication function
3989
 *  @retval 0 -> BNO055_SUCCESS
3990
 *  @retval 1 -> BNO055_ERROR
3991
 *
3992
 *
3993
 */
3994
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_y_msq(
3995
        double *gravity_y_d);
3996
/*!
3997
 *  @brief This API is used to convert the gravity
3998
 *  z raw data to meterpersecseq output as double
3999
 *
4000
 *  @param gravity_z_d : The double value of gravity z meterpersecseq
4001
 *
4002
 *  @return results of bus communication function
4003
 *  @retval 0 -> BNO055_SUCCESS
4004
 *  @retval 1 -> BNO055_ERROR
4005
 *
4006
 *
4007
 */
4008
BNO055_RETURN_FUNCTION_TYPE bno055_convert_gravity_double_z_msq(
4009
        double *gravity_z_d);
4010
/*!
4011
 *  @brief This API is used to convert the gravity xyz raw data
4012
 *  to meterpersecseq output as double
4013
 *
4014
 *  @param gravity_xyz : The meterpersecseq data of gravity xyz
4015
 *
4016
 *  Parameter |    result
4017
 *  --------- | -----------------
4018
 *   x        | meterpersecseq data of gravity
4019
 *   y        | meterpersecseq data of gravity
4020
 *   z        | meterpersecseq data of gravity
4021
 *
4022
 *
4023
 *  @return results of bus communication function
4024
 *  @retval 0 -> BNO055_SUCCESS
4025
 *  @retval 1 -> BNO055_ERROR
4026
 *
4027
 */
4028
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_gravity_xyz_msq(
4029
        struct bno055_gravity_double_t *gravity_xyz);
4030
/**************************************************************************/
4031
/**\name FUNCTIONS FOR READING TEMPERATURE DATA OUTPUT AS DOUBLE PRECISION*/
4032
/*************************************************************************/
4033
/*!
4034
 *  @brief This API is used to convert the temperature
4035
 *  data to Fahrenheit output as double
4036
 *
4037
 *  @param temp_d : The double value of temperature Fahrenheit
4038
 *
4039
 *  @return results of bus communication function
4040
 *  @retval 0 -> BNO055_SUCCESS
4041
 *  @retval 1 -> BNO055_ERROR
4042
 *
4043
 *
4044
 */
4045
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_fahrenheit(
4046
        double *temp_d);
4047
/*!
4048
 *  @brief This API is used to convert the temperature
4049
 *  data to Celsius output as double
4050
 *
4051
 *  @param temp_d : The double value of temperature Celsius
4052
 *
4053
 *  @return results of bus communication function
4054
 *  @retval 0 -> BNO055_SUCCESS
4055
 *  @retval 1 -> BNO055_ERROR
4056
 *
4057
 *
4058
 */
4059
BNO055_RETURN_FUNCTION_TYPE bno055_convert_double_temp_celsius(double *temp_d);
4060
#endif
4061
/**************************************************************************/
4062
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEM CALIBRATION STATUS*/
4063
/*************************************************************************/
4064
/*!
4065
 *  @brief This API used to read
4066
 *  mag calibration status from register from 0x35 bit 0 and 1
4067
 *
4068
 *  @param mag_calib_u8 : The value of mag calib status
4069
 *
4070
 *
4071
 *  @return results of bus communication function
4072
 *  @retval 0 -> BNO055_SUCCESS
4073
 *  @retval 1 -> BNO055_ERROR
4074
 *
4075
 */
4076
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_calib_stat(u8 *mag_calib_u8);
4077
/*!
4078
 *  @brief This API used to read
4079
 *  accel calibration status from register from 0x35 bit 2 and 3
4080
 *
4081
 *  @param accel_calib_u8 : The value of accel calib status
4082
 *
4083
 *
4084
 *  @return results of bus communication function
4085
 *  @retval 0 -> BNO055_SUCCESS
4086
 *  @retval 1 -> BNO055_ERROR
4087
 *
4088
 */
4089
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_calib_stat(u8 *accel_calib_u8);
4090
/*!
4091
 *  @brief This API used to read
4092
 *  gyro calibration status from register from 0x35 bit 4 and 5
4093
 *
4094
 *  @param gyro_calib_u8 : The value of gyro calib status
4095
 *
4096
 *
4097
 *  @return results of bus communication function
4098
 *  @retval 0 -> BNO055_SUCCESS
4099
 *  @retval 1 -> BNO055_ERROR
4100
 *
4101
 */
4102
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_calib_stat(u8 *gyro_calib_u8);
4103
/*!
4104
 *  @brief This API used to read
4105
 *  system calibration status from register from 0x35 bit 6 and 7
4106
 *
4107
 *  @param sys_calib_u8 : The value of system calib status
4108
 *
4109
 *
4110
 *  @return results of bus communication function
4111
 *  @retval 0 -> BNO055_SUCCESS
4112
 *  @retval 1 -> BNO055_ERROR
4113
 *
4114
 */
4115
BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_calib_stat(u8 *sys_calib_u8);
4116
/******************************************************************/
4117
/**\name FUNCTIONS FOR READING ACCEL,MAG,GYRO AND SYSTEM SELF TEST */
4118
/******************************************************************/
4119
/*!
4120
 *  @brief This API used to read
4121
 *  self test of accel from register from 0x36 bit 0
4122
 *
4123
 *  @param selftest_accel_u8 : The value of self test of accel
4124
 *
4125
 *    selftest_accel_u8 |  result
4126
 *   -------------------- | ---------------------
4127
 *     0x00               | indicates test failed
4128
 *     0x01               | indicated test passed
4129
 *
4130
 *  @return results of bus communication function
4131
 *  @retval 0 -> BNO055_SUCCESS
4132
 *  @retval 1 -> BNO055_ERROR
4133
 *
4134
 */
4135
BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_accel(u8 *selftest_accel_u8);
4136
/*!
4137
 *  @brief This API used to read
4138
 *  self test of mag from register from 0x36 bit 1
4139
 *
4140
 *  @param selftest_mag_u8 : The value of self test of mag
4141
 *
4142
 *     selftest_mag_u8  |  result
4143
 *   -------------------- | ---------------------
4144
 *     0x00               | indicates test failed
4145
 *     0x01               | indicated test passed
4146
 *
4147
 *  @return results of bus communication function
4148
 *  @retval 0 -> BNO055_SUCCESS
4149
 *  @retval 1 -> BNO055_ERROR
4150
 *
4151
 */
4152
BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_mag(u8 *selftest_mag_u8);
4153
/*!
4154
 *  @brief This API used to read
4155
 *  self test of gyro from register from 0x36 bit 2
4156
 *
4157
 *  @param selftest_gyro_u8 : The value of self test of gyro
4158
 *
4159
 *     selftest_gyro_u8 |  result
4160
 *   -------------------- | ---------------------
4161
 *     0x00               | indicates test failed
4162
 *     0x01               | indicated test passed
4163
 *
4164
 *  @return results of bus communication function
4165
 *  @retval 0 -> BNO055_SUCCESS
4166
 *  @retval 1 -> BNO055_ERROR
4167
 *
4168
 */
4169
BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_gyro(u8 *selftest_gyro_u8);
4170
/*!
4171
 *  @brief This API used to read
4172
 *  self test of micro controller from register from 0x36 bit 3
4173
 *
4174
 *  @param selftest_mcu_u8 : The value of self test of micro controller
4175
 *
4176
 *     selftest_mcu_u8  |  result
4177
 *   -------------------- | ---------------------
4178
 *     0x00               | indicates test failed
4179
 *     0x01               | indicated test passed
4180
 *
4181
 *  @return results of bus communication function
4182
 *  @retval 0 -> BNO055_SUCCESS
4183
 *  @retval 1 -> BNO055_ERROR
4184
 *
4185
 */
4186
BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest_mcu(u8 *selftest_mcu_u8);
4187
/*****************************************************/
4188
/**\name FUNCTIONS FOR READING GYRO INTERRUPT STATUS */
4189
/*****************************************************/
4190
/*!
4191
 *  @brief This API used to read the stat_s8 of
4192
 *  gyro anymotion interrupt from register from 0x37 bit 2
4193
 *
4194
 *  @param gyro_any_motion_u8 : The value of gyro anymotion interrupt
4195
 *
4196
 *     gyro_any_motion_u8  |  result
4197
 *    --------------------   | ---------------------
4198
 *     0x00                  | indicates no interrupt triggered
4199
 *     0x01                  | indicates interrupt triggered
4200
 *
4201
 *  @return results of bus communication function
4202
 *  @retval 0 -> BNO055_SUCCESS
4203
 *  @retval 1 -> BNO055_ERROR
4204
 *
4205
 *  @note Gyro anymotion interrupt can be BNO055_BIT_ENABLE
4206
 *  by the following APIs
4207
 *
4208
 *  bno055_set_intr_mask_gyro_any_motion()
4209
 *
4210
 *  bno055_set_intr_gyro_any_motion()
4211
 *
4212
 */
4213
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_gyro_any_motion(
4214
        u8 *gyro_any_motion_u8);
4215
/*!
4216
 *  @brief This API used to read the stat_s8 of
4217
 *  gyro highrate interrupt from register from 0x37 bit 3
4218
 *
4219
 *  @param gyro_highrate_u8 : The value of gyro highrate interrupt
4220
 *
4221
 *     gyro_highrate_u8   |  result
4222
 *    ------------------- | ---------------------
4223
 *     0x00               | indicates no interrupt triggered
4224
 *     0x01               | indicates interrupt triggered
4225
 *
4226
 *  @return results of bus communication function
4227
 *  @retval 0 -> BNO055_SUCCESS
4228
 *  @retval 1 -> BNO055_ERROR
4229
 *
4230
 *  @note Gyro highrate interrupt can be configured
4231
 *          by the following APIs
4232
 *
4233
 *  bno055_set_intr_mask_gyro_highrate()
4234
 *
4235
 *  bno055_set_intr_gyro_highrate()
4236
 */
4237
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_gyro_highrate(
4238
        u8 *gyro_highrate_u8);
4239
/*****************************************************/
4240
/**\name FUNCTIONS FOR READING ACCEL INTERRUPT STATUS */
4241
/*****************************************************/
4242
/*!
4243
 *  @brief This API used to read the status of
4244
 *  accel highg interrupt from register from 0x37 bit 5
4245
 *
4246
 *  @param accel_high_g_u8 : The value of accel highg interrupt
4247
 *
4248
 *     accel_high_g_u8    |  result
4249
 *    -------------------   | ---------------------
4250
 *     0x00                 | indicates no interrupt triggered
4251
 *     0x01                 | indicates interrupt triggered
4252
 *
4253
 *  @return results of bus communication function
4254
 *  @retval 0 -> BNO055_SUCCESS
4255
 *  @retval 1 -> BNO055_ERROR
4256
 *
4257
 *  @note Accel highg interrupt can be configured
4258
 *          by the following APIs
4259
 *
4260
 *  bno055_set_intr_mask_accel_high_g()
4261
 *
4262
 *  bno055_set_intr_accel_high_g()
4263
 *
4264
 */
4265
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_high_g(
4266
        u8 *accel_high_g_u8);
4267
/*!
4268
 *  @brief This API used to read the stat_s8 of
4269
 *  accel anymotion interrupt from register from 0x37 bit 6
4270
 *
4271
 *  @param accel_any_motion_u8 : The value of accel anymotion interrupt
4272
 *
4273
 *     accel_any_motion_u8 |  result
4274
 *    -------------------   | ---------------------
4275
 *     0x00                 | indicates no interrupt triggered
4276
 *     0x01                 | indicates interrupt triggered
4277
 *
4278
 *  @return results of bus communication function
4279
 *  @retval 0 -> BNO055_SUCCESS
4280
 *  @retval 1 -> BNO055_ERROR
4281
 *
4282
 *  @note Accel anymotion interrupt can be configured
4283
 *          by the following APIs
4284
 *
4285
 *  bno055_set_intr_mask_accel_any_motion()
4286
 *
4287
 *  bno055_set_intr_accel_any_motion()
4288
 */
4289
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_any_motion(
4290
        u8 *accel_any_motion_u8);
4291
/*!
4292
 *  @brief This API used to read the stat_s8 of
4293
 *  accel nomotion/slowmotion interrupt from register from 0x37 bit 6
4294
 *
4295
 *  @param accel_no_motion_u8 :
4296
 *  The value of accel nomotion/slowmotion interrupt
4297
 *
4298
 *     accel_no_motion_u8 |  result
4299
 *    -------------------   | ---------------------
4300
 *     0x00                 | indicates no interrupt triggered
4301
 *     0x01                 | indicates interrupt triggered
4302
 *
4303
 *  @return results of bus communication function
4304
 *  @retval 0 -> BNO055_SUCCESS
4305
 *  @retval 1 -> BNO055_ERROR
4306
 *
4307
 *  @note Accel nomotion/slowmotion interrupt can be configured
4308
 *          by the following APIs
4309
 *
4310
 *  bno055_set_intr_mask_accel_nomotion()
4311
 *
4312
 *  bno055_set_intr_accel_nomotion()
4313
 */
4314
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_stat_accel_no_motion(
4315
        u8 *accel_no_motion_u8);
4316
/**************************************************************************/
4317
/**\name FUNCTIONS FOR READING SYSTEM CLOCK, STATUS AND BNO055_ERROR CODE */
4318
/*************************************************************************/
4319
/*!
4320
 *  @brief This API is used to read status of main clock
4321
 *  from the register 0x38 bit 0
4322
 *
4323
 *  @param stat_main_clk_u8 : the status of main clock
4324
 *
4325
 *
4326
 *  @return results of bus communication function
4327
 *  @retval 0 -> BNO055_SUCCESS
4328
 *  @retval 1 -> BNO055_ERROR
4329
 *
4330
 */
4331
BNO055_RETURN_FUNCTION_TYPE bno055_get_stat_main_clk(u8 *stat_main_clk_u8);
4332
/*!
4333
 *  @brief This API is used to read system status
4334
 *  code from the register 0x39 it is a byte of data
4335
 *
4336
 *  @param sys_stat_u8 : the status of system
4337
 *
4338
 *
4339
 *  @return results of bus communication function
4340
 *  @retval 0 -> BNO055_SUCCESS
4341
 *  @retval 1 -> BNO055_ERROR
4342
 *
4343
 */
4344
BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_stat_code(u8 *sys_stat_u8);
4345
/*!
4346
 *  @brief This API is used to read system BNO055_ERROR
4347
 *  code from the register 0x3A it is a byte of data
4348
 *
4349
 *  @param sys_error_u8 : The value of system BNO055_ERROR code
4350
 *
4351
 *
4352
 *  @return results of bus communication function
4353
 *  @retval 0 -> BNO055_SUCCESS
4354
 *  @retval 1 -> BNO055_ERROR
4355
 *
4356
 *
4357
 */
4358
BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_error_code(u8 *sys_error_u8);
4359
/********************************************/
4360
/**\name FUNCTIONS FOR ACCEL UNIT SELECTION */
4361
/********************************************/
4362
/*!
4363
 *  @brief This API used to read the accel unit
4364
 *  from register from 0x3B bit 0
4365
 *
4366
 *  @param accel_unit_u8 : The value of accel unit
4367
 *
4368
 *    accel_unit_u8 |   result
4369
 *   -------------    | ---------------
4370
 *        0x00        | BNO055_ACCEL_UNIT_MSQ
4371
 *        0x01        | BNO055_ACCEL_UNIT_MG
4372
 *
4373
 *  @return results of bus communication function
4374
 *  @retval 0 -> BNO055_SUCCESS
4375
 *  @retval 1 -> BNO055_ERROR
4376
 *
4377
 */
4378
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_unit(u8 *accel_unit_u8);
4379
/*!
4380
 *  @brief This API used to write the accel unit
4381
 *  from register from 0x3B bit 0
4382
 *
4383
 *  @param accel_unit_u8 : The value of accel unit
4384
 *
4385
 *    accel_unit_u8 |   result
4386
 *   -------------    | ---------------
4387
 *        0x00        | BNO055_ACCEL_UNIT_MSQ
4388
 *        0x01        | BNO055_ACCEL_UNIT_MG
4389
 *
4390
 *  @return results of bus communication function
4391
 *  @retval 0 -> BNO055_SUCCESS
4392
 *  @retval 1 -> BNO055_ERROR
4393
 *
4394
 *
4395
 */
4396
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_unit(u8 accel_unit_u8);
4397
/********************************************/
4398
/**\name FUNCTIONS FOR GYRO UNIT SELECTION */
4399
/********************************************/
4400
/*!
4401
 *  @brief This API used to read the gyro unit
4402
 *  from register from 0x3B bit 1
4403
 *
4404
 *  @param gyro_unit_u8 : The value of accel unit
4405
 *
4406
 *  gyro_unit_u8  |  result
4407
 *  -------------   | -----------
4408
 *    0x00          | BNO055_GYRO_UNIT_DPS
4409
 *    0x01          | BNO055_GYRO_UNIT_RPS
4410
 *
4411
 *  @return results of bus communication function
4412
 *  @retval 0 -> BNO055_SUCCESS
4413
 *  @retval 1 -> BNO055_ERROR
4414
 *
4415
 *
4416
 */
4417
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_unit(u8 *gyro_unit_u8);
4418
/*!
4419
 *  @brief This API used to write the gyro unit
4420
 *  from register from 0x3B bit 1
4421
 *
4422
 *  @param gyro_unit_u8 : The value of accel unit
4423
 *
4424
 *  gyro_unit_u8  |  result
4425
 *  -------------   | -----------
4426
 *    0x00          | BNO055_GYRO_UNIT_DPS
4427
 *    0x01          | BNO055_GYRO_UNIT_RPS
4428
 *
4429
 *  @return results of bus communication function
4430
 *  @retval 0 -> BNO055_SUCCESS
4431
 *  @retval 1 -> BNO055_ERROR
4432
 *
4433
 *
4434
 */
4435
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_unit(u8 gyro_unit_u8);
4436
/********************************************/
4437
/**\name FUNCTIONS FOR EULER UNIT SELECTION */
4438
/********************************************/
4439
/*!
4440
 *  @brief This API used to read the Euler unit
4441
 *  from register from 0x3B bit 2
4442
 *
4443
 *  @param euler_unit_u8 : The value of accel unit
4444
 *
4445
 *    euler_unit_u8 | result
4446
 *   --------------   | -----------
4447
 *      0x00          | BNO055_EULER_UNIT_DEG
4448
 *      0x01          | BNO055_EULER_UNIT_RAD
4449
 *
4450
 *  @return results of bus communication function
4451
 *  @retval 0 -> BNO055_SUCCESS
4452
 *  @retval 1 -> BNO055_ERROR
4453
 *
4454
 *
4455
 */
4456
BNO055_RETURN_FUNCTION_TYPE bno055_get_euler_unit(u8 *euler_unit_u8);
4457
/*!
4458
 *  @brief This API used to write the Euler unit
4459
 *  from register from 0x3B bit 2
4460
 *
4461
 *  @param euler_unit_u8 : The value of Euler unit
4462
 *
4463
 *    euler_unit_u8 | result
4464
 *   --------------   | -----------
4465
 *      0x00          | BNO055_EULER_UNIT_DEG
4466
 *      0x01          | BNO055_EULER_UNIT_RAD
4467
 *
4468
 *  @return results of bus communication function
4469
 *  @retval 0 -> BNO055_SUCCESS
4470
 *  @retval 1 -> BNO055_ERROR
4471
 *
4472
 *
4473
 */
4474
BNO055_RETURN_FUNCTION_TYPE bno055_set_euler_unit(u8 euler_unit_u8);
4475
/********************************************/
4476
/**\name FUNCTIONS FOR TILT UNIT SELECTION */
4477
/********************************************/
4478
/*!
4479
 *  @brief This API used to write the tilt unit
4480
 *  from register from 0x3B bit 3
4481
 *
4482
 *  @param tilt_unit_u8 : The value of tilt unit
4483
 *
4484
 *    tilt_unit_u8  | result
4485
 *   ---------------  | ---------
4486
 *     0x00           | degrees
4487
 *     0x01           | radians
4488
 *
4489
 *  @return results of bus communication function
4490
 *  @retval 0 -> BNO055_SUCCESS
4491
 *  @retval 1 -> BNO055_ERROR
4492
 *
4493
 *
4494
 */
4495
BNO055_RETURN_FUNCTION_TYPE bno055_get_tilt_unit(u8 *tilt_unit_u8);
4496
/*!
4497
 *  @brief This API used to write the tilt unit
4498
 *  from register from 0x3B bit 3
4499
 *
4500
 *  @param tilt_unit_u8 : The value of tilt unit
4501
 *
4502
 *    tilt_unit_u8  | result
4503
 *   ---------------  | ---------
4504
 *     0x00           | degrees
4505
 *     0x01           | radians
4506
 *
4507
 *  @return results of bus communication function
4508
 *  @retval 0 -> BNO055_SUCCESS
4509
 *  @retval 1 -> BNO055_ERROR
4510
 *
4511
 *
4512
 *
4513
 *  \return Communication results
4514
 *
4515
 *
4516
 */
4517
BNO055_RETURN_FUNCTION_TYPE bno055_set_tilt_unit(u8 tilt_unit_u8);
4518
/**************************************************/
4519
/**\name FUNCTIONS FOR TEMPERATURE UNIT SELECTION */
4520
/**************************************************/
4521
/*!
4522
 *  @brief This API used to read the temperature unit
4523
 *  from register from 0x3B bit 4
4524
 *
4525
 *  @param temp_unit_u8 : The value of temperature unit
4526
 *
4527
 *    temp_unit_u8  |  result
4528
 *   -----------      | --------------
4529
 *      0x00          | BNO055_TEMP_UNIT_CELSIUS
4530
 *      0x01          | BNO055_TEMP_UNIT_FAHRENHEIT
4531
 *
4532
 *  @return results of bus communication function
4533
 *  @retval 0 -> BNO055_SUCCESS
4534
 *  @retval 1 -> BNO055_ERROR
4535
 *
4536
 */
4537
BNO055_RETURN_FUNCTION_TYPE bno055_get_temp_unit(u8 *temp_unit_u8);
4538
/*!
4539
 *  @brief This API used to write the temperature unit
4540
 *  from register from 0x3B bit 4
4541
 *
4542
 *  @param temp_unit_u8 : The value of temperature unit
4543
 *
4544
 *    temp_unit_u8  |  result
4545
 *   -----------      | --------------
4546
 *      0x00          | BNO055_TEMP_UNIT_CELSIUS
4547
 *      0x01          | BNO055_TEMP_UNIT_FAHRENHEIT
4548
 *
4549
 *  @return results of bus communication function
4550
 *  @retval 0 -> BNO055_SUCCESS
4551
 *  @retval 1 -> BNO055_ERROR
4552
 *
4553
 *
4554
 */
4555
BNO055_RETURN_FUNCTION_TYPE bno055_set_temp_unit(u8 temp_unit_u8);
4556
/**************************************************/
4557
/**\name FUNCTIONS FOR DATA OUTPUT FORMAT SELECT */
4558
/**************************************************/
4559
/*!
4560
 *  @brief This API used to read the current selected orientation mode
4561
 *  from register from 0x3B bit 7
4562
 *
4563
 *  @param data_output_format_u8 : The value of data output format
4564
 *
4565
 *    data_output_format_u8  | result
4566
 *   --------------------      | --------
4567
 *    0x00                     | Windows
4568
 *    0x01                     | Android
4569
 *
4570
 *  @return results of bus communication function
4571
 *  @retval 0 -> BNO055_SUCCESS
4572
 *  @retval 1 -> BNO055_ERROR
4573
 *
4574
 */
4575
BNO055_RETURN_FUNCTION_TYPE bno055_get_data_output_format(
4576
        u8 *data_output_format_u8);
4577
/*!
4578
 *  @brief This API used to read the current selected orientation mode
4579
 *  from register from 0x3B bit 7
4580
 *
4581
 *  @param data_output_format_u8 : The value of data output format
4582
 *
4583
 *    data_output_format_u8  | result
4584
 *   --------------------      | --------
4585
 *    0x00                     | Windows
4586
 *    0x01                     | Android
4587
 *
4588
 *  @return results of bus communication function
4589
 *  @retval 0 -> BNO055_SUCCESS
4590
 *  @retval 1 -> BNO055_ERROR
4591
 *
4592
 */
4593
BNO055_RETURN_FUNCTION_TYPE bno055_set_data_output_format(
4594
        u8 data_output_format_u8);
4595
/**************************************************/
4596
/**\name FUNCTIONS FOR DATA OPERATION MODE  */
4597
/**************************************************/
4598
/*! @brief This API used to read the operation mode
4599
 *  from register from 0x3D bit 0 to 3
4600
 *
4601
 *  @param operation_mode_u8 : The value of operation mode
4602
 *
4603
 * operation_mode_u8 |      result      | comments
4604
 * ----------|----------------------------|----------------------------
4605
 *  0x00     | BNO055_OPERATION_MODE_CONFIG      | Configuration mode
4606
 *  0x01     | BNO055_OPERATION_MODE_ACCONLY     | Reads accel data alone
4607
 *  0x02     | BNO055_OPERATION_MODE_MAGONLY     | Reads mag data alone
4608
 *  0x03     | BNO055_OPERATION_MODE_GYRONLY     | Reads gyro data alone
4609
 *  0x04     | BNO055_OPERATION_MODE_ACCMAG      | Reads accel and mag data
4610
 *  0x05     | BNO055_OPERATION_MODE_ACCGYRO     | Reads accel and gyro data
4611
 *  0x06     | BNO055_OPERATION_MODE_MAGGYRO     | Reads accel and mag data
4612
 *  0x07     | OPERATION_MODE_ANY_MOTION  | Reads accel mag and gyro data
4613
 *  0x08     | BNO055_OPERATION_MODE_IMUPLUS     | Inertial measurement unit
4614
 *   -       |       -                    | Reads accel,gyro and fusion data
4615
 *  0x09     | BNO055_OPERATION_MODE_COMPASS     | Reads accel, mag data
4616
 *   -       |       -                    | and fusion data
4617
 *  0x0A     | BNO055_OPERATION_MODE_M4G         | Reads accel, mag data
4618
 *    -      |       -                    | and fusion data
4619
 *  0x0B     | BNO055_OPERATION_MODE_NDOF_FMC_OFF| Nine degrees of freedom with
4620
 *   -       |       -                    | fast magnetic calibration
4621
 *   -       |       -                    | Reads accel,mag, gyro
4622
 *   -       |       -                    | and fusion data
4623
 *  0x0C     | BNO055_OPERATION_MODE_NDOF        | Nine degrees of freedom
4624
 *   -       |       -                    | Reads accel,mag, gyro
4625
 *   -       |       -                    | and fusion data
4626
 *
4627
 *  @return results of bus communication function
4628
 *  @retval 0 -> BNO055_SUCCESS
4629
 *  @retval 1 -> BNO055_ERROR
4630
 *
4631
 *  @note In the config mode, all sensor and fusion data
4632
 *  becomes zero and it is mainly derived
4633
 *  to configure the various settings of the BNO
4634
 *
4635
 */
4636
BNO055_RETURN_FUNCTION_TYPE bno055_get_operation_mode(u8 *operation_mode_u8);
4637
/*! @brief This API used to write the operation mode
4638
 *  from register from 0x3D bit 0 to 3
4639
 *
4640
 *  @param operation_mode_u8 : The value of operation mode
4641
 *
4642
 *  operation_mode_u8  |      result            | comments
4643
 * ---------|-----------------------------------|--------------------------
4644
 *  0x00    | BNO055_OPERATION_MODE_CONFIG      | Configuration mode
4645
 *  0x01    | BNO055_OPERATION_MODE_ACCONLY     | Reads accel data alone
4646
 *  0x02    | BNO055_OPERATION_MODE_MAGONLY     | Reads mag data alone
4647
 *  0x03    | BNO055_OPERATION_MODE_GYRONLY     | Reads gyro data alone
4648
 *  0x04    | BNO055_OPERATION_MODE_ACCMAG      | Reads accel and mag data
4649
 *  0x05    | BNO055_OPERATION_MODE_ACCGYRO     | Reads accel and gyro data
4650
 *  0x06    | BNO055_OPERATION_MODE_MAGGYRO     | Reads accel and mag data
4651
 *  0x07    | OPERATION_MODE_ANY_MOTION         | Reads accel mag and
4652
 *          |       -                           | gyro data
4653
 *  0x08    | BNO055_OPERATION_MODE_IMUPLUS     | Inertial measurement unit
4654
 *   -      |                                   | Reads accel,gyro and
4655
 *          |       -                           | fusion data
4656
 *  0x09    | BNO055_OPERATION_MODE_COMPASS     | Reads accel, mag data
4657
 *   -      |       -                           | and fusion data
4658
 *  0x0A    | BNO055_OPERATION_MODE_M4G         | Reads accel, mag data
4659
 *    -     |       -                           | and fusion data
4660
 *  0x0B    | BNO055_OPERATION_MODE_NDOF_FMC_OFF| Nine degrees of freedom with
4661
 *   -      |       -                           | fast magnetic calibration
4662
 *   -      |       -                           | Reads accel,mag, gyro
4663
 *   -      |       -                           | and fusion data
4664
 *  0x0C    | BNO055_OPERATION_MODE_NDOF        | Nine degrees of freedom
4665
 *   -      |       -                           | Reads accel,mag, gyro
4666
 *   -      |       -                           | and fusion data
4667
 *
4668
 *  @return results of bus communication function
4669
 *  @retval 0 -> BNO055_SUCCESS
4670
 *  @retval 1 -> BNO055_ERROR
4671
 *
4672
 *  @note In the config mode, all sensor and fusion data
4673
 *  becomes zero and it is mainly derived
4674
 *  to configure the various settings of the BNO
4675
 *
4676
 */
4677
BNO055_RETURN_FUNCTION_TYPE bno055_set_operation_mode(u8 operation_mode_u8);
4678
/**************************************************/
4679
/**\name FUNCTIONS FOR POWER MODE  */
4680
/**************************************************/
4681
/*! @brief This API used to read the power mode
4682
 *  from register from 0x3E bit 0 to 1
4683
 *
4684
 *  @param power_mode_u8 : The value of power mode
4685
 *
4686
 * power_mode_u8|      result           | comments
4687
 * ---------|---------------------------|-------------------------------------
4688
 *  0x00    |BNO055_POWER_MODE_NORMAL   | In the NORMAL mode the register
4689
 *    -     |       -                   | map and the internal peripherals
4690
 *    -     |       -                   | of the MCU are always
4691
 *    -     |       -                   | operative in this mode
4692
 *  0x01    |BNO055_POWER_MODE_LOWPOWER | This is first level of power
4693
 *          |       -                   | saving mode
4694
 *  0x02    |BNO055_POWER_MODE_SUSPEND  | In suspend mode the system is
4695
 *   -      |      -                    | paused and all the sensors and
4696
 *   -      |      -                    | the micro controller are
4697
 *   -      |      -                    | put into sleep mode.
4698
 *
4699
 *  @return results of bus communication function
4700
 *  @retval 0 -> BNO055_SUCCESS
4701
 *  @retval 1 -> BNO055_ERROR
4702
 *
4703
 *  @note For detailed about LOWPOWER mode
4704
 *  refer data sheet 3.4.2
4705
 *
4706
 */
4707
BNO055_RETURN_FUNCTION_TYPE bno055_get_power_mode(u8 *power_mode_u8);
4708
/*! @brief This API used to write the power mode
4709
 *  from register from 0x3E bit 0 to 1
4710
 *
4711
 *  @param power_mode_u8 : The value of power mode
4712
 *
4713
 *
4714
 * power_mode_u8|      result          | comments
4715
 * -------|----------------------------|---------------------------------
4716
 *  0x00  | BNO055_POWER_MODE_NORMAL   | In the NORMAL mode the register
4717
 *    -   |       -                    | map and the internal peripherals
4718
 *    -   |       -                    | of the MCU are always
4719
 *    -   |       -                    | operative in this mode
4720
 *  0x01  | BNO055_POWER_MODE_LOWPOWER | This is first level of power
4721
 *        |     -                      | saving mode
4722
 *  0x02  | BNO055_POWER_MODE_SUSPEND  | In suspend mode the system is
4723
 *   -    |      -                     | paused and all the sensors and
4724
 *   -    |      -                     | the micro controller are
4725
 *   -    |      -                     | put into sleep mode.
4726
 *
4727
 *  @return results of bus communication function
4728
 *  @retval 0 -> BNO055_SUCCESS
4729
 *  @retval 1 -> BNO055_ERROR
4730
 *
4731
 *  @note For detailed about LOWPOWER mode
4732
 *  refer data sheet 3.4.2
4733
 *
4734
 */
4735
BNO055_RETURN_FUNCTION_TYPE bno055_set_power_mode(u8 power_mode_u8);
4736
/**************************************************/
4737
/**\name FUNCTIONS FOR RESET INTERRUPT  */
4738
/**************************************************/
4739
/*!
4740
 *  @brief This API used to read the reset interrupt
4741
 *  from register from 0x3F bit 6
4742
 *  It resets all the interrupt bit and interrupt output
4743
 *
4744
 *  @param intr_rst_u8 : The value of reset interrupt
4745
 *
4746
 *    intr_rst_u8 | result
4747
 *   -------------|----------
4748
 *     0x01       | BNO055_BIT_ENABLE
4749
 *     0x00       | BNO055_BIT_DISABLE
4750
 *
4751
 *  @return results of bus communication function
4752
 *  @retval 0 -> BNO055_SUCCESS
4753
 *  @retval 1 -> BNO055_ERROR
4754
 *
4755
 */
4756
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_rst(u8 *intr_rst_u8);
4757
/*!
4758
 *  @brief This API used to write the reset interrupt
4759
 *  from register from 0x3F bit 6
4760
 *  It resets all the interrupt bit and interrupt output
4761
 *
4762
 *  @param intr_rst_u8 : The value of reset interrupt
4763
 *
4764
 *    intr_rst_u8   | result
4765
 *   -------------- |----------
4766
 *     0x01         | BNO055_BIT_ENABLE
4767
 *     0x00         | BNO055_BIT_DISABLE
4768
 *
4769
 *  @return results of bus communication function
4770
 *  @retval 0 -> BNO055_SUCCESS
4771
 *  @retval 1 -> BNO055_ERROR
4772
 *
4773
 */
4774
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_rst(u8 intr_rst_u8);
4775
/**************************************************/
4776
/**\name FUNCTIONS FOR CLOCK SOURCE  */
4777
/**************************************************/
4778
/*!
4779
 *  @brief This API used to read the clk source
4780
 *  from register from 0x3F bit 7
4781
 *
4782
 *  @param clk_src_u8 : The value of clk source
4783
 *
4784
 *   clk_src_u8   | result
4785
 *   -------------|----------
4786
 *     0x01       | BNO055_BIT_ENABLE
4787
 *     0x00       | BNO055_BIT_DISABLE
4788
 *
4789
 *  @return results of bus communication function
4790
 *  @retval 0 -> BNO055_SUCCESS
4791
 *  @retval 1 -> BNO055_ERROR
4792
 *
4793
 */
4794
BNO055_RETURN_FUNCTION_TYPE bno055_get_clk_src(u8 *clk_src_u8);
4795
/*!
4796
 *  @brief This API used to write the clk source
4797
 *  from register from 0x3F bit 7
4798
 *
4799
 *  @param clk_src_u8 : The value of clk source
4800
 *
4801
 *   clk_src_u8   | result
4802
 *   -------------- |----------
4803
 *     0x01         | BNO055_BIT_ENABLE
4804
 *     0x00         | BNO055_BIT_DISABLE
4805
 *
4806
 *  @return results of bus communication function
4807
 *  @retval 0 -> BNO055_SUCCESS
4808
 *  @retval 1 -> BNO055_ERROR
4809
 *
4810
 */
4811
BNO055_RETURN_FUNCTION_TYPE bno055_set_clk_src(u8 clk_src_u8);
4812
/**************************************************/
4813
/**\name FUNCTIONS FOR RESET SYSTEM  */
4814
/**************************************************/
4815
/*!
4816
 *  @brief This API used to read the reset system
4817
 *  from register from 0x3F bit 5
4818
 *
4819
 *  @param sys_rst_u8 : The value of reset system
4820
 *
4821
 *   sys_rst_u8   | result
4822
 *   -------------- |----------
4823
 *     0x01         | BNO055_BIT_ENABLE
4824
 *     0x00         | BNO055_BIT_DISABLE
4825
 *
4826
 *  @return results of bus communication function
4827
 *  @retval 0 -> BNO055_SUCCESS
4828
 *  @retval 1 -> BNO055_ERROR
4829
 *
4830
 *  @note It resets the whole system
4831
 */
4832
BNO055_RETURN_FUNCTION_TYPE bno055_get_sys_rst(u8 *sys_rst_u8);
4833
/*!
4834
 *  @brief This API used to write the reset system
4835
 *  from register from 0x3F bit 5
4836
 *
4837
 *  @param sys_rst_u8 : The value of reset system
4838
 *
4839
 *   sys_rst_u8   | result
4840
 *   -------------- |----------
4841
 *     0x01         | BNO055_BIT_ENABLE
4842
 *     0x00         | BNO055_BIT_DISABLE
4843
 *
4844
 *  @return results of bus communication function
4845
 *  @retval 0 -> BNO055_SUCCESS
4846
 *  @retval 1 -> BNO055_ERROR
4847
 *
4848
 *  @note It resets the whole system
4849
 */
4850
BNO055_RETURN_FUNCTION_TYPE bno055_set_sys_rst(u8 sys_rst_u8);
4851
/**************************************************/
4852
/**\name FUNCTIONS FOR SELF TEST  */
4853
/**************************************************/
4854
/*!
4855
 *  @brief This API used to read the self test
4856
 *  from register from 0x3F bit 0
4857
 *
4858
 *  @param selftest_u8 : The value of self test
4859
 *
4860
 *   selftest_u8  | result
4861
 *   -------------- |----------
4862
 *     0x01         | BNO055_BIT_ENABLE
4863
 *     0x00         | BNO055_BIT_DISABLE
4864
 *
4865
 *  @return results of bus communication function
4866
 *  @retval 0 -> BNO055_SUCCESS
4867
 *  @retval 1 -> BNO055_ERROR
4868
 *
4869
 *  @note It triggers the self test
4870
 */
4871
BNO055_RETURN_FUNCTION_TYPE bno055_get_selftest(u8 *selftest_u8);
4872
/*!
4873
 *  @brief This API used to write the self test
4874
 *  from register from 0x3F bit 0
4875
 *
4876
 *  @param selftest_u8 : The value of self test
4877
 *
4878
 *   selftest_u8  | result
4879
 *   -------------- |----------
4880
 *     0x01         | BNO055_BIT_ENABLE
4881
 *     0x00         | BNO055_BIT_DISABLE
4882
 *
4883
 *  @return results of bus communication function
4884
 *  @retval 0 -> BNO055_SUCCESS
4885
 *  @retval 1 -> BNO055_ERROR
4886
 *
4887
 *  @note It triggers the self test
4888
 *
4889
 *
4890
 */
4891
BNO055_RETURN_FUNCTION_TYPE bno055_set_selftest(u8 selftest_u8);
4892
/**************************************************/
4893
/**\name FUNCTIONS FOR TEMPERATURE SOURCE  */
4894
/**************************************************/
4895
/*!
4896
 *  @brief This API used to read the temperature source
4897
 *  from register from 0x40 bit 0 and 1
4898
 *
4899
 *  @param temp_source_u8 : The value of selected temperature source
4900
 *
4901
 *     temp_source_u8 | result
4902
 *    ----------------  |---------------
4903
 *      0x00            | BNO055_ACCEL_TEMP_EN
4904
 *      0X01            | BNO055_GYRO_TEMP_EN
4905
 *      0X03            | BNO055_MCU_TEMP_EN
4906
 *
4907
 *  @return results of bus communication function
4908
 *  @retval 0 -> BNO055_SUCCESS
4909
 *  @retval 1 -> BNO055_ERROR
4910
 *
4911
 */
4912
BNO055_RETURN_FUNCTION_TYPE bno055_get_temp_source(u8 *temp_source_u8);
4913
/*!
4914
 *  @brief This API used to write the temperature source
4915
 *  from register from 0x40 bit 0 and 1
4916
 *
4917
 *  @param temp_source_u8 : The value of selected temperature source
4918
 *
4919
 *     temp_source_u8 | result
4920
 *    ----------------  |---------------
4921
 *      0x00            | BNO055_ACCEL_TEMP_EN
4922
 *      0X01            | BNO055_GYRO_TEMP_EN
4923
 *      0X03            | BNO055_MCU_TEMP_EN
4924
 *
4925
 *  @return results of bus communication function
4926
 *  @retval 0 -> BNO055_SUCCESS
4927
 *  @retval 1 -> BNO055_ERROR
4928
 *
4929
 */
4930
BNO055_RETURN_FUNCTION_TYPE bno055_set_temp_source(u8 temp_source_u8);
4931
/**************************************************/
4932
/**\name APIs FOR AXIS REMAP  */
4933
/**************************************************/
4934
/*!
4935
 *  @brief This API used to read the axis remap value
4936
 *  from register from 0x41 bit 0 and 5
4937
 *
4938
 *  @param remap_axis_u8 : The value of axis remapping
4939
 *
4940
 *    remap_axis_u8 |   result     | comments
4941
 *   ------------|-------------------|------------
4942
 *      0X21     | BNO055_REMAP_X_Y         | Z=Z;X=Y;Y=X
4943
 *      0X18     | BNO055_REMAP_Y_Z         | X=X;Y=Z;Z=Y
4944
 *      0X06     | BNO055_REMAP_Z_X         | Y=Y;X=Z;Z=X
4945
 *      0X12     | BNO055_REMAP_X_Y_Z_TYPE0 | X=Z;Y=X;Z=Y
4946
 *      0X09     | BNO055_REMAP_X_Y_Z_TYPE1 | X=Y;Y=Z;Z=X
4947
 *      0X24     | BNO055_DEFAULT_AXIS      | X=X;Y=Y;Z=Z
4948
 *
4949
 *  @return results of bus communication function
4950
 *  @retval 0 -> BNO055_SUCCESS
4951
 *  @retval 1 -> BNO055_ERROR
4952
 *
4953
 *  @note : For axis sign remap refer the following APIs
4954
 *  x-axis :
4955
 *
4956
 *  bno055_set_x_remap_sign()
4957
 *
4958
 *  y-axis :
4959
 *
4960
 *  bno055_set_y_remap_sign()
4961
 *
4962
 *  z-axis :
4963
 *
4964
 *  bno055_set_z_remap_sign()
4965
 *
4966
 */
4967
BNO055_RETURN_FUNCTION_TYPE bno055_get_axis_remap_value(u8 *remap_axis_u8);
4968
/*!
4969
 *  @brief This API used to write the axis remap value
4970
 *  from register from 0x41 bit 0 and 5
4971
 *
4972
 *  @param remap_axis_u8 : The value of axis remapping
4973
 *
4974
 * remap_axis_u8 |   result                 | comments
4975
 *   ------------|--------------------------|------------
4976
 *      0X21     | BNO055_REMAP_X_Y         | Z=Z;X=Y;Y=X
4977
 *      0X18     | BNO055_REMAP_Y_Z         | X=X;Y=Z;Z=Y
4978
 *      0X06     | BNO055_REMAP_Z_X         | Y=Y;X=Z;Z=X
4979
 *      0X12     | BNO055_REMAP_X_Y_Z_TYPE0 | X=Z;Y=X;Z=Y
4980
 *      0X09     | BNO055_REMAP_X_Y_Z_TYPE1 | X=Y;Y=Z;Z=X
4981
 *      0X24     | BNO055_DEFAULT_AXIS      | X=X;Y=Y;Z=Z
4982
 *
4983
 *  @return results of bus communication function
4984
 *  @retval 0 -> BNO055_SUCCESS
4985
 *  @retval 1 -> BNO055_ERROR
4986
 *
4987
 *  @note : For axis sign remap refer the following APIs
4988
 *  x-axis :
4989
 *
4990
 *  bno055_set_x_remap_sign()
4991
 *
4992
 *  y-axis :
4993
 *
4994
 *  bno055_set_y_remap_sign()
4995
 *
4996
 *  z-axis :
4997
 *
4998
 *  bno055_set_z_remap_sign()
4999
 *
5000
 */
5001
BNO055_RETURN_FUNCTION_TYPE bno055_set_axis_remap_value(u8 remap_axis_u8);
5002
/**************************************************/
5003
/**\name APIs FOR AXIS REMAP SIGN  */
5004
/**************************************************/
5005
/*!
5006
 *  @brief This API used to read the x-axis remap
5007
 *  sign from register from 0x42 bit 2
5008
 *
5009
 *  @param remap_x_sign_u8 : The value of x-axis remap sign
5010
 *
5011
 *    remap_x_sign_u8  |    result
5012
 *   ------------------- |--------------------
5013
 *      0X00             | BNO055_REMAP_AXIS_POSITIVE
5014
 *      0X01             | BNO055_REMAP_AXIS_NEGATIVE
5015
 *
5016
 *  @return results of bus communication function
5017
 *  @retval 0 -> BNO055_SUCCESS
5018
 *  @retval 1 -> BNO055_ERROR
5019
 *
5020
 */
5021
BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_x_sign(u8 *remap_x_sign_u8);
5022
/*!
5023
 *  @brief This API used to write the x-axis remap
5024
 *  sign from register from 0x42 bit 2
5025
 *
5026
 *  @param remap_x_sign_u8 : The value of x-axis remap sign
5027
 *
5028
 *    remap_x_sign_u8  |    result
5029
 *   ------------------- |--------------------
5030
 *      0X00             | BNO055_REMAP_AXIS_POSITIVE
5031
 *      0X01             | BNO055_REMAP_AXIS_NEGATIVE
5032
 *
5033
 *  @return results of bus communication function
5034
 *  @retval 0 -> BNO055_SUCCESS
5035
 *  @retval 1 -> BNO055_ERROR
5036
 *
5037
 */
5038
BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_x_sign(u8 remap_x_sign_u8);
5039
/*!
5040
 *  @brief This API used to read the y-axis remap
5041
 *  sign from register from 0x42 bit 1
5042
 *
5043
 *  @param remap_y_sign_u8 : The value of y-axis remap sign
5044
 *
5045
 *    remap_y_sign_u8  |   result
5046
 *   ------------------- |--------------------
5047
 *      0X00             | BNO055_REMAP_AXIS_POSITIVE
5048
 *      0X01             | BNO055_REMAP_AXIS_NEGATIVE
5049
 *
5050
 *  @return results of bus communication function
5051
 *  @retval 0 -> BNO055_SUCCESS
5052
 *  @retval 1 -> BNO055_ERROR
5053
 *
5054
 */
5055
BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_y_sign(u8 *remap_y_sign_u8);
5056
/*!
5057
 *  @brief This API used to write the y-axis remap
5058
 *  sign from register from 0x42 bit 1
5059
 *
5060
 *  @param remap_y_sign_u8 : The value of y-axis remap sign
5061
 *
5062
 *    remap_y_sign_u8  |   result
5063
 *   ------------------- |--------------------
5064
 *      0X00             | BNO055_REMAP_AXIS_POSITIVE
5065
 *      0X01             | BNO055_REMAP_AXIS_NEGATIVE
5066
 *
5067
 *  @return results of bus communication function
5068
 *  @retval 0 -> BNO055_SUCCESS
5069
 *  @retval 1 -> BNO055_ERROR
5070
 *
5071
 */
5072
BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_y_sign(u8 remap_y_sign_u8);
5073
/*!
5074
 *  @brief This API used to read the z-axis remap
5075
 *  sign from register from 0x42 bit 0
5076
 *
5077
 *  @param remap_z_sign_u8 : The value of z-axis remap sign
5078
 *
5079
 *    remap_z_sign_u8  |   result
5080
 *   ------------------- |--------------------
5081
 *      0X00             | BNO055_REMAP_AXIS_POSITIVE
5082
 *      0X01             | BNO055_REMAP_AXIS_NEGATIVE
5083
 *
5084
 *  @return results of bus communication function
5085
 *  @retval 0 -> BNO055_SUCCESS
5086
 *  @retval 1 -> BNO055_ERROR
5087
 *
5088
 */
5089
BNO055_RETURN_FUNCTION_TYPE bno055_get_remap_z_sign(u8 *remap_z_sign_u8);
5090
/*!
5091
 *  @brief This API used to write the z-axis remap
5092
 *  sign from register from 0x42 bit 0
5093
 *
5094
 *  @param remap_z_sign_u8 : The value of z-axis remap sign
5095
 *
5096
 *    remap_z_sign_u8  |   result
5097
 *   ------------------|--------------------
5098
 *      0X00           | BNO055_REMAP_AXIS_POSITIVE
5099
 *      0X01           | BNO055_REMAP_AXIS_NEGATIVE
5100
 *
5101
 *  @return results of bus communication function
5102
 *  @retval 0 -> BNO055_SUCCESS
5103
 *  @retval 1 -> BNO055_ERROR
5104
 *
5105
 */
5106
BNO055_RETURN_FUNCTION_TYPE bno055_set_remap_z_sign(u8 remap_z_sign_u8);
5107
/*****************************************************/
5108
/**\name FUNCTIONS FOR SOFT IRON CALIBRATION MATRIX  */
5109
/*****************************************************/
5110
/*!
5111
 *  @brief This API is used to read soft iron calibration matrix
5112
 *  from the register 0x43 to 0x53 it is a 18 bytes of data
5113
 *
5114
 *  @param sic_matrix : The value of soft iron calibration matrix
5115
 *
5116
 *  sic_matrix         |           result
5117
 * --------------------|----------------------------------
5118
 *       sic_0         | soft iron calibration matrix zero
5119
 *       sic_1         | soft iron calibration matrix one
5120
 *       sic_2         | soft iron calibration matrix two
5121
 *       sic_3         | soft iron calibration matrix three
5122
 *       sic_4         | soft iron calibration matrix four
5123
 *       sic_5         | soft iron calibration matrix five
5124
 *       sic_6         | soft iron calibration matrix six
5125
 *       sic_7         | soft iron calibration matrix seven
5126
 *       sic_8         | soft iron calibration matrix eight
5127
 *
5128
 *
5129
 *  @return results of bus communication function
5130
 *  @retval 0 -> BNO055_SUCCESS
5131
 *  @retval 1 -> BNO055_ERROR
5132
 *
5133
 *  @note : Each soft iron calibration matrix range from -32768 to +32767
5134
 */
5135
BNO055_RETURN_FUNCTION_TYPE bno055_read_sic_matrix(
5136
        struct bno055_sic_matrix_t *sic_matrix);
5137
/*!
5138
 *  @brief This API is used to write soft iron calibration matrix
5139
 *  from the register 0x43 to 0x53 it is a 18 bytes of data
5140
 *
5141
 *  @param sic_matrix : The value of soft iron calibration matrix
5142
 *
5143
 *  sic_matrix         |           result
5144
 * --------------------|----------------------------------
5145
 *       sic_0         | soft iron calibration matrix zero
5146
 *       sic_1         | soft iron calibration matrix one
5147
 *       sic_2         | soft iron calibration matrix two
5148
 *       sic_3         | soft iron calibration matrix three
5149
 *       sic_4         | soft iron calibration matrix four
5150
 *       sic_5         | soft iron calibration matrix five
5151
 *       sic_6         | soft iron calibration matrix six
5152
 *       sic_7         | soft iron calibration matrix seven
5153
 *       sic_8         | soft iron calibration matrix eight
5154
 *
5155
 *
5156
 *  @return results of bus communication function
5157
 *  @retval 0 -> BNO055_SUCCESS
5158
 *  @retval 1 -> BNO055_ERROR
5159
 *
5160
 *  @note : Each soft iron calibration matrix range from -32768 to +32767
5161
 */
5162
BNO055_RETURN_FUNCTION_TYPE bno055_write_sic_matrix(
5163
        struct bno055_sic_matrix_t *sic_matrix);
5164
/*****************************************************/
5165
/**\name FUNCTIONS FOR ACCEL OFFSET AND RADIUS */
5166
/*****************************************************/
5167
/*!
5168
 *  @brief This API is used to read accel offset and accel radius
5169
 *  offset form register 0x55 to 0x5A and radius form 0x67 and 0x68
5170
 *
5171
 *  @param accel_offset : The value of accel offset and radius
5172
 *
5173
 *      bno055_accel_offset_t |     result
5174
 *      ------------------- | ----------------
5175
 *               x          |  accel offset x
5176
 *               y          |  accel offset y
5177
 *               z          |  accel offset z
5178
 *               r          |  accel offset r
5179
 *
5180
 *
5181
 *  @return results of bus communication function
5182
 *  @retval 0 -> BNO055_SUCCESS
5183
 *  @retval 1 -> BNO055_ERROR
5184
 *
5185
 *  @note  The range of the accel offset varies based on
5186
 *  the G-range of accel sensor.
5187
 *
5188
 *  accel G range   |  offset range
5189
 * ---------------  |  --------------
5190
 *  BNO055_ACCEL_RANGE_2G  |   +/-2000
5191
 *  BNO055_ACCEL_RANGE_4G  |   +/-4000
5192
 *  BNO055_ACCEL_RANGE_8G  |   +/-8000
5193
 *  BNO055_ACCEL_RANGE_16G |   +/-16000
5194
 *
5195
 *  accel G range can be configured by using the
5196
 *  bno055_set_accel_range() API
5197
 */
5198
BNO055_RETURN_FUNCTION_TYPE bno055_read_accel_offset(
5199
        struct bno055_accel_offset_t *accel_offset);
5200
/*!
5201
 *  @brief This API is used to write accel offset and accel radius
5202
 *  offset form register 0x55 to 0x5A and radius form 0x67 and 0x68
5203
 *
5204
 *  @param accel_offset : The value of accel offset and radius
5205
 *
5206
 *      bno055_accel_offset_t |     result
5207
 *      ------------------- | ----------------
5208
 *               x          |  accel offset x
5209
 *               y          |  accel offset y
5210
 *               z          |  accel offset z
5211
 *               r          |  accel offset r
5212
 *
5213
 *
5214
 *  @return results of bus communication function
5215
 *  @retval 0 -> BNO055_SUCCESS
5216
 *  @retval 1 -> BNO055_ERROR
5217
 *
5218
 *  @note  The range of the accel offset varies based on
5219
 *  the G-range of accel sensor.
5220
 *
5221
 *  accel G range   |  offset range
5222
 * ---------------  |  --------------
5223
 *  BNO055_ACCEL_RANGE_2G  |   +/-2000
5224
 *  BNO055_ACCEL_RANGE_4G  |   +/-4000
5225
 *  BNO055_ACCEL_RANGE_8G  |   +/-8000
5226
 *  BNO055_ACCEL_RANGE_16G |   +/-16000
5227
 *
5228
 *  accel G range can be configured by using the
5229
 *  bno055_set_accel_range() API
5230
 */
5231
BNO055_RETURN_FUNCTION_TYPE bno055_write_accel_offset(
5232
        struct bno055_accel_offset_t *accel_offset);
5233
/*****************************************************/
5234
/**\name FUNCTIONS FOR MAG OFFSET AND RADIUS*/
5235
/*****************************************************/
5236
/*!
5237
 *  @brief This API is used to read mag offset
5238
 *  offset form register 0x69 to 0x6A
5239
 *
5240
 *  @param mag_offset :  The value of mag offset and radius
5241
 *
5242
 *      bno055_mag_offset_t   |     result
5243
 *      ------------------- | ----------------
5244
 *               x          |  mag offset x
5245
 *               y          |  mag offset y
5246
 *               z          |  mag offset z
5247
 *               r          |  mag radius r
5248
 *
5249
 *
5250
 *  @return results of bus communication function
5251
 *  @retval 0 -> BNO055_SUCCESS
5252
 *  @retval 1 -> BNO055_ERROR
5253
 *
5254
 *  @note  The range of the magnetometer offset is +/-6400 in LSB
5255
 */
5256

    
5257
BNO055_RETURN_FUNCTION_TYPE bno055_read_mag_offset(
5258
        struct bno055_mag_offset_t *mag_offset);
5259
/*!
5260
 *  @brief This API is used to read mag offset
5261
 *  offset form register 0x69 to 0x6A
5262
 *
5263
 *  @param mag_offset :  The value of mag offset and radius
5264
 *
5265
 *      bno055_mag_offset_t   |     result
5266
 *      ------------------- | ----------------
5267
 *               x          |  mag offset x
5268
 *               y          |  mag offset y
5269
 *               z          |  mag offset z
5270
 *               r          |  mag radius r
5271
 *
5272
 *
5273
 *  @return results of bus communication function
5274
 *  @retval 0 -> BNO055_SUCCESS
5275
 *  @retval 1 -> BNO055_ERROR
5276
 *
5277
 *  @note  The range of the magnetometer offset is +/-6400 in LSB
5278
 */
5279
BNO055_RETURN_FUNCTION_TYPE bno055_write_mag_offset(
5280
        struct bno055_mag_offset_t *mag_offset);
5281
/*****************************************************/
5282
/**\name FUNCTIONS FOR GYRO OFFSET */
5283
/*****************************************************/
5284
/*!
5285
 *  @brief This API is used to read gyro offset
5286
 *  offset form register 0x61 to 0x66
5287
 *
5288
 *  @param gyro_offset : The value of gyro offset
5289
 *
5290
 *      bno055_gyro_offset_t  |     result
5291
 *      ------------------- | ----------------
5292
 *               x          |  gyro offset x
5293
 *               y          |  gyro offset y
5294
 *               z          |  gyro offset z
5295
 *
5296
 *
5297
 *  @return results of bus communication function
5298
 *  @retval 0 -> BNO055_SUCCESS
5299
 *  @retval 1 -> BNO055_ERROR
5300
 *
5301
 *  @note  The range of the gyro offset varies based on
5302
 *  the range of gyro sensor
5303
 *
5304
 *  gyro G range         | offset range
5305
 * --------------------  | ------------
5306
 *  BNO055_GYRO_RANGE_2000DPS   | +/-32000
5307
 *  BNO055_GYRO_RANGE_1000DPS   | +/-16000
5308
 *  BNO055_GYRO_RANGE_500DPS    | +/-8000
5309
 *  BNO055_GYRO_RANGE_250DPS    | +/-4000
5310
 *  BNO055_GYRO_RANGE_125DPS    | +/-2000
5311
 *
5312
 *  Gyro range can be configured by using the
5313
 *  bno055_set_gyro_range() API
5314
 */
5315
BNO055_RETURN_FUNCTION_TYPE bno055_read_gyro_offset(
5316
        struct bno055_gyro_offset_t *gyro_offset);
5317
/*!
5318
 *  @brief This API is used to read gyro offset
5319
 *  offset form register 0x61 to 0x66
5320
 *
5321
 *  @param gyro_offset : The value of gyro offset
5322
 *
5323
 *      bno055_gyro_offset_t  |     result
5324
 *      ------------------- | ----------------
5325
 *               x          |  gyro offset x
5326
 *               y          |  gyro offset y
5327
 *               z          |  gyro offset z
5328
 *
5329
 *
5330
 *  @return results of bus communication function
5331
 *  @retval 0 -> BNO055_SUCCESS
5332
 *  @retval 1 -> BNO055_ERROR
5333
 *
5334
 *  @note  The range of the gyro offset varies based on
5335
 *  the range of gyro sensor
5336
 *
5337
 *  gyro G range         | offset range
5338
 * --------------------  | ------------
5339
 *  BNO055_GYRO_RANGE_2000DPS   | +/-32000
5340
 *  BNO055_GYRO_RANGE_1000DPS   | +/-16000
5341
 *  BNO055_GYRO_RANGE_500DPS    | +/-8000
5342
 *  BNO055_GYRO_RANGE_250DPS    | +/-4000
5343
 *  BNO055_GYRO_RANGE_125DPS    | +/-2000
5344
 *
5345
 *  Gyro range can be configured by using the
5346
 *  bno055_set_gyro_range() API
5347
 */
5348
BNO055_RETURN_FUNCTION_TYPE bno055_write_gyro_offset(
5349
        struct bno055_gyro_offset_t *gyro_offset);
5350
/********************************************************/
5351
/************** PAGE1 Functions *********************/
5352
/********************************************************/
5353
/*****************************************************/
5354
/**\name FUNCTIONS FOR ACCEL CONFIGURATION */
5355
/*****************************************************/
5356
/*!
5357
 *  @brief This API used to read the accel range
5358
 *  from page one register from 0x08 bit 0 and 1
5359
 *
5360
 *  @param accel_range_u8 : The value of accel range
5361
 *        accel_range_u8 |   result
5362
 *       ----------------- | --------------
5363
 *              0x00       | BNO055_ACCEL_RANGE_2G
5364
 *              0x01       | BNO055_ACCEL_RANGE_4G
5365
 *              0x02       | BNO055_ACCEL_RANGE_8G
5366
 *              0x03       | BNO055_ACCEL_RANGE_16G
5367
 *
5368
 *  @return results of bus communication function
5369
 *  @retval 0 -> BNO055_SUCCESS
5370
 *  @retval 1 -> BNO055_ERROR
5371
 *
5372
 *
5373
 */
5374
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_range(u8 *accel_range_u8);
5375
/*!
5376
 *  @brief This API used to write the accel range
5377
 *  from page one register from 0x08 bit 0 and 1
5378
 *
5379
 *  @param accel_range_u8 : The value of accel range
5380
 *
5381
 *        accel_range_u8 |   result
5382
 *       ----------------- | --------------
5383
 *              0x00       | BNO055_ACCEL_RANGE_2G
5384
 *              0x01       | BNO055_ACCEL_RANGE_4G
5385
 *              0x02       | BNO055_ACCEL_RANGE_8G
5386
 *              0x03       | BNO055_ACCEL_RANGE_16G
5387
 *
5388
 *  @return results of bus communication function
5389
 *  @retval 0 -> BNO055_SUCCESS
5390
 *  @retval 1 -> BNO055_ERROR
5391
 *
5392
 *
5393
 */
5394
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_range(u8 accel_range_u8);
5395
/*!
5396
 *  @brief This API used to read the accel bandwidth
5397
 *  from page one register from 0x08 bit 2 to 4
5398
 *
5399
 *  @param accel_bw_u8 : The value of accel bandwidth
5400
 *
5401
 *           accel_bw_u8 |     result
5402
 *       ----------------- | ---------------
5403
 *              0x00       | BNO055_ACCEL_BW_7_81HZ
5404
 *              0x01       | BNO055_ACCEL_BW_15_63HZ
5405
 *              0x02       | BNO055_ACCEL_BW_31_25HZ
5406
 *              0x03       | BNO055_ACCEL_BW_62_5HZ
5407
 *              0x04       | BNO055_ACCEL_BW_125HZ
5408
 *              0x05       | BNO055_ACCEL_BW_250HZ
5409
 *              0x06       | BNO055_ACCEL_BW_500HZ
5410
 *              0x07       | BNO055_ACCEL_BW_1000HZ
5411
 *
5412
 *  @return results of bus communication function
5413
 *  @retval 0 -> BNO055_SUCCESS
5414
 *  @retval 1 -> BNO055_ERROR
5415
 *
5416
 *
5417
 */
5418
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_bw(u8 *accel_bw_u8);
5419
/*!
5420
 *  @brief This API used to write the accel bandwidth
5421
 *  from page one register from 0x08 bit 2 to 4
5422
 *
5423
 *  @param accel_bw_u8 : The value of accel bandwidth
5424
 *
5425
 *           accel_bw_u8 |     result
5426
 *       ----------------- | ---------------
5427
 *              0x00       | BNO055_ACCEL_BW_7_81HZ
5428
 *              0x01       | BNO055_ACCEL_BW_15_63HZ
5429
 *              0x02       | BNO055_ACCEL_BW_31_25HZ
5430
 *              0x03       | BNO055_ACCEL_BW_62_5HZ
5431
 *              0x04       | BNO055_ACCEL_BW_125HZ
5432
 *              0x05       | BNO055_ACCEL_BW_250HZ
5433
 *              0x06       | BNO055_ACCEL_BW_500HZ
5434
 *              0x07       | BNO055_ACCEL_BW_1000HZ
5435
 *
5436
 *  @return results of bus communication function
5437
 *  @retval 0 -> BNO055_SUCCESS
5438
 *  @retval 1 -> BNO055_ERROR
5439
 *
5440
 *
5441
 */
5442
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_bw(u8 accel_bw_u8);
5443
/*!
5444
 *  @brief This API used to read the accel power mode
5445
 *  from page one register from 0x08 bit 5 to 7
5446
 *
5447
 *  @param accel_power_mode_u8 : The value of accel power mode
5448
 * accel_power_mode_u8 |   result
5449
 *   -----------------   | -------------
5450
 *              0x00     | BNO055_ACCEL_NORMAL
5451
 *              0x01     | BNO055_ACCEL_SUSPEND
5452
 *              0x02     | BNO055_ACCEL_LOWPOWER_1
5453
 *              0x03     | BNO055_ACCEL_STANDBY
5454
 *              0x04     | BNO055_ACCEL_LOWPOWER_2
5455
 *              0x05     | BNO055_ACCEL_DEEPSUSPEND
5456
 *
5457
 *  @return results of bus communication function
5458
 *  @retval 0 -> BNO055_SUCCESS
5459
 *  @retval 1 -> BNO055_ERROR
5460
 *
5461
 *
5462
 */
5463
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_power_mode(u8 *accel_power_mode_u8);
5464
/*!
5465
 *  @brief This API used to write the accel power mode
5466
 *  from page one register from 0x08 bit 5 to 7
5467
 *
5468
 *  @param accel_power_mode_u8 : The value of accel power mode
5469
 * accel_power_mode_u8 |   result
5470
 *   -----------------   | -------------
5471
 *              0x00     | BNO055_ACCEL_NORMAL
5472
 *              0x01     | BNO055_ACCEL_SUSPEND
5473
 *              0x02     | BNO055_ACCEL_LOWPOWER_1
5474
 *              0x03     | BNO055_ACCEL_STANDBY
5475
 *              0x04     | BNO055_ACCEL_LOWPOWER_2
5476
 *              0x05     | BNO055_ACCEL_DEEPSUSPEND
5477
 *
5478
 *  @return results of bus communication function
5479
 *  @retval 0 -> BNO055_SUCCESS
5480
 *  @retval 1 -> BNO055_ERROR
5481
 *
5482
 *
5483
 */
5484
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_power_mode(u8 accel_power_mode_u8);
5485
/*****************************************************/
5486
/**\name FUNCTIONS FOR MAG CONFIGURATION */
5487
/*****************************************************/
5488
/*!
5489
 *  @brief This API used to read the mag output data rate
5490
 *  from page one register from 0x09 bit 0 to 2
5491
 *
5492
 *  @param mag_data_output_rate_u8 : The value of mag output data rate
5493
 *
5494
 *  mag_data_output_rate_u8 |   result
5495
 *  ----------------------    |----------------------
5496
 *     0x00                   | MAG_DATA_OUTPUT_RATE_2HZ
5497
 *     0x01                   | MAG_DATA_OUTPUT_RATE_6HZ
5498
 *     0x02                   | MAG_DATA_OUTPUT_RATE_8HZ
5499
 *     0x03                   | MAG_DATA_OUTPUT_RATE_10HZ
5500
 *     0x04                   | MAG_DATA_OUTPUT_RATE_15HZ
5501
 *     0x05                   | MAG_DATA_OUTPUT_RATE_20HZ
5502
 *     0x06                   | MAG_DATA_OUTPUT_RATE_25HZ
5503
 *     0x07                   | MAG_DATA_OUTPUT_RATE_30HZ
5504
 *
5505
 *  @return results of bus communication function
5506
 *  @retval 0 -> BNO055_SUCCESS
5507
 *  @retval 1 -> BNO055_ERROR
5508
 *
5509
 *
5510
 */
5511
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_data_output_rate(
5512
        u8 *mag_data_output_rate_u8);
5513
/*!
5514
 *  @brief This API used to write the mag output data rate
5515
 *  from page one register from 0x09 bit 0 to 2
5516
 *
5517
 *  @param mag_data_output_rate_u8 : The value of mag output data rate
5518
 *
5519
 *  mag_data_output_rate_u8 |   result
5520
 *  ----------------------  |----------------------
5521
 *     0x00                 | MAG_DATA_OUTPUT_RATE_2HZ
5522
 *     0x01                 | MAG_DATA_OUTPUT_RATE_6HZ
5523
 *     0x02                 | MAG_DATA_OUTPUT_RATE_8HZ
5524
 *     0x03                 | MAG_DATA_OUTPUT_RATE_10HZ
5525
 *     0x04                 | MAG_DATA_OUTPUT_RATE_15HZ
5526
 *     0x05                 | MAG_DATA_OUTPUT_RATE_20HZ
5527
 *     0x06                 | MAG_DATA_OUTPUT_RATE_25HZ
5528
 *     0x07                 | MAG_DATA_OUTPUT_RATE_30HZ
5529
 *
5530
 *  @return results of bus communication function
5531
 *  @retval 0 -> BNO055_SUCCESS
5532
 *  @retval 1 -> BNO055_ERROR
5533
 *
5534
 *
5535
 */
5536
BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_data_output_rate(
5537
        u8 mag_data_output_rate_u8);
5538
/*!
5539
 *  @brief This API used to read the mag operation mode
5540
 *  from page one register from 0x09 bit 3 to 4
5541
 *
5542
 *  @param mag_operation_mode_u8 : The value of mag operation mode
5543
 *
5544
 *  mag_operation_mode_u8  |      result
5545
 * ------------------------|--------------------------
5546
 *     0x00                | MAG_OPR_MODE_LOWPOWER
5547
 *     0x01                | MAG_OPR_MODE_REGULAR
5548
 *     0x02                | MAG_OPR_MODE_ENHANCED_REGULAR
5549
 *     0x03                | MAG_OPR_MODE_HIGH_ACCURACY
5550
 *
5551
 *  @return results of bus communication function
5552
 *  @retval 0 -> BNO055_SUCCESS
5553
 *  @retval 1 -> BNO055_ERROR
5554
 *
5555
 *
5556
 */
5557
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_operation_mode(
5558
        u8 *mag_operation_mode_u8);
5559
/*!
5560
 *  @brief This API used to write the mag operation mode
5561
 *  from page one register from 0x09 bit 3 to 4
5562
 *
5563
 *  @param mag_operation_mode_u8 : The value of mag operation mode
5564
 *
5565
 *  mag_operation_mode_u8  |      result
5566
 * ------------------------|--------------------------
5567
 *     0x00                | MAG_OPR_MODE_LOWPOWER
5568
 *     0x01                | MAG_OPR_MODE_REGULAR
5569
 *     0x02                | MAG_OPR_MODE_ENHANCED_REGULAR
5570
 *     0x03                | MAG_OPR_MODE_HIGH_ACCURACY
5571
 *
5572
 *  @return results of bus communication function
5573
 *  @retval 0 -> BNO055_SUCCESS
5574
 *  @retval 1 -> BNO055_ERROR
5575
 *
5576
 *
5577
 */
5578
BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_operation_mode(
5579
        u8 mag_operation_mode_u8);
5580
/*!
5581
 *  @brief This API used to read the mag power mode
5582
 *  from page one register from 0x09 bit 4 to 6
5583
 *
5584
 *  @param mag_power_mode_u8 : The value of mag power mode
5585
 *
5586
 * mag_power_mode_u8   |  result
5587
 * --------------------|-----------------
5588
 *     0x00            | BNO055_MAG_POWER_MODE_NORMAL
5589
 *     0x01            | BNO055_MAG_POWER_MODE_SLEEP
5590
 *     0x02            | BNO055_MAG_POWER_MODE_SUSPEND
5591
 *     0x03            | BNO055_MAG_POWER_MODE_FORCE_MODE
5592
 *
5593
 *  @return results of bus communication function
5594
 *  @retval 0 -> BNO055_SUCCESS
5595
 *  @retval 1 -> BNO055_ERROR
5596
 *
5597
 *
5598
 */
5599
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_power_mode(u8 *mag_power_mode_u8);
5600
/*!
5601
 *  @brief This API used to write the mag power mode
5602
 *  from page one register from 0x09 bit 4 to 6
5603
 *
5604
 *  @param mag_power_mode_u8 : The value of mag power mode
5605
 *
5606
 * mag_power_mode_u8 |   result
5607
 * ------------------|-----------------
5608
 *     0x00          | BNO055_MAG_POWER_MODE_NORMAL
5609
 *     0x01          | BNO055_MAG_POWER_MODE_SLEEP
5610
 *     0x02          | BNO055_MAG_POWER_MODE_SUSPEND
5611
 *     0x03          | BNO055_MAG_POWER_MODE_FORCE_MODE
5612
 *
5613
 *  @return results of bus communication function
5614
 *  @retval 0 -> BNO055_SUCCESS
5615
 *  @retval 1 -> BNO055_ERROR
5616
 *
5617
 *
5618
 */
5619
BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_power_mode(u8 mag_power_mode_u8);
5620
/*****************************************************/
5621
/**\name FUNCTIONS FOR GYRO CONFIGURATION */
5622
/*****************************************************/
5623
/*!
5624
 *  @brief This API used to read the gyro range
5625
 *  from page one register from 0x0A bit 0 to 3
5626
 *
5627
 *  @param gyro_range_u8 : The value of gyro range
5628
 *
5629
 *     gyro_range_u8 |   result
5630
 * --------------------|-----------------
5631
 *     0x00            | BNO055_GYRO_RANGE_2000DPS
5632
 *     0x01            | BNO055_GYRO_RANGE_1000DPS
5633
 *     0x02            | BNO055_GYRO_RANGE_500DPS
5634
 *     0x03            | BNO055_GYRO_RANGE_250DPS
5635
 *     0x04            | BNO055_GYRO_RANGE_125DPS
5636
 *
5637
 *  @return results of bus communication function
5638
 *  @retval 0 -> BNO055_SUCCESS
5639
 *  @retval 1 -> BNO055_ERROR
5640
 *
5641
 *
5642
 */
5643
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_range(u8 *gyro_range_u8);
5644
/*!
5645
 *  @brief This API used to write the gyro range
5646
 *  from page one register from 0x0A bit 0 to 3
5647
 *
5648
 *  @param gyro_range_u8 : The value of gyro range
5649
 *
5650
 *     gyro_range_u8 |   result
5651
 * --------------------|-----------------
5652
 *     0x00            | BNO055_GYRO_RANGE_2000DPS
5653
 *     0x01            | BNO055_GYRO_RANGE_1000DPS
5654
 *     0x02            | BNO055_GYRO_RANGE_500DPS
5655
 *     0x03            | BNO055_GYRO_RANGE_250DPS
5656
 *     0x04            | BNO055_GYRO_RANGE_125DPS
5657
 *
5658
 *  @return results of bus communication function
5659
 *  @retval 0 -> BNO055_SUCCESS
5660
 *  @retval 1 -> BNO055_ERROR
5661
 *
5662
 *
5663
 */
5664
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_range(u8 gyro_range_u8);
5665
/*!
5666
 *  @brief This API used to read the gyro bandwidth
5667
 *  from page one register from 0x0A bit 3 to 5
5668
 *
5669
 *  @param gyro_bw_u8 : The value of gyro bandwidth
5670
 *
5671
 *     gyro_bw_u8    |   result
5672
 * --------------------|-----------------
5673
 *     0x00            | BNO055_GYRO_BW_523HZ
5674
 *     0x01            | BNO055_GYRO_BW_230HZ
5675
 *     0x02            | BNO055_GYRO_BW_116HZ
5676
 *     0x03            | BNO055_GYRO_BW_47HZ
5677
 *     0x04            | BNO055_GYRO_BW_23HZ
5678
 *     0x05            | BNO055_GYRO_BW_12HZ
5679
 *     0x06            | BNO055_GYRO_BW_64HZ
5680
 *     0x07            | BNO055_GYRO_BW_32HZ
5681
 *
5682
 *  @return results of bus communication function
5683
 *  @retval 0 -> BNO055_SUCCESS
5684
 *  @retval 1 -> BNO055_ERROR
5685
 *
5686
 *
5687
 */
5688
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_bw(u8 *gyro_bw_u8);
5689
/*!
5690
 *  @brief This API used to write the gyro bandwidth
5691
 *  from page one register from 0x0A bit 3 to 5
5692
 *
5693
 *  @param gyro_bw_u8 : The value of gyro bandwidth
5694
 *
5695
 *     gyro_bw_u8    |   result
5696
 * --------------------|-----------------
5697
 *     0x00            | BNO055_GYRO_BW_523HZ
5698
 *     0x01            | BNO055_GYRO_BW_230HZ
5699
 *     0x02            | BNO055_GYRO_BW_116HZ
5700
 *     0x03            | BNO055_GYRO_BW_47HZ
5701
 *     0x04            | BNO055_GYRO_BW_23HZ
5702
 *     0x05            | BNO055_GYRO_BW_12HZ
5703
 *     0x06            | BNO055_GYRO_BW_64HZ
5704
 *     0x07            | BNO055_GYRO_BW_32HZ
5705
 *
5706
 *  @return results of bus communication function
5707
 *  @retval 0 -> BNO055_SUCCESS
5708
 *  @retval 1 -> BNO055_ERROR
5709
 *
5710
 *
5711
 */
5712
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_bw(u8 gyro_bw_u8);
5713
/*!
5714
 *  @brief This API used to read the gyro power mode
5715
 *  from page one register from 0x0B bit 0 to 2
5716
 *
5717
 *  @param gyro_power_mode_u8 : The value of gyro power mode
5718
 *
5719
 *  gyro_power_mode_u8 |          result
5720
 * ----------------------|----------------------------
5721
 *     0x00              | GYRO_OPR_MODE_NORMAL
5722
 *     0x01              | GYRO_OPR_MODE_FASTPOWERUP
5723
 *     0x02              | GYRO_OPR_MODE_DEEPSUSPEND
5724
 *     0x03              | GYRO_OPR_MODE_SUSPEND
5725
 *     0x04              | GYRO_OPR_MODE_ADVANCE_POWERSAVE
5726
 *
5727
 *  @return results of bus communication function
5728
 *  @retval 0 -> BNO055_SUCCESS
5729
 *  @retval 1 -> BNO055_ERROR
5730
 *
5731
 *
5732
 */
5733
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_power_mode(u8 *gyro_power_mode_u8);
5734
/*!
5735
 *  @brief This API used to write the gyro power mode
5736
 *  from page one register from 0x0B bit 0 to 2
5737
 *
5738
 *  @param gyro_power_mode_u8 : The value of gyro power mode
5739
 *
5740
 *  gyro_power_mode_u8 |          result
5741
 * ----------------------|----------------------------
5742
 *     0x00              | GYRO_OPR_MODE_NORMAL
5743
 *     0x01              | GYRO_OPR_MODE_FASTPOWERUP
5744
 *     0x02              | GYRO_OPR_MODE_DEEPSUSPEND
5745
 *     0x03              | GYRO_OPR_MODE_SUSPEND
5746
 *     0x04              | GYRO_OPR_MODE_ADVANCE_POWERSAVE
5747
 *
5748
 *  @return results of bus communication function
5749
 *  @retval 0 -> BNO055_SUCCESS
5750
 *  @retval 1 -> BNO055_ERROR
5751
 *
5752
 *
5753
 */
5754
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_power_mode(u8 gyro_power_mode_u8);
5755
/*****************************************************/
5756
/**\name FUNCTIONS FOR ACCEL SLEEP SETTINGS  */
5757
/*****************************************************/
5758
/*!
5759
 *  @brief This API used to read the accel sleep mode
5760
 *  from page one register from 0x0C bit 0
5761
 *
5762
 *  @param sleep_tmr_u8 : The value of accel sleep mode
5763
 *
5764
 *  sleep_tmr_u8   |   result
5765
 * ----------------- |------------------------------------
5766
 *     0x00          | enable EventDrivenSampling(EDT)
5767
 *     0x01          | enable Equidistant sampling mode(EST)
5768
 *
5769
 *  @return results of bus communication function
5770
 *  @retval 0 -> BNO055_SUCCESS
5771
 *  @retval 1 -> BNO055_ERROR
5772
 *
5773
 *
5774
 */
5775
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_sleep_tmr_mode(u8 *sleep_tmr_u8);
5776
/*!
5777
 *  @brief This API used to write the accel sleep mode
5778
 *  from page one register from 0x0C bit 0
5779
 *
5780
 *  @param sleep_tmr_u8 : The value of accel sleep mode
5781
 *
5782
 *  sleep_tmr_u8   |   result
5783
 * ----------------- |------------------------------------
5784
 *     0x00          | enable EventDrivenSampling(EDT)
5785
 *     0x01          | enable Equidistant sampling mode(EST)
5786
 *
5787
 *  @return results of bus communication function
5788
 *  @retval 0 -> BNO055_SUCCESS
5789
 *  @retval 1 -> BNO055_ERROR
5790
 *
5791
 *
5792
 */
5793
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_sleep_tmr_mode(u8 sleep_tmr_u8);
5794
/*!
5795
 *  @brief This API used to read the accel sleep duration
5796
 *  from page one register from 0x0C bit 1 to 4
5797
 *
5798
 *  @param sleep_durn_u8 : The value of accel sleep duration
5799
 *
5800
 * sleep_durn_u8  |      result
5801
 * ---------------- |-----------------------------
5802
 *     0x05         | BNO055_ACCEL_SLEEP_DURN_0_5MS
5803
 *     0x06         | BNO055_ACCEL_SLEEP_DURN_1MS
5804
 *     0x07         | BNO055_ACCEL_SLEEP_DURN_2MS
5805
 *     0x08         | BNO055_ACCEL_SLEEP_DURN_4MS
5806
 *     0x09         | BNO055_ACCEL_SLEEP_DURN_6MS
5807
 *     0x0A         | BNO055_ACCEL_SLEEP_DURN_10MS
5808
 *     0x0B         | BNO055_ACCEL_SLEEP_DURN_25MS
5809
 *     0x0C         | BNO055_ACCEL_SLEEP_DURN_50MS
5810
 *     0x0D         | BNO055_ACCEL_SLEEP_DURN_100MS
5811
 *     0x0E         | BNO055_ACCEL_SLEEP_DURN_500MS
5812
 *     0x0F         | BNO055_ACCEL_SLEEP_DURN_1S
5813
 *
5814
 *  @return results of bus communication function
5815
 *  @retval 0 -> BNO055_SUCCESS
5816
 *  @retval 1 -> BNO055_ERROR
5817
 *
5818
 *
5819
 */
5820
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_sleep_durn(u8 *sleep_durn_u8);
5821
/*!
5822
 *  @brief This API used to write the accel sleep duration
5823
 *  from page one register from 0x0C bit 1 to 4
5824
 *
5825
 *  @param sleep_durn_u8 : The value of accel sleep duration
5826
 *
5827
 * sleep_durn_u8  |      result
5828
 * ---------------- |-----------------------------
5829
 *     0x05         | BNO055_ACCEL_SLEEP_DURN_0_5MS
5830
 *     0x06         | BNO055_ACCEL_SLEEP_DURN_1MS
5831
 *     0x07         | BNO055_ACCEL_SLEEP_DURN_2MS
5832
 *     0x08         | BNO055_ACCEL_SLEEP_DURN_4MS
5833
 *     0x09         | BNO055_ACCEL_SLEEP_DURN_6MS
5834
 *     0x0A         | BNO055_ACCEL_SLEEP_DURN_10MS
5835
 *     0x0B         | BNO055_ACCEL_SLEEP_DURN_25MS
5836
 *     0x0C         | BNO055_ACCEL_SLEEP_DURN_50MS
5837
 *     0x0D         | BNO055_ACCEL_SLEEP_DURN_100MS
5838
 *     0x0E         | BNO055_ACCEL_SLEEP_DURN_500MS
5839
 *     0x0F         | BNO055_ACCEL_SLEEP_DURN_1S
5840
 *
5841
 *  @return results of bus communication function
5842
 *  @retval 0 -> BNO055_SUCCESS
5843
 *  @retval 1 -> BNO055_ERROR
5844
 *
5845
 *
5846
 */
5847
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_sleep_durn(u8 sleep_durn_u8);
5848
/*****************************************************/
5849
/**\name FUNCTIONS FOR GYRO SLEEP SETTINGS  */
5850
/*****************************************************/
5851
/*!
5852
 *  @brief This API used to write the gyro sleep duration
5853
 *  from page one register from 0x0D bit 0 to 2
5854
 *
5855
 *  @param sleep_durn_u8 : The value of gyro sleep duration
5856
 *
5857
 *  @return results of bus communication function
5858
 *  @retval 0 -> BNO055_SUCCESS
5859
 *  @retval 1 -> BNO055_ERROR
5860
 *
5861
 *
5862
 */
5863
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_sleep_durn(u8 *sleep_durn_u8);
5864
/*!
5865
 *  @brief This API used to write the gyro sleep duration
5866
 *  from page one register from 0x0D bit 0 to 2
5867
 *
5868
 *  @param sleep_durn_u8 : The value of gyro sleep duration
5869
 *
5870
 *  @return results of bus communication function
5871
 *  @retval 0 -> BNO055_SUCCESS
5872
 *  @retval 1 -> BNO055_ERROR
5873
 *
5874
 *
5875
 */
5876
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_sleep_durn(u8 sleep_durn);
5877
/*!
5878
 *  @brief This API used to read the gyro auto sleep duration
5879
 *  from page one register from 0x0D bit 3 to 5
5880
 *
5881
 *  @param auto_sleep_durn_u8 : The value of gyro auto sleep duration
5882
 *
5883
 *  @return results of bus communication function
5884
 *  @retval 0 -> BNO055_SUCCESS
5885
 *  @retval 1 -> BNO055_ERROR
5886
 *
5887
 *
5888
 */
5889
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_auto_sleep_durn(
5890
        u8 *auto_sleep_durn_u8);
5891
/*!
5892
 *  @brief This API used to write the gyro auto sleep duration
5893
 *  from page one register from 0x0D bit 3 to 5
5894
 *
5895
 *  @param auto_sleep_durn_u8 : The value of gyro auto sleep duration
5896
 *  @param bw : The value of gyro bandwidth
5897
 *
5898
 *  @return results of bus communication function
5899
 *  @retval 0 -> BNO055_SUCCESS
5900
 *  @retval 1 -> BNO055_ERROR
5901
 *
5902
 *
5903
 */
5904
BNO055_RETURN_FUNCTION_TYPE bno055_gyro_set_auto_sleep_durn(
5905
        u8 auto_sleep_durn_u8, u8 bw);
5906
/*****************************************************/
5907
/**\name FUNCTIONS FOR MAG SLEEP SETTINGS  */
5908
/*****************************************************/
5909
/*!
5910
 *  @brief This API used to read the mag sleep mode
5911
 *  from page one register from 0x0E bit 0
5912
 *
5913
 *  @param sleep_mode_u8 : The value of mag sleep mode
5914
 *
5915
 *  @return results of bus communication function
5916
 *  @retval 0 -> BNO055_SUCCESS
5917
 *  @retval 1 -> BNO055_ERROR
5918
 *
5919
 *
5920
 */
5921
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_sleep_mode(u8 *sleep_mode_u8);
5922
/*!
5923
 *  @brief This API used to write the mag sleep mode
5924
 *  from page one register from 0x0E bit 0
5925
 *
5926
 *  @param sleep_mode_u8 : The value of mag sleep mode
5927
 *
5928
 *  @return results of bus communication function
5929
 *  @retval 0 -> BNO055_SUCCESS
5930
 *  @retval 1 -> BNO055_ERROR
5931
 *
5932
 *
5933
 */
5934
BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_sleep_mode(u8 sleep_mode_u8);
5935
/*!
5936
 *  @brief This API used to read the mag sleep duration
5937
 *  from page one register from 0x0E bit 1 to 4
5938
 *
5939
 *  @param sleep_durn_u8 : The value of mag sleep duration
5940
 *
5941
 *  @return results of bus communication function
5942
 *  @retval 0 -> BNO055_SUCCESS
5943
 *  @retval 1 -> BNO055_ERROR
5944
 *
5945
 *
5946
 */
5947
BNO055_RETURN_FUNCTION_TYPE bno055_get_mag_sleep_durn(u8 *sleep_durn_u8);
5948
/*!
5949
 *  @brief This API used to write the mag sleep duration
5950
 *  from page one register from 0x0E bit 1 to 4
5951
 *
5952
 *  @param sleep_durn_u8 : The value of mag sleep duration
5953
 *
5954
 *  @return results of bus communication function
5955
 *  @retval 0 -> BNO055_SUCCESS
5956
 *  @retval 1 -> BNO055_ERROR
5957
 *
5958
 *
5959
 */
5960
BNO055_RETURN_FUNCTION_TYPE bno055_set_mag_sleep_durn(u8 sleep_durn_u8);
5961
/*****************************************************/
5962
/**\name FUNCTIONS FOR GYRO INTERRUPT MASK  */
5963
/*****************************************************/
5964
/*!
5965
 *  @brief This API used to read the gyro anymotion interrupt mask
5966
 *  from page one register from 0x0F bit 2
5967
 *
5968
 *  @param gyro_any_motion_u8 : The value of gyro anymotion interrupt mask
5969
 *      gyro_any_motion_u8 |   result
5970
 *     --------------------  |------------
5971
 *              0x01         | BNO055_BIT_ENABLE
5972
 *              0x00         | BNO055_BIT_DISABLE
5973
 *
5974
 *  @return results of bus communication function
5975
 *  @retval 0 -> BNO055_SUCCESS
5976
 *  @retval 1 -> BNO055_ERROR
5977
 *
5978
 *  @note While enabling the gyro anymotion interrupt
5979
 *  configure the following settings
5980
 *
5981
 *  Axis:
5982
 *  bno055_set_gyro_any_motion_axis_enable()
5983
 *
5984
 *  Filter setting:
5985
 *  bno055_set_gyro_any_motion_filter()
5986
 *
5987
 *  Threshold :
5988
 *
5989
 *  bno055_set_gyro_any_motion_thres()
5990
 *
5991
 *  Slope samples :
5992
 *
5993
 *  bno055_set_gyro_any_motion_slope_samples()
5994
 *
5995
 *  Awake duration :
5996
 *
5997
 *  bno055_set_gyro_any_motion_awake_durn()
5998
 *
5999
 */
6000
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_gyro_any_motion(
6001
        u8 *gyro_any_motion_u8);
6002
/*!
6003
 *  @brief This API used to write the gyro anymotion interrupt mask
6004
 *  from page one register from 0x0F bit 2
6005
 *
6006
 *  @param gyro_any_motion_u8 : The value of gyro anymotion interrupt mask
6007
 *      gyro_any_motion_u8 |   result
6008
 *     --------------------  |------------
6009
 *              0x01         | BNO055_BIT_ENABLE
6010
 *              0x00         | BNO055_BIT_DISABLE
6011
 *
6012
 *  @return results of bus communication function
6013
 *  @retval 0 -> BNO055_SUCCESS
6014
 *  @retval 1 -> BNO055_ERROR
6015
 *
6016
 *  @note While enabling the gyro anymotion interrupt
6017
 *  configure the following settings
6018
 *
6019
 *  Axis:
6020
 *  bno055_set_gyro_any_motion_axis_enable()
6021
 *
6022
 *  Filter setting:
6023
 *  bno055_set_gyro_any_motion_filter()
6024
 *
6025
 *  Threshold :
6026
 *
6027
 *  bno055_set_gyro_any_motion_thres()
6028
 *
6029
 *  Slope samples :
6030
 *
6031
 *  bno055_set_gyro_any_motion_slope_samples()
6032
 *
6033
 *  Awake duration :
6034
 *
6035
 *  bno055_set_gyro_any_motion_awake_durn()
6036
 *
6037
 */
6038
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_gyro_any_motion(
6039
        u8 gyro_any_motion_u8);
6040
/*!
6041
 *  @brief This API used to read the gyro highrate interrupt mask
6042
 *  from page one register from 0x0F bit 3
6043
 *
6044
 *  @param gyro_highrate_u8 : The value of gyro highrate interrupt mask
6045
 *        gyro_highrate_u8 |  result
6046
 *     --------------------  |------------
6047
 *              0x01         | BNO055_BIT_ENABLE
6048
 *              0x00         | BNO055_BIT_DISABLE
6049
 *
6050
 *  @return results of bus communication function
6051
 *  @retval 0 -> BNO055_SUCCESS
6052
 *  @retval 1 -> BNO055_ERROR
6053
 *
6054
 *  @note While enabling the gyro highrate interrupt
6055
 *  configure the below settings by using
6056
 *  the following APIs
6057
 *
6058
 *  Axis :
6059
 *
6060
 *  bno055_set_gyro_highrate_axis_enable()
6061
 *
6062
 *  Filter :
6063
 *
6064
 *  bno055_set_gyro_highrate_filter()
6065
 *
6066
 *  Threshold :
6067
 *
6068
 *  bno055_get_gyro_highrate_x_thres()
6069
 *
6070
 *  bno055_get_gyro_highrate_y_thres()
6071
 *
6072
 *  bno055_get_gyro_highrate_z_thres()
6073
 *
6074
 *  Hysteresis :
6075
 *
6076
 *  bno055_set_gyro_highrate_x_hyst()
6077
 *
6078
 *  bno055_set_gyro_highrate_y_hyst()
6079
 *
6080
 *  bno055_set_gyro_highrate_z_hyst()
6081
 *
6082
 *  Duration :
6083
 *
6084
 *  bno055_set_gyro_highrate_x_durn()
6085
 *
6086
 *  bno055_set_gyro_highrate_y_durn()
6087
 *
6088
 *  bno055_set_gyro_highrate_z_durn()
6089
 *
6090
 */
6091
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_gyro_highrate(
6092
        u8 *gyro_highrate_u8);
6093
/*!
6094
 *  @brief This API used to write the gyro highrate interrupt mask
6095
 *  from page one register from 0x0F bit 3
6096
 *
6097
 *  @param gyro_highrate_u8 : The value of gyro highrate interrupt mask
6098
 *        gyro_highrate_u8 |  result
6099
 *     --------------------  |------------
6100
 *              0x01         | BNO055_BIT_ENABLE
6101
 *              0x00         | BNO055_BIT_DISABLE
6102
 *
6103
 *  @return results of bus communication function
6104
 *  @retval 0 -> BNO055_SUCCESS
6105
 *  @retval 1 -> BNO055_ERROR
6106
 *
6107
 *  @note While enabling the gyro highrate interrupt
6108
 *  configure the below settings by using
6109
 *  the following APIs
6110
 *
6111
 *  Axis :
6112
 *
6113
 *  bno055_set_gyro_highrate_axis_enable()
6114
 *
6115
 *  Filter :
6116
 *
6117
 *  bno055_set_gyro_highrate_filter()
6118
 *
6119
 *  Threshold :
6120
 *
6121
 *  bno055_get_gyro_highrate_x_thres()
6122
 *
6123
 *  bno055_get_gyro_highrate_y_thres()
6124
 *
6125
 *  bno055_get_gyro_highrate_z_thres()
6126
 *
6127
 *  Hysteresis :
6128
 *
6129
 *  bno055_set_gyro_highrate_x_hyst()
6130
 *
6131
 *  bno055_set_gyro_highrate_y_hyst()
6132
 *
6133
 *  bno055_set_gyro_highrate_z_hyst()
6134
 *
6135
 *  Duration :
6136
 *
6137
 *  bno055_set_gyro_highrate_x_durn()
6138
 *
6139
 *  bno055_set_gyro_highrate_y_durn()
6140
 *
6141
 *  bno055_set_gyro_highrate_z_durn()
6142
 *
6143
 */
6144
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_gyro_highrate(
6145
        u8 gyro_highrate_u8);
6146
/*****************************************************/
6147
/**\name APIs FOR ACCEL INTERRUPT MASK  */
6148
/*****************************************************/
6149
/*!
6150
 *  @brief This API used to read the accel highg interrupt mask
6151
 *  from page one register from 0x0F bit 5
6152
 *
6153
 *  @param accel_high_g_u8 : The value of accel highg interrupt mask
6154
 *         accel_high_g_u8 |   result
6155
 *     --------------------  |------------
6156
 *              0x01         | BNO055_BIT_ENABLE
6157
 *              0x00         | BNO055_BIT_DISABLE
6158
 *
6159
 *  @return results of bus communication function
6160
 *  @retval 0 -> BNO055_SUCCESS
6161
 *  @retval 1 -> BNO055_ERROR
6162
 *
6163
 *  @note While enabling the accel highg interrupt
6164
 *  configure the below settings by using
6165
 *  the following APIs
6166
 *
6167
 *  Axis :
6168
 *
6169
 *  bno055_set_accel_high_g_axis_enable()
6170
 *
6171
 *  Threshold :
6172
 *
6173
 *  bno055_set_accel_high_g_thres()
6174
 *
6175
 *  Duration :
6176
 *
6177
 *  bno055_set_accel_high_g_durn()
6178
 *
6179
 */
6180
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_high_g(
6181
        u8 *accel_high_g_u8);
6182
/*!
6183
 *  @brief This API used to write the accel highg interrupt mask
6184
 *  from page one register from 0x0F bit 5
6185
 *
6186
 *  @param accel_high_g_u8 : The value of accel highg interrupt mask
6187
 *         accel_high_g_u8 |   result
6188
 *     --------------------  |------------
6189
 *              0x01         | BNO055_BIT_ENABLE
6190
 *              0x00         | BNO055_BIT_DISABLE
6191
 *
6192
 *  @return results of bus communication function
6193
 *  @retval 0 -> BNO055_SUCCESS
6194
 *  @retval 1 -> BNO055_ERROR
6195
 *
6196
 *  @note While enabling the accel highg interrupt
6197
 *  configure the below settings by using
6198
 *  the following APIs
6199
 *
6200
 *  Axis :
6201
 *
6202
 *  bno055_set_accel_high_g_axis_enable()
6203
 *
6204
 *  Threshold :
6205
 *
6206
 *  bno055_set_accel_high_g_thres()
6207
 *
6208
 *  Duration :
6209
 *
6210
 *  bno055_set_accel_high_g_durn()
6211
 *
6212
 */
6213
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_high_g(
6214
        u8 accel_high_g_u8);
6215
/*!
6216
 *  @brief This API used to read the accel anymotion interrupt mask
6217
 *  from page one register from 0x0F bit 6
6218
 *
6219
 *  @param accel_any_motion_u8 : The value of accel anymotion interrupt mask
6220
 *     accel_any_motion_u8 | result
6221
 *     --------------------  |------------
6222
 *              0x01         | BNO055_BIT_ENABLE
6223
 *              0x00         | BNO055_BIT_DISABLE
6224
 *
6225
 *  @return results of bus communication function
6226
 *  @retval 0 -> BNO055_SUCCESS
6227
 *  @retval 1 -> BNO055_ERROR
6228
 *
6229
 *  @note While enabling the accel highg interrupt
6230
 *  configure the below settings by using
6231
 *  the following APIs
6232
 *
6233
 *  Axis :
6234
 *
6235
 *  bno055_set_accel_high_g_axis_enable()
6236
 *
6237
 *  Threshold :
6238
 *
6239
 *  bno055_set_accel_high_g_thres()
6240
 *
6241
 *  Duration :
6242
 *
6243
 *  bno055_set_accel_high_g_durn()
6244
 *
6245
 */
6246
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_any_motion(
6247
        u8 *accel_any_motion_u8);
6248
/*!
6249
 *  @brief This API used to write the accel anymotion interrupt mask
6250
 *  from page one register from 0x0F bit 6
6251
 *
6252
 *  @param accel_any_motion_u8 : The value of accel anymotion interrupt mask
6253
 *     accel_any_motion_u8 | result
6254
 *     --------------------  |------------
6255
 *              0x01         | BNO055_BIT_ENABLE
6256
 *              0x00         | BNO055_BIT_DISABLE
6257
 *
6258
 *  @return results of bus communication function
6259
 *  @retval 0 -> BNO055_SUCCESS
6260
 *  @retval 1 -> BNO055_ERROR
6261
 *
6262
 *  @note While enabling the accel anymotion interrupt
6263
 *  configure the following settings
6264
 *
6265
 *  Axis:
6266
 *
6267
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6268
 *
6269
 *  Duration:
6270
 *
6271
 *  bno055_set_accel_any_motion_durn()
6272
 *
6273
 * Threshold:
6274
 *
6275
 *  bno055_set_accel_any_motion_thres()
6276
 *
6277
 */
6278
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_any_motion(
6279
        u8 accel_any_motion_u8);
6280
/*!
6281
 *  @brief This API used to read the accel nomotion interrupt mask
6282
 *  from page one register from 0x0F bit 7
6283
 *
6284
 *  @param accel_nomotion_u8 : The value of accel nomotion interrupt mask
6285
 *     accel_nomotion_u8   | result
6286
 *     --------------------  |------------
6287
 *              0x01         | BNO055_BIT_ENABLE
6288
 *              0x00         | BNO055_BIT_DISABLE
6289
 *
6290
 *  @return results of bus communication function
6291
 *  @retval 0 -> BNO055_SUCCESS
6292
 *
6293
 *  @note While enabling the accel anymotion interrupt
6294
 *  configure the following settings
6295
 *
6296
 *  Axis:
6297
 *
6298
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6299
 *
6300
 *  Duration:
6301
 *
6302
 *  bno055_set_accel_any_motion_durn()
6303
 *
6304
 * Threshold:
6305
 *
6306
 *  bno055_set_accel_any_motion_thres())
6307
 *
6308
 */
6309
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_mask_accel_no_motion(
6310
        u8 *accel_nomotion_u8);
6311
/*!
6312
 *  @brief This API used to write the accel nomotion interrupt mask
6313
 *  from page one register from 0x0F bit 7
6314
 *
6315
 *  @param accel_nomotion_u8 : The value of accel nomotion interrupt mask
6316
 *     accel_nomotion_u8   | result
6317
 *     --------------------  |------------
6318
 *              0x01         | BNO055_BIT_ENABLE
6319
 *              0x00         | BNO055_BIT_DISABLE
6320
 *
6321
 *  @return results of bus communication function
6322
 *  @retval 0 -> BNO055_SUCCESS
6323
 *  @retval 1 -> BNO055_ERROR
6324
 *
6325
 *  @note While enabling the accel nomotion interrupt
6326
 *  configure the following settings
6327
 *
6328
 *  Axis:
6329
 *
6330
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6331
 *
6332
 *  Threshold :
6333
 *
6334
 *  bno055_set_accel_slow_no_motion_thres()
6335
 *
6336
 *  Duration :
6337
 *
6338
 *  bno055_set_accel_slow_no_motion_durn()
6339
 *
6340
 *  Slow/no motion enable:
6341
 *
6342
 *  bno055_set_accel_slow_no_motion_enable()
6343
 *
6344
 */
6345
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_mask_accel_no_motion(
6346
        u8 accel_nomotion_u8);
6347
/*****************************************************/
6348
/**\name FUNCTIONS FOR GYRO INTERRUPT */
6349
/*****************************************************/
6350
/*!
6351
 *  @brief This API used to read the gyro anymotion interrupt
6352
 *  from page one register from 0x10 bit 2
6353
 *
6354
 *  @param gyro_any_motion_u8 : The value of gyro anymotion interrupt
6355
 *      gyro_any_motion_u8 | result
6356
 *     --------------------  |------------
6357
 *              0x01         | BNO055_BIT_ENABLE
6358
 *              0x00         | BNO055_BIT_DISABLE
6359
 *
6360
 *  @return results of bus communication function
6361
 *  @retval 0 -> BNO055_SUCCESS
6362
 *  @retval 1 -> BNO055_ERROR
6363
 *
6364
 *  @note While enabling the gyro anymotion interrupt
6365
 *  configure the following settings
6366
 *
6367
 *  Axis:
6368
 *  bno055_set_gyro_any_motion_axis_enable()
6369
 *
6370
 *  Filter setting:
6371
 *  bno055_set_gyro_any_motion_filter()
6372
 *
6373
 *  Threshold :
6374
 *
6375
 *  bno055_set_gyro_any_motion_thres()
6376
 *
6377
 *  Slope samples :
6378
 *
6379
 *  bno055_set_gyro_any_motion_slope_samples()
6380
 *
6381
 *  Awake duration :
6382
 *
6383
 *  bno055_set_gyro_any_motion_awake_durn()
6384
 */
6385
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_gyro_any_motion(
6386
        u8 *gyro_any_motion_u8);
6387
/*!
6388
 *  @brief This API used to write the gyro anymotion interrupt
6389
 *  from page one register from 0x10 bit 2
6390
 *
6391
 *  @param gyro_any_motion_u8 : The value of gyro anymotion interrupt
6392
 *    gyro_any_motion_u8   | result
6393
 *     --------------------  |------------
6394
 *              0x01         | BNO055_BIT_ENABLE
6395
 *              0x00         | BNO055_BIT_DISABLE
6396
 *
6397
 *  @return results of bus communication function
6398
 *  @retval 0 -> BNO055_SUCCESS
6399
 *  @retval 1 -> BNO055_ERROR
6400
 *
6401
 *  @note While enabling the gyro anymotion interrupt
6402
 *  configure the following settings
6403
 *
6404
 *  Axis:
6405
 *  bno055_set_gyro_any_motion_axis_enable()
6406
 *
6407
 *  Filter setting:
6408
 *  bno055_set_gyro_any_motion_filter()
6409
 *
6410
 *  Threshold :
6411
 *
6412
 *  bno055_set_gyro_any_motion_thres()
6413
 *
6414
 *  Slope samples :
6415
 *
6416
 *  bno055_set_gyro_any_motion_slope_samples()
6417
 *
6418
 *  Awake duration :
6419
 *
6420
 *  bno055_set_gyro_any_motion_awake_durn()
6421
 */
6422
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_gyro_any_motion(
6423
        u8 gyro_any_motion_u8);
6424
/*!
6425
 *  @brief This API used to read the gyro highrate interrupt
6426
 *  from page one register from 0x10 bit 3
6427
 *
6428
 *  @param gyro_highrate_u8 : The value of gyro highrate interrupt
6429
 *      gyro_highrate_u8   | result
6430
 *     --------------------  |------------
6431
 *              0x01         | BNO055_BIT_ENABLE
6432
 *              0x00         | BNO055_BIT_DISABLE
6433
 *
6434
 *  @return results of bus communication function
6435
 *  @retval 0 -> BNO055_SUCCESS
6436
 *  @retval 1 -> BNO055_ERROR
6437
 *
6438
 *  @note While enabling the gyro highrate interrupt
6439
 *  configure the below settings by using
6440
 *  the following APIs
6441
 *
6442
 *  Axis :
6443
 *
6444
 *  bno055_set_gyro_highrate_axis_enable()
6445
 *
6446
 *  Filter :
6447
 *
6448
 *  bno055_set_gyro_highrate_filter()
6449
 *
6450
 *  Threshold :
6451
 *
6452
 *  bno055_get_gyro_highrate_x_thres()
6453
 *
6454
 *  bno055_get_gyro_highrate_y_thres()
6455
 *
6456
 *  bno055_get_gyro_highrate_z_thres()
6457
 *
6458
 *  Hysteresis :
6459
 *
6460
 *  bno055_set_gyro_highrate_x_hyst()
6461
 *
6462
 *  bno055_set_gyro_highrate_y_hyst()
6463
 *
6464
 *  bno055_set_gyro_highrate_z_hyst()
6465
 *
6466
 *  Duration :
6467
 *
6468
 *  bno055_set_gyro_highrate_x_durn()
6469
 *
6470
 *  bno055_set_gyro_highrate_y_durn()
6471
 *
6472
 *  bno055_set_gyro_highrate_z_durn()
6473
 *
6474
 */
6475
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_gyro_highrate(u8 *gyro_highrate_u8);
6476
/*!
6477
 *  @brief This API used to write the gyro highrate interrupt
6478
 *  from page one register from 0x10 bit 3
6479
 *
6480
 *  @param gyro_highrate_u8 : The value of gyro highrate interrupt
6481
 *      gyro_highrate_u8   | result
6482
 *     --------------------  |------------
6483
 *              0x01         | BNO055_BIT_ENABLE
6484
 *              0x00         | BNO055_BIT_DISABLE
6485
 *
6486
 *  @return results of bus communication function
6487
 *  @retval 0 -> BNO055_SUCCESS
6488
 *  @retval 1 -> BNO055_ERROR
6489
 *
6490
 *  @note While enabling the gyro highrate interrupt
6491
 *  configure the below settings by using
6492
 *  the following APIs
6493
 *
6494
 *  Axis :
6495
 *
6496
 *  bno055_set_gyro_highrate_axis_enable()
6497
 *
6498
 *  Filter :
6499
 *
6500
 *  bno055_set_gyro_highrate_filter()
6501
 *
6502
 *  Threshold :
6503
 *
6504
 *  bno055_get_gyro_highrate_x_thres()
6505
 *
6506
 *  bno055_get_gyro_highrate_y_thres()
6507
 *
6508
 *  bno055_get_gyro_highrate_z_thres()
6509
 *
6510
 *  Hysteresis :
6511
 *
6512
 *  bno055_set_gyro_highrate_x_hyst()
6513
 *
6514
 *  bno055_set_gyro_highrate_y_hyst()
6515
 *
6516
 *  bno055_set_gyro_highrate_z_hyst()
6517
 *
6518
 *  Duration :
6519
 *
6520
 *  bno055_set_gyro_highrate_x_durn()
6521
 *
6522
 *  bno055_set_gyro_highrate_y_durn()
6523
 *
6524
 *  bno055_set_gyro_highrate_z_durn()
6525
 *
6526
 */
6527
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_gyro_highrate(u8 gyro_highrate_u8);
6528
/*****************************************************/
6529
/**\name FUNCTIONS FOR ACCEL INTERRUPT  */
6530
/*****************************************************/
6531
/*!
6532
 *  @brief This API used to read the accel highg interrupt
6533
 *  from page one register from 0x10 bit 5
6534
 *
6535
 *  @param accel_high_g_u8 : The value of accel highg interrupt
6536
 *      accel_high_g_u8    | result
6537
 *     --------------------  |------------
6538
 *              0x01         | BNO055_BIT_ENABLE
6539
 *              0x00         | BNO055_BIT_DISABLE
6540
 *
6541
 *  @return results of bus communication function
6542
 *  @retval 0 -> BNO055_SUCCESS
6543
 *  @retval 1 -> BNO055_ERROR
6544
 *
6545
 *  @note While enabling the accel highg interrupt
6546
 *  configure the below settings by using
6547
 *  the following APIs
6548
 *
6549
 *  Axis :
6550
 *
6551
 *  bno055_set_accel_high_g_axis_enable()
6552
 *
6553
 *  Threshold :
6554
 *
6555
 *  bno055_set_accel_high_g_thres()
6556
 *
6557
 *  Duration :
6558
 *
6559
 *  bno055_set_accel_high_g_durn()
6560
 *
6561
 */
6562
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_high_g(u8 *accel_high_g_u8);
6563
/*!
6564
 *  @brief This API used to write the accel highg interrupt
6565
 *  from page one register from 0x10 bit 5
6566
 *
6567
 *  @param accel_high_g_u8 : The value of accel highg interrupt
6568
 *      accel_high_g_u8    | result
6569
 *     --------------------  |------------
6570
 *              0x01         | BNO055_BIT_ENABLE
6571
 *              0x00         | BNO055_BIT_DISABLE
6572
 *
6573
 *  @return results of bus communication function
6574
 *  @retval 0 -> BNO055_SUCCESS
6575
 *  @retval 1 -> BNO055_ERROR
6576
 *
6577
 *  @note While enabling the accel highg interrupt
6578
 *  configure the below settings by using
6579
 *  the following APIs
6580
 *
6581
 *  Axis :
6582
 *
6583
 *  bno055_set_accel_high_g_axis_enable()
6584
 *
6585
 *  Threshold :
6586
 *
6587
 *  bno055_set_accel_high_g_thres()
6588
 *
6589
 *  Duration :
6590
 *
6591
 *  bno055_set_accel_high_g_durn()
6592
 *
6593
 */
6594
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_high_g(u8 accel_high_g_u8);
6595
/*!
6596
 *  @brief This API used to read the accel anymotion interrupt
6597
 *  from page one register from 0x10 bit 6
6598
 *
6599
 *  @param accel_any_motion_u8 : The value of accel anymotion interrupt
6600
 *  accel_any_motion_u8    | result
6601
 *     --------------------  |------------
6602
 *              0x01         | BNO055_BIT_ENABLE
6603
 *              0x00         | BNO055_BIT_DISABLE
6604
 *
6605
 *  @return results of bus communication function
6606
 *  @retval 0 -> BNO055_SUCCESS
6607
 *  @retval 1 -> BNO055_ERROR
6608
 *
6609
 *  @note While enabling the accel anymotion interrupt
6610
 *  configure the following settings
6611
 *
6612
 *  Axis:
6613
 *
6614
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6615
 *
6616
 *  Duration:
6617
 *
6618
 *  bno055_set_accel_any_motion_durn()
6619
 *
6620
 * Threshold:
6621
 *
6622
 *  bno055_set_accel_any_motion_thres()
6623
 *
6624
 */
6625
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_any_motion(
6626
        u8 *accel_any_motion_u8);
6627
/*!
6628
 *  @brief This API used to write the accel anymotion interrupt
6629
 *  from page one register from 0x10 bit 6
6630
 *
6631
 *  @param accel_any_motion_u8 : The value of accel anymotion interrupt
6632
 *  accel_any_motion_u8    | result
6633
 *     --------------------  |------------
6634
 *              0x01         | BNO055_BIT_ENABLE
6635
 *              0x00         | BNO055_BIT_DISABLE
6636
 *
6637
 *  @return results of bus communication function
6638
 *  @retval 0 -> BNO055_SUCCESS
6639
 *  @retval 1 -> BNO055_ERROR
6640
 *
6641
 *  @note While enabling the accel anymotion interrupt
6642
 *  configure the following settings
6643
 *
6644
 *  Axis:
6645
 *
6646
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6647
 *
6648
 *  Duration:
6649
 *
6650
 *  bno055_set_accel_any_motion_durn()
6651
 *
6652
 *  Threshold:
6653
 *
6654
 *  bno055_set_accel_any_motion_thres()
6655
 *
6656
 */
6657
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_any_motion(
6658
        u8 accel_any_motion_u8);
6659
/*!
6660
 *  @brief This API used to read the accel nomotion interrupt
6661
 *  from page one register from 0x10 bit 6
6662
 *
6663
 *  @param accel_nomotion_u8 : The value of accel nomotion interrupt
6664
 *    accel_nomotion_u8    | result
6665
 *     --------------------  |------------
6666
 *              0x01         | BNO055_BIT_ENABLE
6667
 *              0x00         | BNO055_BIT_DISABLE
6668
 *
6669
 *  @return results of bus communication function
6670
 *  @retval 0 -> BNO055_SUCCESS
6671
 *  @retval 1 -> BNO055_ERROR
6672
 *
6673
 *  @note While enabling the accel nomotion interrupt
6674
 *  configure the following settings
6675
 *
6676
 *  Axis:
6677
 *
6678
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6679
 *
6680
 *  Threshold :
6681
 *
6682
 *  bno055_set_accel_slow_no_motion_thres()
6683
 *
6684
 *  Duration :
6685
 *
6686
 *  bno055_set_accel_slow_no_motion_durn()
6687
 *
6688
 *  Slow/no motion enable:
6689
 *
6690
 *  bno055_set_accel_slow_no_motion_enable()
6691
 *
6692
 */
6693
BNO055_RETURN_FUNCTION_TYPE bno055_get_intr_accel_no_motion(
6694
        u8 *accel_nomotion_u8);
6695
/*!
6696
 *  @brief This API used to write the accel nomotion interrupt
6697
 *  from page one register from 0x10 bit 6
6698
 *
6699
 *  @param accel_nomotion_u8 : The value of accel nomotion interrupt
6700
 *    accel_nomotion_u8    | result
6701
 *     --------------------  |------------
6702
 *              0x01         | BNO055_BIT_ENABLE
6703
 *              0x00         | BNO055_BIT_DISABLE
6704
 *
6705
 *  @return results of bus communication function
6706
 *  @retval 0 -> BNO055_SUCCESS
6707
 *  @retval 1 -> BNO055_ERROR
6708
 *
6709
 *  @note While enabling the accel nomotion interrupt
6710
 *  configure the following settings
6711
 *
6712
 *  Axis:
6713
 *
6714
 *  bno055_set_accel_any_motion_no_motion_axis_enable()
6715
 *
6716
 *  Threshold :
6717
 *
6718
 *  bno055_set_accel_slow_no_motion_thres()
6719
 *
6720
 *  Duration :
6721
 *
6722
 *  bno055_set_accel_slow_no_motion_durn()
6723
 *
6724
 *  Slow/no motion enable:
6725
 *
6726
 *  bno055_set_accel_slow_no_motion_enable()
6727
 *
6728
 */
6729
BNO055_RETURN_FUNCTION_TYPE bno055_set_intr_accel_no_motion(
6730
        u8 accel_nomotion_u8);
6731
/*****************************************************/
6732
/**\name FUNCTIONS FOR ACCEL ANY_MOTION THRESHOLD  */
6733
/*****************************************************/
6734
/*!
6735
 *  @brief This API used to read the accel any motion threshold
6736
 *  from page one register from 0x11 bit 0 to 7
6737
 *
6738
 *  @param accel_any_motion_thres_u8 : The value of any motion threshold
6739
 *  accel_any_motion_thres_u8 | result
6740
 *  ------------------------    | -------------
6741
 *              0x01            | BNO055_BIT_ENABLE
6742
 *              0x00            | BNO055_BIT_DISABLE
6743
 *
6744
 *  @return results of bus communication function
6745
 *  @retval 0 -> BNO055_SUCCESS
6746
 *  @retval 1 -> BNO055_ERROR
6747
 *
6748
 *  @note Accel anymotion threshold dependent on the
6749
 *  range values
6750
 *
6751
 *  accel_range_u8 |    threshold | LSB
6752
 * ------------- | ------------- | ---------
6753
 *     2g        |    3.19mg     |   1LSB
6754
 *     4g        |    7.81mg     |   1LSB
6755
 *     8g        |    15.63mg    |   1LSB
6756
 *     16g       |    31.25mg    |   1LSB
6757
 *
6758
 */
6759
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_thres(
6760
        u8 *accel_any_motion_thres_u8);
6761
/*!
6762
 *  @brief This API used to write the accel any motion threshold
6763
 *  from page one register from 0x11 bit 0 to 7
6764
 *
6765
 *  @param accel_any_motion_thres_u8 : The value of any motion threshold
6766
 *  accel_any_motion_thres_u8 | result
6767
 *  ------------------------    | -------------
6768
 *              0x01            | BNO055_BIT_ENABLE
6769
 *              0x00            | BNO055_BIT_DISABLE
6770
 *
6771
 *  @return results of bus communication function
6772
 *  @retval 0 -> BNO055_SUCCESS
6773
 *  @retval 1 -> BNO055_ERROR
6774
 *
6775
 *  @note Accel anymotion threshold dependent on the
6776
 *  range values
6777
 *
6778
 *  accel_range_u8   |  threshold    |  LSB
6779
 * ------------- | ------------- | ---------
6780
 *     2g        |    3.19mg     |   1LSB
6781
 *     4g        |    7.81mg     |   1LSB
6782
 *     8g        |    15.63mg    |   1LSB
6783
 *     16g       |    31.25mg    |   1LSB
6784
 *
6785
 */
6786
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_thres(
6787
        u8 accel_any_motion_thres_u8);
6788
/*****************************************************/
6789
/**\name FUNCTIONS FOR ACCEL ANY_MOTION DURATION  */
6790
/*****************************************************/
6791
/*!
6792
 *  @brief This API used to read the accel anymotion duration
6793
 *  from page one register from 0x12 bit 0 to 1
6794
 *
6795
 *  @param accel_any_motion_durn_u8 : The value of accel anymotion duration
6796
 * accel_any_motion_durn_u8  | result
6797
 *  -------------------------  | -------------
6798
 *              0x01           | BNO055_BIT_ENABLE
6799
 *              0x00           | BNO055_BIT_DISABLE
6800
 *
6801
 *  @return results of bus communication function
6802
 *  @retval 0 -> BNO055_SUCCESS
6803
 *  @retval 1 -> BNO055_ERROR
6804
 *
6805
 *
6806
 */
6807
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_durn(
6808
        u8 *accel_any_motion_durn_u8);
6809
/*!
6810
 *  @brief This API used to write the accel anymotion duration
6811
 *  from page one register from 0x12 bit 0 to 1
6812
 *
6813
 *  @param accel_any_motion_durn_u8 : The value of accel anymotion duration
6814
 *
6815
 * accel_any_motion_durn_u8  | result
6816
 *  -------------------------  | -------------
6817
 *              0x01           | BNO055_BIT_ENABLE
6818
 *              0x00           | BNO055_BIT_DISABLE
6819
 *
6820
 *  @return results of bus communication function
6821
 *  @retval 0 -> BNO055_SUCCESS
6822
 *  @retval 1 -> BNO055_ERROR
6823
 *
6824
 *
6825
 */
6826
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_durn(
6827
        u8 accel_any_motion_durn_u8);
6828
/*****************************************************/
6829
/**\name FUNCTIONS FOR ACCEL ANY_MOTION AXIS ENABLE  */
6830
/*****************************************************/
6831
/*!
6832
 *  @brief This API used to read the accel anymotion enable
6833
 *  from page one register from 0x12 bit 2 to 4
6834
 *
6835
 *  @param data_u8 : The value of accel anymotion enable
6836
 *     data_u8 | result
6837
 *  ------------ | -------------
6838
 *      0x01     | BNO055_BIT_ENABLE
6839
 *      0x00     | BNO055_BIT_DISABLE
6840
 *  @param channel_u8 : The value of accel anymotion axis selection
6841
 *           channel_u8                        | value
6842
 *     --------------------------                | ----------
6843
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS  |   0
6844
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS  |   1
6845
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS  |   2
6846
 *
6847
 *  @return results of bus communication function
6848
 *  @retval 0 -> BNO055_SUCCESS
6849
 *  @retval 1 -> BNO055_ERROR
6850
 *
6851
 *
6852
 */
6853
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_any_motion_no_motion_axis_enable(
6854
        u8 channel_u8, u8 *data_u8);
6855
/*!
6856
 *  @brief This API used to write the accel anymotion enable
6857
 *  from page one register from 0x12 bit 2 to 4
6858
 *
6859
 *  @param data_u8 : The value of accel anymotion enable
6860
 *     data_u8 | result
6861
 *  ------------ | -------------
6862
 *      0x01     | BNO055_BIT_ENABLE
6863
 *      0x00     | BNO055_BIT_DISABLE
6864
 *  @param channel_u8 : The value of accel anymotion axis selection
6865
 *           channel_u8                        | value
6866
 *     --------------------------                | ----------
6867
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_X_AXIS  |   0
6868
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS  |   1
6869
 *     BNO055_ACCEL_ANY_MOTION_NO_MOTION_Y_AXIS  |   2
6870
 *
6871
 *  @return results of bus communication function
6872
 *  @retval 0 -> BNO055_SUCCESS
6873
 *  @retval 1 -> BNO055_ERROR
6874
 *
6875
 *
6876
 */
6877
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_any_motion_no_motion_axis_enable(
6878
        u8 channel_u8, u8 data_u8);
6879
/*****************************************************/
6880
/**\name FUNCTIONS FOR ACCEL HIGHG AXIS ENABLE  */
6881
/*****************************************************/
6882
/*!
6883
 *  @brief This API used to read the accel highg enable
6884
 *  from page one register from 0x12 bit 5 to 7
6885
 *
6886
 *  @param data_u8 : The value of accel highg enable
6887
 *      data_u8| result
6888
 *  ------------ | -------------
6889
 *      0x01     | BNO055_BIT_ENABLE
6890
 *      0x00     | BNO055_BIT_DISABLE
6891
 *  @param channel_u8 : The value of accel highg axis selection
6892
 *               channel_u8     | value
6893
 *     -------------------------- | ----------
6894
 *     BNO055_ACCEL_HIGH_G_X_AXIS |   0
6895
 *     BNO055_ACCEL_HIGH_G_Y_AXIS |   1
6896
 *     BNO055_ACCEL_HIGH_G_Z_AXIS |   2
6897
 *
6898
 *  @return results of bus communication function
6899
 *  @retval 0 -> BNO055_SUCCESS
6900
 *  @retval 1 -> BNO055_ERROR
6901
 *
6902
 *
6903
 */
6904
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_axis_enable(u8 channel_u8,
6905
        u8 *data_u8);
6906
/*!
6907
 *  @brief This API used to write the accel highg enable
6908
 *  from page one register from 0x12 bit 5 to 7
6909
 *
6910
 *  @param data_u8 : The value of accel highg enable
6911
 *      data_u8| result
6912
 *  ------------ | -------------
6913
 *      0x01     | BNO055_BIT_ENABLE
6914
 *      0x00     | BNO055_BIT_DISABLE
6915
 *  @param channel_u8 : The value of accel highg axis selection
6916
 *               channel_u8     | value
6917
 *     -------------------------- | ----------
6918
 *     BNO055_ACCEL_HIGH_G_X_AXIS |   0
6919
 *     BNO055_ACCEL_HIGH_G_Y_AXIS |   1
6920
 *     BNO055_ACCEL_HIGH_G_Z_AXIS |   2
6921
 *
6922
 *  @return results of bus communication function
6923
 *  @retval 0 -> BNO055_SUCCESS
6924
 *  @retval 1 -> BNO055_ERROR
6925
 *
6926
 *
6927
 */
6928
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_axis_enable(u8 channel_u8,
6929
        u8 data_u8);
6930
/*****************************************************/
6931
/**\name FUNCTIONS FOR ACCEL HIGHG DURATION */
6932
/*****************************************************/
6933
/*!
6934
 *  @brief This API used to read the accel highg duration
6935
 *  from page one register from 0x13 bit 0 to 7
6936
 *
6937
 *  @param accel_high_g_durn_u8 : The value of accel highg duration
6938
 *
6939
 *  @return results of bus communication function
6940
 *  @retval 0 -> BNO055_SUCCESS
6941
 *  @retval 1 -> BNO055_ERROR
6942
 *
6943
 *  @note The high-g interrupt trigger delay according
6944
 *  to [highg duration + 1] * 2 ms
6945
 *
6946
 *  in a range from 2 ms to 512 ms
6947
 *
6948
 */
6949
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_durn(
6950
        u8 *accel_high_g_durn_u8);
6951
/*!
6952
 *  @brief This API used to write the accel highg duration
6953
 *  from page one register from 0x13 bit 0 to 7
6954
 *
6955
 *  @param accel_high_g_durn_u8 : The value of accel highg duration
6956
 *
6957
 *  @return results of bus communication function
6958
 *  @retval 0 -> BNO055_SUCCESS
6959
 *  @retval 1 -> BNO055_ERROR
6960
 *
6961
 *  @note The high-g interrupt trigger delay according
6962
 *  to [highg duration + 1] * 2 ms
6963
 *
6964
 *  in a range from 2 ms to 512 ms
6965
 *
6966
 */
6967
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_durn(
6968
        u8 accel_high_g_durn_u8);
6969
/*****************************************************/
6970
/**\name FUNCTIONS FOR ACCEL HIGHG THRESHOLD */
6971
/*****************************************************/
6972
/*!
6973
 *  @brief This API used to read the accel highg threshold
6974
 *  from page one register from 0x14 bit 0 to 7
6975
 *
6976
 *  @param accel_high_g_thres_u8 : The value of accel highg threshold
6977
 *
6978
 *  @return results of bus communication function
6979
 *  @retval 0 -> BNO055_SUCCESS
6980
 *  @retval 1 -> BNO055_ERROR
6981
 *
6982
 *  @note Accel highg interrupt threshold dependent
6983
 *  for accel g range
6984
 *
6985
 *  accel_range_u8   |  threshold    |  LSB
6986
 * ------------- | ------------- | ---------
6987
 *     2g        |    7.81mg     |   1LSB
6988
 *     4g        |    15.63mg    |   1LSB
6989
 *     8g        |    31.25mg    |   1LSB
6990
 *     16g       |    62.5mg     |   1LSB
6991
 *
6992
 */
6993
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_high_g_thres(
6994
        u8 *accel_high_g_thres_u8);
6995
/*!
6996
 *  @brief This API used to write the accel highg threshold
6997
 *  from page one register from 0x14 bit 0 to 7
6998
 *
6999
 *  @param accel_high_g_thres_u8 : The value of accel highg threshold
7000
 *
7001
 *  @return results of bus communication function
7002
 *  @retval 0 -> BNO055_SUCCESS
7003
 *  @retval 1 -> BNO055_ERROR
7004
 *
7005
 *  @note Accel highg interrupt threshold dependent
7006
 *  for accel g range
7007
 *
7008
 *  accel_range_u8   |  threshold    |  LSB
7009
 * ------------- | ------------- | ---------
7010
 *     2g        |    7.81mg     |   1LSB
7011
 *     4g        |    15.63mg    |   1LSB
7012
 *     8g        |    31.25mg    |   1LSB
7013
 *     16g       |    62.5mg     |   1LSB
7014
 *
7015
 */
7016
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_high_g_thres(
7017
        u8 accel_high_g_thres_u8);
7018
/**************************************************************/
7019
/**\name FUNCTIONS FOR ACCEL SLOWNOMOTION THRESHOLD */
7020
/**************************************************************/
7021
/*!
7022
 *  @brief This API used to read the accel slownomotion threshold
7023
 *  from page one register from 0x15 bit 0 to 7
7024
 *
7025
 *  @param accel_slow_no_motion_thres_u8 :
7026
 *  The value of accel slownomotion threshold
7027
 *
7028
 *  @return results of bus communication function
7029
 *  @retval 0 -> BNO055_SUCCESS
7030
 *  @retval 1 -> BNO055_ERROR
7031
 *
7032
 *  @note Accel slow no motion interrupt threshold dependent
7033
 *  for accel g range
7034
 *
7035
 *  accel_range_u8   |  threshold    |  LSB
7036
 * ------------- | ------------- | ---------
7037
 *     2g        |    3.19mg     |   1LSB
7038
 *     4g        |    7.81mg     |   1LSB
7039
 *     8g        |    15.63mg    |   1LSB
7040
 *     16g       |    31.25mg    |   1LSB
7041
 */
7042
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_thres(
7043
        u8 *accel_slow_no_motion_thres_u8);
7044
/*!
7045
 *  @brief This API used to write the accel slownomotion threshold
7046
 *  from page one register from 0x15 bit 0 to 7
7047
 *
7048
 *  @param accel_slow_no_motion_thres_u8 :
7049
 *  The value of accel slownomotion threshold
7050
 *
7051
 *  @return results of bus communication function
7052
 *  @retval 0 -> BNO055_SUCCESS
7053
 *  @retval 1 -> BNO055_ERROR
7054
 *
7055
 *  @note Accel slow no motion interrupt threshold dependent
7056
 *  for accel g range
7057
 *
7058
 *  accel_range_u8   |  threshold    |  LSB
7059
 * ------------- | ------------- | ---------
7060
 *     2g        |    3.19mg     |   1LSB
7061
 *     4g        |    7.81mg     |   1LSB
7062
 *     8g        |    15.63mg    |   1LSB
7063
 *     16g       |    31.25mg    |   1LSB
7064
 */
7065
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_thres(
7066
        u8 accel_slow_no_motion_thres_u8);
7067
/**************************************************************/
7068
/**\name FUNCTIONS FOR ACCEL SLOWNOMOTION ENABLE */
7069
/**************************************************************/
7070
/*!
7071
 *  @brief This API used to read accel slownomotion enable
7072
 *  from page one register from 0x16 bit 0
7073
 *
7074
 *  @param accel_slow_no_motion_en_u8 : The value of accel slownomotion enable
7075
 *    accel_slow_no_motion_en_u8   | result
7076
 *     ------------------------      | --------
7077
 *              0x01                 | Slow motion
7078
 *              0x00                 | No motion
7079
 *
7080
 *  @return results of bus communication function
7081
 *  @retval 0 -> BNO055_SUCCESS
7082
 *  @retval 1 -> BNO055_ERROR
7083
 *
7084
 */
7085
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_enable(
7086
        u8 *accel_slow_no_motion_en_u8);
7087
/*!
7088
 *  @brief This API used to write accel slownomotion enable
7089
 *  from page one register from 0x16 bit 0
7090
 *
7091
 *  @param accel_slow_no_motion_en_u8 : The value of accel slownomotion enable
7092
 *    accel_slow_no_motion_en_u8   | result
7093
 *     ------------------------      | --------
7094
 *              0x01                 | Slow motion
7095
 *              0x00                 | No motion
7096
 *
7097
 *  @return results of bus communication function
7098
 *  @retval 0 -> BNO055_SUCCESS
7099
 *  @retval 1 -> BNO055_ERROR
7100
 *
7101
 */
7102
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_enable(
7103
        u8 accel_slow_no_motion_en_u8);
7104
/**************************************************************/
7105
/**\name FUNCTIONS FOR ACCEL SLOWNOMOTION DURATION */
7106
/**************************************************************/
7107
/*!
7108
 *  @brief This API used to read accel slownomotion duration
7109
 *  from page one register from 0x16 bit 1 to 6
7110
 *
7111
 *  @param accel_slow_no_motion_durn_u8 :
7112
 *  The value of accel slownomotion duration
7113
 *
7114
 *  @return results of bus communication function
7115
 *  @retval 0 -> BNO055_SUCCESS
7116
 *  @retval 1 -> BNO055_ERROR
7117
 *
7118
 */
7119
BNO055_RETURN_FUNCTION_TYPE bno055_get_accel_slow_no_motion_durn(
7120
        u8 *accel_slow_no_motion_durn_u8);
7121
/*!
7122
 *  @brief This API used to write accel slownomotion duration
7123
 *  from page one register from 0x16 bit 1 to 6
7124
 *
7125
 *  @param accel_slow_no_motion_durn_u8 :
7126
 *  The value of accel slownomotion duration
7127
 *
7128
 *  @return results of bus communication function
7129
 *  @retval 0 -> BNO055_SUCCESS
7130
 *  @retval 1 -> BNO055_ERROR
7131
 *
7132
 */
7133
BNO055_RETURN_FUNCTION_TYPE bno055_set_accel_slow_no_motion_durn(
7134
        u8 accel_slow_no_motion_durn_u8);
7135
/**************************************************************/
7136
/**\name FUNCTIONS FOR GYRO ANY_MOTION AXIS ENABLE */
7137
/**************************************************************/
7138
/*!
7139
 *  @brief This API used to read the gyro anymotion enable
7140
 *  from page one register from 0x17 bit 0 to 2
7141
 *
7142
 *  @param data_u8 : The value of gyro anymotion enable
7143
 *      data_u8     | result
7144
 *  ----------------- |-------------
7145
 *      0x01          | BNO055_BIT_ENABLE
7146
 *      0x00          | BNO055_BIT_DISABLE
7147
 *  @param channel_u8 : The value of gyro anymotion axis selection
7148
 *               channel_u8         | value
7149
 *     ---------------------------    | ----------
7150
 *     BNO055_GYRO_ANY_MOTIONX_AXIS   |   0
7151
 *     BNO055_GYRO_ANY_MOTIONY_AXIS   |   1
7152
 *     BNO055_GYRO_ANY_MOTIONZ_AXIS   |   2
7153
 *
7154
 *
7155
 *  @return results of bus communication function
7156
 *  @retval 0 -> BNO055_SUCCESS
7157
 *  @retval 1 -> BNO055_ERROR
7158
 *
7159
 *
7160
 */
7161
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_axis_enable(
7162
        u8 channel_u8, u8 *data_u8);
7163
/*!
7164
 *  @brief This API used to write the gyro anymotion enable
7165
 *  from page one register from 0x17 bit 0 to 2
7166
 *
7167
 *  @param data_u8 : The value of gyro anymotion enable
7168
 *      data_u8     | result
7169
 *  ----------------- |-------------
7170
 *      0x01          | BNO055_BIT_ENABLE
7171
 *      0x00          | BNO055_BIT_DISABLE
7172
 *  @param channel_u8 : The value of gyro anymotion axis selection
7173
 *               channel_u8         | value
7174
 *     ---------------------------    | ----------
7175
 *     BNO055_GYRO_ANY_MOTIONX_AXIS   |   0
7176
 *     BNO055_GYRO_ANY_MOTIONY_AXIS   |   1
7177
 *     BNO055_GYRO_ANY_MOTIONZ_AXIS   |   2
7178
 *
7179
 *  @return results of bus communication function
7180
 *  @retval 0 -> BNO055_SUCCESS
7181
 *  @retval 1 -> BNO055_ERROR
7182
 *
7183
 *
7184
 */
7185
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_axis_enable(
7186
        u8 channel_u8, u8 data_u8);
7187
/**************************************************************/
7188
/**\name FUNCTIONS FOR GYRO HIGHRATE ENABLE */
7189
/**************************************************************/
7190
/*!
7191
 *  @brief This API used to read the gyro highrate enable
7192
 *  from page one register from 0x17 bit 3 to 5
7193
 *
7194
 *  @param data_u8 : The value of gyro highrate enable
7195
 *      data_u8     | result
7196
 *  ----------------  |-------------
7197
 *      0x01          | BNO055_BIT_ENABLE
7198
 *      0x00          | BNO055_BIT_DISABLE
7199
 *  @param channel_u8 : The value of gyro highrate axis selection
7200
 *               channel_u8         | value
7201
 *     ------------------------       | ----------
7202
 *     BNO055_GYRO_HIGHRATE_X_AXIS    |   0
7203
 *     BNO055_GYRO_HIGHRATE_Y_AXIS    |   1
7204
 *     BNO055_GYRO_HIGHRATE_Z_AXIS    |   2
7205
 *
7206
 *
7207
 *  @return results of bus communication function
7208
 *  @retval 0 -> BNO055_SUCCESS
7209
 *  @retval 1 -> BNO055_ERROR
7210
 *
7211
 *
7212
 */
7213
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_axis_enable(u8 channel_u8,
7214
        u8 *data_u8);
7215
/**************************************************************/
7216
/**\name FUNCTIONS FOR GYRO HIGHRATE AXIS ENABLE */
7217
/**************************************************************/
7218
/*!
7219
 *  @brief This API used to write the gyro highrate enable
7220
 *  from page one register from 0x17 bit 3 to 5
7221
 *
7222
 *  @param data_u8 : The value of gyro highrate enable
7223
 *      data_u8     | result
7224
 *  ----------------  |-------------
7225
 *      0x01          | BNO055_BIT_ENABLE
7226
 *      0x00          | BNO055_BIT_DISABLE
7227
 *  @param channel_u8 : The value of gyro highrate axis selection
7228
 *               channel_u8         | value
7229
 *     ------------------------       | ----------
7230
 *     BNO055_GYRO_HIGHRATE_X_AXIS    |   0
7231
 *     BNO055_GYRO_HIGHRATE_Y_AXIS    |   1
7232
 *     BNO055_GYRO_HIGHRATE_Z_AXIS    |   2
7233
 *
7234
 *  @return results of bus communication function
7235
 *  @retval 0 -> BNO055_SUCCESS
7236
 *  @retval 1 -> BNO055_ERROR
7237
 *
7238
 *
7239
 */
7240
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_axis_enable(u8 channel_u8,
7241
        u8 data_u8);
7242
/**************************************************************/
7243
/**\name FUNCTIONS FOR GYRO ANY_MOTION FILTER */
7244
/**************************************************************/
7245
/*!
7246
 *  @brief This API used to read gyro anymotion filter
7247
 *  from page one register from 0x17 bit 6
7248
 *
7249
 *  @param gyro_any_motion_filter_u8 : The value of gyro anymotion filter
7250
 *   gyro_any_motion_filter_u8  | result
7251
 *  ---------------------------   |------------
7252
 *      0x00                      | BNO055_GYRO_FILTERED_CONFIG
7253
 *      0x01                      | BNO055_GYRO_UNFILTERED_CONFIG
7254
 *
7255
 *  @return results of bus communication function
7256
 *  @retval 0 -> BNO055_SUCCESS
7257
 *  @retval 1 -> BNO055_ERROR
7258
 *
7259
 */
7260
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_filter(
7261
        u8 *gyro_any_motion_filter_u8);
7262
/*!
7263
 *  @brief This API used to write gyro anymotion filter
7264
 *  from page one register from 0x17 bit 6
7265
 *
7266
 *  @param gyro_any_motion_filter_u8 : The value of gyro anymotion filter
7267
 *   gyro_any_motion_filter_u8  | result
7268
 *  ---------------------------   |------------
7269
 *      0x00                      | BNO055_GYRO_FILTERED_CONFIG
7270
 *      0x01                      | BNO055_GYRO_UNFILTERED_CONFIG
7271
 *
7272
 *  @return results of bus communication function
7273
 *  @retval 0 -> BNO055_SUCCESS
7274
 *  @retval 1 -> BNO055_ERROR
7275
 *
7276
 */
7277
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_filter(
7278
        u8 gyro_any_motion_filter_u8);
7279
/**************************************************************/
7280
/**\name FUNCTIONS FOR GYRO HIGHRATE FILTER */
7281
/**************************************************************/
7282
/*!
7283
 *  @brief This API used to read gyro highrate filter
7284
 *  from page one register from 0x17 bit 7
7285
 *
7286
 *  @param gyro_highrate_filter_u8 : The value of gyro highrate filter
7287
 *   gyro_highrate_filter_u8  | result
7288
 *  --------------------------- |------------
7289
 *         0x00                 | BNO055_GYRO_FILTERED_CONFIG
7290
 *         0x01                 | BNO055_GYRO_UNFILTERED_CONFIG
7291
 *
7292
 *  @return results of bus communication function
7293
 *  @retval 0 -> BNO055_SUCCESS
7294
 *  @retval 1 -> BNO055_ERROR
7295
 *
7296
 */
7297
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_filter(
7298
        u8 *gyro_highrate_filter_u8);
7299
/*!
7300
 *  @brief This API used to write gyro highrate filter
7301
 *  from page one register from 0x17 bit 7
7302
 *
7303
 *  @param gyro_highrate_filter_u8 : The value of gyro highrate filter
7304
 *   gyro_highrate_filter_u8  | result
7305
 *  --------------------------- |------------
7306
 *         0x00                 | BNO055_GYRO_FILTERED_CONFIG
7307
 *         0x01                 | BNO055_GYRO_UNFILTERED_CONFIG
7308
 *
7309
 *  @return results of bus communication function
7310
 *  @retval 0 -> BNO055_SUCCESS
7311
 *  @retval 1 -> BNO055_ERROR
7312
 *
7313
 */
7314
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_filter(
7315
        u8 gyro_highrate_filter_u8);
7316
/**************************************************************/
7317
/**\name FUNCTIONS FOR GYRO HIGHRATE X THRESHOLD */
7318
/**************************************************************/
7319
/*!
7320
 *  @brief This API used to read gyro highrate x threshold
7321
 *  from page one register from 0x18 bit 0 to 4
7322
 *
7323
 *  @param gyro_highrate_x_thres_u8 : The value of gyro x highrate threshold
7324
 *
7325
 *  @return results of bus communication function
7326
 *  @retval 0 -> BNO055_SUCCESS
7327
 *  @retval 1 -> BNO055_ERROR
7328
 *
7329
 *  @note Gyro highrate threshold dependent on the
7330
 *  selection of gyro range
7331
 *
7332
 *  gyro_range_u8     | threshold       |     LSB
7333
 * -----------------  | -------------   | ---------
7334
 *     2000           |    62.5dps      |   1LSB
7335
 *     1000           |    31.25dps     |   1LSB
7336
 *     500            |    15.625dps    |   1LSB
7337
 *     125            |    7.8125dps    |   1LSB
7338
 *
7339
 */
7340
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_thres(
7341
        u8 *gyro_highrate_x_thres_u8);
7342
/*!
7343
 *  @brief This API used to write gyro highrate x threshold
7344
 *  from page one register from 0x18 bit 0 to 4
7345
 *
7346
 *  @param gyro_highrate_x_thres_u8 : The value of gyro x highrate threshold
7347
 *
7348
 *  @return results of bus communication function
7349
 *  @retval 0 -> BNO055_SUCCESS
7350
 *  @retval 1 -> BNO055_ERROR
7351
 *
7352
 *  @note Gyro highrate threshold dependent on the
7353
 *  selection of gyro range
7354
 *
7355
 *  gyro_range_u8     | threshold       |     LSB
7356
 * -----------------  | -------------   | ---------
7357
 *     2000           |    62.5dps      |   1LSB
7358
 *     1000           |    31.25dps     |   1LSB
7359
 *     500            |    15.625dps    |   1LSB
7360
 *     125            |    7.8125dps    |   1LSB
7361
 *
7362
 */
7363
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_thres(
7364
        u8 gyro_highrate_x_thres_u8);
7365
/**************************************************************/
7366
/**\name FUNCTIONS FOR GYRO HIGHRATE X HYSTERESIS */
7367
/**************************************************************/
7368
/*!
7369
 *  @brief This API used to read gyro highrate x hysteresis
7370
 *  from page one register from 0x18 bit 5 to 6
7371
 *
7372
 *  @param gyro_highrate_x_hyst_u8 : The value of gyro highrate x hysteresis
7373
 *
7374
 *  @return results of bus communication function
7375
 *  @retval 0 -> BNO055_SUCCESS
7376
 *  @retval 1 -> BNO055_ERROR
7377
 *
7378
 *  @note Gyro high rate hysteresis calculated by
7379
 *
7380
 *  using this (255 + 256 * gyro_highrate_x_hyst_u8) *4 LSB
7381
 *
7382
 *  The high rate value scales with the range setting
7383
 *
7384
 *  gyro_range_u8     | hysteresis      |     LSB
7385
 * -----------------  | -------------   | ---------
7386
 *     2000           |    62.26dps     |   1LSB
7387
 *     1000           |    31.13dps     |   1LSB
7388
 *     500            |    15.56dps     |   1LSB
7389
 *
7390
 */
7391
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_hyst(
7392
        u8 *gyro_highrate_x_hyst_u8);
7393
/*!
7394
 *  @brief This API used to write gyro highrate x hysteresis
7395
 *  from page one register from 0x18 bit 5 to 6
7396
 *
7397
 *  @param gyro_highrate_x_hyst_u8 : The value of gyro highrate x hysteresis
7398
 *
7399
 *  @return results of bus communication function
7400
 *  @retval 0 -> BNO055_SUCCESS
7401
 *  @retval 1 -> BNO055_ERROR
7402
 *
7403
 *  @note Gyro high rate hysteresis calculated by
7404
 *
7405
 *  using this (255 + 256 * gyro_highrate_x_hyst_u8) *4 LSB
7406
 *
7407
 *  The high rate value scales with the range setting
7408
 *
7409
 *  gyro_range_u8     | hysteresis      |     LSB
7410
 * -----------------  | -------------   | ---------
7411
 *     2000           |    62.26dps     |   1LSB
7412
 *     1000           |    31.13dps     |   1LSB
7413
 *     500            |    15.56dps     |   1LSB
7414
 *
7415
 */
7416
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_hyst(
7417
        u8 gyro_highrate_x_hyst_u8);
7418
/**************************************************************/
7419
/**\name FUNCTIONS FOR GYRO HIGHRATE X DURATION */
7420
/**************************************************************/
7421
/*!
7422
 *  @brief This API used to read gyro highrate x duration
7423
 *  from page one register from 0x19 bit 0 to 7
7424
 *
7425
 *  @param gyro_highrate_x_durn_u8 : The value of gyro highrate x duration
7426
 *
7427
 *  @return results of bus communication function
7428
 *  @retval 0 -> BNO055_SUCCESS
7429
 *  @retval 1 -> BNO055_ERROR
7430
 *
7431
 *  @note Gyro highrate duration calculate by using the formula
7432
 *
7433
 *  (1 + gyro_highrate_x_durn_u8)*2.5ms
7434
 *
7435
 */
7436
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_x_durn(
7437
        u8 *gyro_highrate_x_durn_u8);
7438
/*!
7439
 *  @brief This API used to write gyro highrate x duration
7440
 *  from page one register from 0x19 bit 0 to 7
7441
 *
7442
 *  @param gyro_highrate_x_durn_u8 : The value of gyro highrate x duration
7443
 *
7444
 *  @return results of bus communication function
7445
 *  @retval 0 -> BNO055_SUCCESS
7446
 *  @retval 1 -> BNO055_ERROR
7447
 *
7448
 *  @note Gyro highrate duration calculate by using the formula
7449
 *
7450
 *  (1 + gyro_highrate_x_durn_u8)*2.5ms
7451
 */
7452
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_x_durn(
7453
        u8 gyro_highrate_x_durn_u8);
7454
/**************************************************************/
7455
/**\name FUNCTIONS FOR GYRO HIGHRATE Y THRESHOLD */
7456
/**************************************************************/
7457
/*!
7458
 *  @brief This API used to read gyro highrate y threshold
7459
 *  from page one register from 0x1A bit 0 to 4
7460
 *
7461
 *  @param gyro_highrate_y_thres_u8 : The value of gyro highrate y threshold
7462
 *
7463
 *  @return results of bus communication function
7464
 *  @retval 0 -> BNO055_SUCCESS
7465
 *  @retval 1 -> BNO055_ERROR
7466
 *
7467
 *  @note Gyro highrate threshold dependent on the
7468
 *  selection of gyro range
7469
 *
7470
 *  gyro_range_u8     | threshold       |     LSB
7471
 * -----------------  | -------------   | ---------
7472
 *     2000           |    62.5dps      |   1LSB
7473
 *     1000           |    31.25dps     |   1LSB
7474
 *     500            |    15.625dps    |   1LSB
7475
 *     125            |    7.8125dps    |   1LSB
7476
 *
7477
 */
7478
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_thres(
7479
        u8 *gyro_highrate_y_thres_u8);
7480
/*!
7481
 *  @brief This API used to write gyro highrate y threshold
7482
 *  from page one register from 0x1A bit 0 to 4
7483
 *
7484
 *  @param gyro_highrate_y_thres_u8 : The value of gyro highrate y threshold
7485
 *
7486
 *  @return results of bus communication function
7487
 *  @retval 0 -> BNO055_SUCCESS
7488
 *  @retval 1 -> BNO055_ERROR
7489
 *
7490
 *  @note Gyro highrate threshold dependent on the
7491
 *  selection of gyro range
7492
 *
7493
 *  gyro_range_u8     | threshold       |     LSB
7494
 * -----------------  | -------------   | ---------
7495
 *     2000           |    62.5dps      |   1LSB
7496
 *     1000           |    31.25dps     |   1LSB
7497
 *     500            |    15.625dps    |   1LSB
7498
 *     125            |    7.8125dps    |   1LSB
7499
 *
7500
 */
7501
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_thres(
7502
        u8 gyro_highrate_y_thres_u8);
7503
/**************************************************************/
7504
/**\name FUNCTIONS FOR GYRO HIGHRATE Y HYSTERESIS */
7505
/**************************************************************/
7506
/*!
7507
 *  @brief This API used to read gyro highrate y hysteresis
7508
 *  from page one register from 0x1A bit 5 to 6
7509
 *
7510
 *  @param gyro_highrate_y_hyst_u8 : The value of gyro highrate y hysteresis
7511
 *
7512
 *  @return results of bus communication function
7513
 *  @retval 0 -> BNO055_SUCCESS
7514
 *  @retval 1 -> BNO055_ERROR
7515
 *
7516
 *  @note Gyro high rate hysteresis calculated by
7517
 *
7518
 *  using this (255 + 256 * gyro_highrate_y_hyst_u8) *4 LSB
7519
 *
7520
 *  The high rate value scales with the range setting
7521
 *
7522
 *  gyro_range_u8     | hysteresis      |     LSB
7523
 * -----------------  | -------------   | ---------
7524
 *     2000           |    62.26dps     |   1LSB
7525
 *     1000           |    31.13dps     |   1LSB
7526
 *     500            |    15.56dps     |   1LSB
7527
 */
7528
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_hyst(
7529
        u8 *gyro_highrate_y_hyst_u8);
7530
/*!
7531
 *  @brief This API used to write gyro highrate y hysteresis
7532
 *  from page one register from 0x1A bit 5 to 6
7533
 *
7534
 *  @param gyro_highrate_y_hyst_u8 : The value of gyro highrate y hysteresis
7535
 *
7536
 *  @return results of bus communication function
7537
 *  @retval 0 -> BNO055_SUCCESS
7538
 *  @retval 1 -> BNO055_ERROR
7539
 *
7540
 *  @note Gyro high rate hysteresis calculated by
7541
 *
7542
 *  using this (255 + 256 * gyro_highrate_y_hyst_u8) *4 LSB
7543
 *
7544
 *  The high rate value scales with the range setting
7545
 *
7546
 *  gyro_range_u8     | hysteresis      |     LSB
7547
 * -----------------  | -------------   | ---------
7548
 *     2000           |    62.26dps     |   1LSB
7549
 *     1000           |    31.13dps     |   1LSB
7550
 *     500            |    15.56dps     |   1LSB
7551
 */
7552
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_hyst(
7553
        u8 gyro_highrate_y_hyst_u8);
7554
/**************************************************************/
7555
/**\name FUNCTIONS FOR GYRO HIGHRATE Y DURATION */
7556
/**************************************************************/
7557
/*!
7558
 *  @brief This API used to read gyro highrate y duration
7559
 *  from page one register from 0x1B bit 0 to 7
7560
 *
7561
 *  @param gyro_highrate_y_durn_u8 : The value of gyro highrate y duration
7562
 *
7563
 *  @return results of bus communication function
7564
 *  @retval 0 -> BNO055_SUCCESS
7565
 *  @retval 1 -> BNO055_ERROR
7566
 *
7567
 *  @note Gyro highrate duration calculate by using the formula
7568
 *
7569
 *  (1 + gyro_highrate_y_durn_u8)*2.5ms
7570
 */
7571
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_y_durn(
7572
        u8 *gyro_highrate_y_durn_u8);
7573
/*!
7574
 *  @brief This API used to write gyro highrate y duration
7575
 *  from page one register from 0x1B bit 0 to 7
7576
 *
7577
 *  @param gyro_highrate_y_durn_u8 : The value of gyro highrate y duration
7578
 *
7579
 *  @return results of bus communication function
7580
 *  @retval 0 -> BNO055_SUCCESS
7581
 *  @retval 1 -> BNO055_ERROR
7582
 *
7583
 *  @note Gyro highrate duration calculate by using the formula
7584
 *
7585
 *  (1 + gyro_highrate_y_durn_u8)*2.5ms
7586
 */
7587
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_y_durn(
7588
        u8 gyro_highrate_y_durn_u8);
7589
/**************************************************************/
7590
/**\name FUNCTIONS FOR GYRO HIGHRATE Z THRESHOLD */
7591
/**************************************************************/
7592
/*!
7593
 *  @brief This API used to read gyro highrate z threshold
7594
 *  from page one register from 0x1C bit 0 to 4
7595
 *
7596
 *  @param gyro_highrate_z_thres_u8 : The value of gyro highrate z threshold
7597
 *
7598
 *  @return results of bus communication function
7599
 *  @retval 0 -> BNO055_SUCCESS
7600
 *  @retval 1 -> BNO055_ERROR
7601
 *
7602
 *  @note Gyro highrate threshold dependent on the
7603
 *  selection of gyro range
7604
 *
7605
 *  gyro_range_u8     | threshold       |     LSB
7606
 * -----------------  | -------------   | ---------
7607
 *     2000           |    62.5dps      |   1LSB
7608
 *     1000           |    31.25dps     |   1LSB
7609
 *     500            |    15.625dps    |   1LSB
7610
 *     125            |    7.8125dps    |   1LSB
7611
 *
7612
 */
7613
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_thres(
7614
        u8 *gyro_highrate_z_thres_u8);
7615
/*!
7616
 *  @brief This API used to write gyro highrate z threshold
7617
 *  from page one register from 0x1C bit 0 to 4
7618
 *
7619
 *  @param gyro_highrate_z_thres_u8 : The value of gyro highrate z threshold
7620
 *
7621
 *  @return results of bus communication function
7622
 *  @retval 0 -> BNO055_SUCCESS
7623
 *  @retval 1 -> BNO055_ERROR
7624
 *
7625
 *  @note Gyro highrate threshold dependent on the
7626
 *  selection of gyro range
7627
 *
7628
 *  gyro_range_u8     | threshold       |     LSB
7629
 * -----------------  | -------------   | ---------
7630
 *     2000           |    62.5dps      |   1LSB
7631
 *     1000           |    31.25dps     |   1LSB
7632
 *     500            |    15.625dps    |   1LSB
7633
 *     125            |    7.8125dps    |   1LSB
7634
 *
7635
 */
7636
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_thres(
7637
        u8 gyro_highrate_z_thres_u8);
7638
/**************************************************************/
7639
/**\name FUNCTIONS FOR GYRO HIGHRATE Z HYSTERESIS */
7640
/**************************************************************/
7641
/*!
7642
 *  @brief This API used to read gyro highrate z hysteresis
7643
 *  from page one register from 0x1C bit 5 to 6
7644
 *
7645
 *  @param gyro_highrate_z_hyst_u8 : The value of gyro highrate z hysteresis
7646
 *
7647
 *  @return results of bus communication function
7648
 *  @retval 0 -> BNO055_SUCCESS
7649
 *  @retval 1 -> BNO055_ERROR
7650
 *
7651
 *  @note Gyro high rate hysteresis calculated by
7652
 *
7653
 *  using this (255 + 256 * gyro_highrate_z_hyst_u8) *4 LSB
7654
 *
7655
 *  The high rate value scales with the range setting
7656
 *
7657
 *  gyro_range_u8     |  hysteresis     |     LSB
7658
 * -----------------  | -------------   | ---------
7659
 *     2000           |    62.26dps     |   1LSB
7660
 *     1000           |    31.13dps     |   1LSB
7661
 *     500            |    15.56dps     |   1LSB
7662
 */
7663
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_hyst(
7664
        u8 *gyro_highrate_z_hyst_u8);
7665
/*!
7666
 *  @brief This API used to write gyro highrate z hysteresis
7667
 *  from page one register from 0x1C bit 5 to 6
7668
 *
7669
 *  @param gyro_highrate_z_hyst_u8 : The value of gyro highrate z hysteresis
7670
 *
7671
 *  @return results of bus communication function
7672
 *  @retval 0 -> BNO055_SUCCESS
7673
 *  @retval 1 -> BNO055_ERROR
7674
 *
7675
 *  @note Gyro high rate hysteresis calculated by
7676
 *
7677
 *  using this (255 + 256 * gyro_highrate_z_hyst_u8) *4 LSB
7678
 *
7679
 *  The high rate value scales with the range setting
7680
 *
7681
 *  gyro_range_u8     |  hysteresis     |     LSB
7682
 * -----------------  | -------------   | ---------
7683
 *     2000           |    62.26dps     |   1LSB
7684
 *     1000           |    31.13dps     |   1LSB
7685
 *     500            |    15.56dps     |   1LSB
7686
 */
7687
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_hyst(
7688
        u8 gyro_highrate_z_hyst_u8);
7689
/**************************************************************/
7690
/**\name FUNCTIONS FOR GYRO HIGHRATE Z DURATION */
7691
/**************************************************************/
7692
/*!
7693
 *  @brief This API used to read gyro highrate z duration
7694
 *  from page one register from 0x1D bit 0 to 7
7695
 *
7696
 *  @param gyro_highrate_z_durn_u8 : The value of gyro highrate z duration
7697
 *
7698
 *  @return results of bus communication function
7699
 *  @retval 0 -> BNO055_SUCCESS
7700
 *  @retval 1 -> BNO055_ERROR
7701
 *
7702
 *  @note Gyro highrate duration calculate by using the formula
7703
 *
7704
 *  (1 + gyro_highrate_z_durn_u8)*2.5ms
7705
 */
7706
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_highrate_z_durn(
7707
        u8 *gyro_highrate_z_durn_u8);
7708
/*!
7709
 *  @brief This API used to write gyro highrate z duration
7710
 *  from page one register from 0x1D bit 0 to 7
7711
 *
7712
 *  @param gyro_highrate_z_durn_u8 : The value of gyro highrate z duration
7713
 *
7714
 *  @return results of bus communication function
7715
 *  @retval 0 -> BNO055_SUCCESS
7716
 *  @retval 1 -> BNO055_ERROR
7717
 *
7718
 *  @note Gyro highrate duration calculate by using the formula
7719
 *
7720
 *  (1 + gyro_highrate_z_durn_u8)*2.5ms
7721
 */
7722
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_highrate_z_durn(
7723
        u8 gyro_highrate_z_durn_u8);
7724
/**************************************************************/
7725
/**\name FUNCTIONS FOR GYRO ANY_MOTION THRESHOLD */
7726
/**************************************************************/
7727
/*!
7728
 *  @brief This API used to read gyro anymotion threshold
7729
 *  from page one register from 0x1E bit 0 to 6
7730
 *
7731
 *  @param gyro_any_motion_thres_u8 : The value of gyro anymotion threshold
7732
 *
7733
 *  @return results of bus communication function
7734
 *  @retval 0 -> BNO055_SUCCESS
7735
 *  @retval 1 -> BNO055_ERROR
7736
 *
7737
 *  @note Gyro anymotion interrupt threshold dependent
7738
 *  on the selection of gyro range
7739
 *
7740
 *  gyro_range_u8     | threshold     |    LSB
7741
 * -----------------  | ------------- | ---------
7742
 *     2000           |    1dps       |   1LSB
7743
 *     1000           |    0.5dps     |   1LSB
7744
 *     500            |    0.25dps    |   1LSB
7745
 *
7746
 */
7747
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_thres(
7748
        u8 *gyro_any_motion_thres_u8);
7749
/*!
7750
 *  @brief This API used to write gyro anymotion threshold
7751
 *  from page one register from 0x1E bit 0 to 6
7752
 *
7753
 *  @param gyro_any_motion_thres_u8 : The value of gyro anymotion threshold
7754
 *
7755
 *  @return results of bus communication function
7756
 *  @retval 0 -> BNO055_SUCCESS
7757
 *  @retval 1 -> BNO055_ERROR
7758
 *
7759
 *  @note Gyro anymotion interrupt threshold dependent
7760
 *  on the selection of gyro range
7761
 *
7762
 *  gyro_range_u8     | threshold     |    LSB
7763
 * -----------------  | ------------- | ---------
7764
 *     2000           |    1dps       |   1LSB
7765
 *     1000           |    0.5dps     |   1LSB
7766
 *     500            |    0.25dps    |   1LSB
7767
 *
7768
 */
7769
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_thres(
7770
        u8 gyro_any_motion_thres_u8);
7771
/**************************************************************/
7772
/**\name FUNCTIONS FOR GYRO ANY_MOTION SLOPE SAMPLES */
7773
/**************************************************************/
7774
/*!
7775
 *  @brief This API used to read gyro anymotion slope samples
7776
 *  from page one register from 0x1F bit 0 to 1
7777
 *
7778
 *  @param gyro_any_motion_slope_samples_u8 :
7779
 *  The value of gyro anymotion slope samples
7780
 *  gyro_any_motion_slope_samples_u8   |   result
7781
 *  ----------------------------------   | -----------
7782
 *            0                          |    8 samples
7783
 *            1                          |    16 samples
7784
 *            2                          |    32 samples
7785
 *            3                          |    64 samples
7786
 *
7787
 *  @return results of bus communication function
7788
 *  @retval 0 -> BNO055_SUCCESS
7789
 *  @retval 1 -> BNO055_ERROR
7790
 *
7791
 */
7792
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_slope_samples(
7793
        u8 *gyro_any_motion_slope_samples_u8);
7794
/*!
7795
 *  @brief This API used to write gyro anymotion slope samples
7796
 *  from page one register from 0x1F bit 0 to 1
7797
 *
7798
 *  @param gyro_any_motion_slope_samples_u8 :
7799
 *  The value of gyro anymotion slope samples
7800
 *  gyro_any_motion_slope_samples_u8   |   result
7801
 *  ---------------------------------- | -----------
7802
 *            0                        |    8 samples
7803
 *            1                        |    16 samples
7804
 *            2                        |    32 samples
7805
 *            3                        |    64 samples
7806
 *
7807
 *  @return results of bus communication function
7808
 *  @retval 0 -> BNO055_SUCCESS
7809
 *  @retval 1 -> BNO055_ERROR
7810
 *
7811
 */
7812
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_slope_samples(
7813
        u8 gyro_any_motion_slope_samples_u8);
7814
/**************************************************************/
7815
/**\name FUNCTIONS FOR GYRO ANY_MOTION AWAKE DURATION */
7816
/**************************************************************/
7817
/*!
7818
 *  @brief This API used to read gyro anymotion awake duration
7819
 *  from page one register from 0x1F bit 2 to 3
7820
 *
7821
 *  @param gyro_awake_durn_u8 : The value of gyro anymotion awake duration
7822
 *
7823
 *  @return results of bus communication function
7824
 *  @retval 0 -> BNO055_SUCCESS
7825
 *  @retval 1 -> BNO055_ERROR
7826
 *
7827
 */
7828
BNO055_RETURN_FUNCTION_TYPE bno055_get_gyro_any_motion_awake_durn(
7829
        u8 *gyro_awake_durn_u8);
7830
/*!
7831
 *  @brief This API used to write gyro anymotion awake duration
7832
 *  from page one register from 0x1F bit 2 to 3
7833
 *
7834
 *  @param gyro_awake_durn_u8 : The value of gyro anymotion awake duration
7835
 *
7836
 *  @return results of bus communication function
7837
 *  @retval 0 -> BNO055_SUCCESS
7838
 *  @retval 1 -> BNO055_ERROR
7839
 *
7840
 */
7841
BNO055_RETURN_FUNCTION_TYPE bno055_set_gyro_any_motion_awake_durn(
7842
        u8 gyro_awake_durn_u8);
7843
#endif