ble
Dependencies: HC_SR04_Ultrasonic_Library Servo mbed
Fork of FIP_REV1 by
Sensor_Shield/imu_6axes.h@1:bdbf36f8408d, 2015-05-19 (annotated)
- Committer:
- julientiron
- Date:
- Tue May 19 16:53:44 2015 +0000
- Revision:
- 1:bdbf36f8408d
ddd; ;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
julientiron | 1:bdbf36f8408d | 1 | /** |
julientiron | 1:bdbf36f8408d | 2 | ****************************************************************************** |
julientiron | 1:bdbf36f8408d | 3 | * @file imu_6axes.h |
julientiron | 1:bdbf36f8408d | 4 | * @author MEMS Application Team |
julientiron | 1:bdbf36f8408d | 5 | * @version V1.0.0 |
julientiron | 1:bdbf36f8408d | 6 | * @date 30-July-2014 |
julientiron | 1:bdbf36f8408d | 7 | * @brief This header file contains the functions prototypes for the |
julientiron | 1:bdbf36f8408d | 8 | * accelerometer and gyroscope driver. |
julientiron | 1:bdbf36f8408d | 9 | ****************************************************************************** |
julientiron | 1:bdbf36f8408d | 10 | * @attention |
julientiron | 1:bdbf36f8408d | 11 | * |
julientiron | 1:bdbf36f8408d | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
julientiron | 1:bdbf36f8408d | 13 | * |
julientiron | 1:bdbf36f8408d | 14 | * Redistribution and use in source and binary forms, with or without modification, |
julientiron | 1:bdbf36f8408d | 15 | * are permitted provided that the following conditions are met: |
julientiron | 1:bdbf36f8408d | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
julientiron | 1:bdbf36f8408d | 17 | * this list of conditions and the following disclaimer. |
julientiron | 1:bdbf36f8408d | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
julientiron | 1:bdbf36f8408d | 19 | * this list of conditions and the following disclaimer in the documentation |
julientiron | 1:bdbf36f8408d | 20 | * and/or other materials provided with the distribution. |
julientiron | 1:bdbf36f8408d | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
julientiron | 1:bdbf36f8408d | 22 | * may be used to endorse or promote products derived from this software |
julientiron | 1:bdbf36f8408d | 23 | * without specific prior written permission. |
julientiron | 1:bdbf36f8408d | 24 | * |
julientiron | 1:bdbf36f8408d | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
julientiron | 1:bdbf36f8408d | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
julientiron | 1:bdbf36f8408d | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
julientiron | 1:bdbf36f8408d | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
julientiron | 1:bdbf36f8408d | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
julientiron | 1:bdbf36f8408d | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
julientiron | 1:bdbf36f8408d | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
julientiron | 1:bdbf36f8408d | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
julientiron | 1:bdbf36f8408d | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
julientiron | 1:bdbf36f8408d | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
julientiron | 1:bdbf36f8408d | 35 | * |
julientiron | 1:bdbf36f8408d | 36 | ****************************************************************************** |
julientiron | 1:bdbf36f8408d | 37 | */ |
julientiron | 1:bdbf36f8408d | 38 | |
julientiron | 1:bdbf36f8408d | 39 | |
julientiron | 1:bdbf36f8408d | 40 | /* Define to prevent recursive inclusion -------------------------------------*/ |
julientiron | 1:bdbf36f8408d | 41 | #ifndef __IMU_6AXES_H |
julientiron | 1:bdbf36f8408d | 42 | #define __IMU_6AXES_H |
julientiron | 1:bdbf36f8408d | 43 | |
julientiron | 1:bdbf36f8408d | 44 | #ifdef __cplusplus |
julientiron | 1:bdbf36f8408d | 45 | extern "C" { |
julientiron | 1:bdbf36f8408d | 46 | #endif |
julientiron | 1:bdbf36f8408d | 47 | |
julientiron | 1:bdbf36f8408d | 48 | /* Includes ------------------------------------------------------------------*/ |
julientiron | 1:bdbf36f8408d | 49 | #include <stdint.h> |
julientiron | 1:bdbf36f8408d | 50 | |
julientiron | 1:bdbf36f8408d | 51 | |
julientiron | 1:bdbf36f8408d | 52 | /** |
julientiron | 1:bdbf36f8408d | 53 | * @brief IMU_6AXES init structure definition |
julientiron | 1:bdbf36f8408d | 54 | */ |
julientiron | 1:bdbf36f8408d | 55 | typedef struct |
julientiron | 1:bdbf36f8408d | 56 | { |
julientiron | 1:bdbf36f8408d | 57 | uint8_t G_OutputDataRate; |
julientiron | 1:bdbf36f8408d | 58 | uint8_t G_FullScale; |
julientiron | 1:bdbf36f8408d | 59 | uint8_t G_X_Axis; |
julientiron | 1:bdbf36f8408d | 60 | uint8_t G_Y_Axis; |
julientiron | 1:bdbf36f8408d | 61 | uint8_t G_Z_Axis; |
julientiron | 1:bdbf36f8408d | 62 | uint8_t X_OutputDataRate; |
julientiron | 1:bdbf36f8408d | 63 | uint8_t X_FullScale; |
julientiron | 1:bdbf36f8408d | 64 | uint8_t X_X_Axis; |
julientiron | 1:bdbf36f8408d | 65 | uint8_t X_Y_Axis; |
julientiron | 1:bdbf36f8408d | 66 | uint8_t X_Z_Axis; |
julientiron | 1:bdbf36f8408d | 67 | }IMU_6AXES_InitTypeDef; |
julientiron | 1:bdbf36f8408d | 68 | |
julientiron | 1:bdbf36f8408d | 69 | /** |
julientiron | 1:bdbf36f8408d | 70 | * @brief IMU_6AXES status enumerator definition |
julientiron | 1:bdbf36f8408d | 71 | */ |
julientiron | 1:bdbf36f8408d | 72 | typedef enum { |
julientiron | 1:bdbf36f8408d | 73 | IMU_6AXES_OK = 0, |
julientiron | 1:bdbf36f8408d | 74 | IMU_6AXES_ERROR = 1, |
julientiron | 1:bdbf36f8408d | 75 | IMU_6AXES_TIMEOUT = 2 |
julientiron | 1:bdbf36f8408d | 76 | } IMU_6AXES_StatusTypeDef; |
julientiron | 1:bdbf36f8408d | 77 | |
julientiron | 1:bdbf36f8408d | 78 | /** |
julientiron | 1:bdbf36f8408d | 79 | * @brief IMU_6AXES driver structure definition |
julientiron | 1:bdbf36f8408d | 80 | */ |
julientiron | 1:bdbf36f8408d | 81 | typedef struct { |
julientiron | 1:bdbf36f8408d | 82 | void (*Init)(IMU_6AXES_InitTypeDef *); |
julientiron | 1:bdbf36f8408d | 83 | uint8_t (*Read_XG_ID)(void); |
julientiron | 1:bdbf36f8408d | 84 | void (*Get_X_Axes)(int32_t *); |
julientiron | 1:bdbf36f8408d | 85 | void (*Get_G_Axes)(int32_t *); |
julientiron | 1:bdbf36f8408d | 86 | }IMU_6AXES_DrvTypeDef; |
julientiron | 1:bdbf36f8408d | 87 | |
julientiron | 1:bdbf36f8408d | 88 | |
julientiron | 1:bdbf36f8408d | 89 | #ifdef __cplusplus |
julientiron | 1:bdbf36f8408d | 90 | } |
julientiron | 1:bdbf36f8408d | 91 | #endif |
julientiron | 1:bdbf36f8408d | 92 | |
julientiron | 1:bdbf36f8408d | 93 | #endif /* __IMU_6AXES_H */ |
julientiron | 1:bdbf36f8408d | 94 | |
julientiron | 1:bdbf36f8408d | 95 | /** |
julientiron | 1:bdbf36f8408d | 96 | * @} |
julientiron | 1:bdbf36f8408d | 97 | */ |
julientiron | 1:bdbf36f8408d | 98 | |
julientiron | 1:bdbf36f8408d | 99 | /** |
julientiron | 1:bdbf36f8408d | 100 | * @} |
julientiron | 1:bdbf36f8408d | 101 | */ |
julientiron | 1:bdbf36f8408d | 102 | |
julientiron | 1:bdbf36f8408d | 103 | /** |
julientiron | 1:bdbf36f8408d | 104 | * @} |
julientiron | 1:bdbf36f8408d | 105 | */ |
julientiron | 1:bdbf36f8408d | 106 | |
julientiron | 1:bdbf36f8408d | 107 | |
julientiron | 1:bdbf36f8408d | 108 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
julientiron | 1:bdbf36f8408d | 109 |