API Documentation  3.02.02.00
sensor_mpu6500.h
1 /******************************************************************************
2 
3  @file sensor_mpu6500.h
4 
5  @brief This file contains the declaration to the HAL Invensense MPU6500
6  abstraction layer.
7 
8  Group: WCS, LPC, BTS
9  $Target Device: DEVICES $
10 
11  ******************************************************************************
12  $License: BSD3 2012 $
13  ******************************************************************************
14  $Release Name: PACKAGE NAME $
15  $Release Date: PACKAGE RELEASE DATE $
16  *****************************************************************************/
17 #ifndef SENSOR_MPU6500_H
18 #define SENSOR_MPU6500_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /* ------------------------------------------------------------------------------------------------
25  * Includes
26  * ------------------------------------------------------------------------------------------------
27  */
28 #include "stdint.h"
29 #include "stdbool.h"
30 
31 /* ------------------------------------------------------------------------------------------------
32  * Constants
33  * ------------------------------------------------------------------------------------------------
34  */
35 #define ACC_RANGE_2G 1
36 #define ACC_RANGE_4G 2
37 #define ACC_RANGE_8G 3
38 #define ACC_RANGE_16G 4
39 
40  /* ------------------------------------------------------------------------------------------------
41  * Typedefs
42  * ------------------------------------------------------------------------------------------------
43  */
44 
45 
46 /* ------------------------------------------------------------------------------------------------
47  * Functions
48  * ------------------------------------------------------------------------------------------------
49  */
50 void sensorMpu6500Init(void);
51 bool sensorMpu6500Test(void);
52 
53 void sensorMpu6500AccEnable(uint8_t config);
54 void sensorMpu6500AccSetRange(uint8_t range);
55 bool sensorMpu6500AccRead(uint16_t *rawData);
56 float sensorMpu6500AccelConvert(int16_t rawValue);
57 
58 void sensorMpu6500GyroEnable(uint8_t config);
59 bool sensorMpu6500GyroRead(uint16_t *rawData);
60 float sensorMpu6500GyroConvert(int16_t rawValue);
61 /**************************************************************************************************
62 */
63 
64 #ifdef __cplusplus
65 };
66 #endif
67 
68 #endif
69 
70 /**************************************************************************************************
71 */