Contains the BSP driver for the B-L475E-IOT01 board.

Dependents:   mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more

https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/

Committer:
bcostm
Date:
Tue Jan 31 09:31:29 2017 +0100
Revision:
1:138e8076f348
Child:
2:87208512ab66
Add BSP/Components/Common files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 1:138e8076f348 1 /**
bcostm 1:138e8076f348 2 ******************************************************************************
bcostm 1:138e8076f348 3 * @file gyro.h
bcostm 1:138e8076f348 4 * @author MCD Application Team
bcostm 1:138e8076f348 5 * @version V4.0.1
bcostm 1:138e8076f348 6 * @date 21-July-2015
bcostm 1:138e8076f348 7 * @brief This header file contains the functions prototypes for the gyroscope driver.
bcostm 1:138e8076f348 8 ******************************************************************************
bcostm 1:138e8076f348 9 * @attention
bcostm 1:138e8076f348 10 *
bcostm 1:138e8076f348 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
bcostm 1:138e8076f348 12 *
bcostm 1:138e8076f348 13 * Redistribution and use in source and binary forms, with or without modification,
bcostm 1:138e8076f348 14 * are permitted provided that the following conditions are met:
bcostm 1:138e8076f348 15 * 1. Redistributions of source code must retain the above copyright notice,
bcostm 1:138e8076f348 16 * this list of conditions and the following disclaimer.
bcostm 1:138e8076f348 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 1:138e8076f348 18 * this list of conditions and the following disclaimer in the documentation
bcostm 1:138e8076f348 19 * and/or other materials provided with the distribution.
bcostm 1:138e8076f348 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bcostm 1:138e8076f348 21 * may be used to endorse or promote products derived from this software
bcostm 1:138e8076f348 22 * without specific prior written permission.
bcostm 1:138e8076f348 23 *
bcostm 1:138e8076f348 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bcostm 1:138e8076f348 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bcostm 1:138e8076f348 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bcostm 1:138e8076f348 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bcostm 1:138e8076f348 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bcostm 1:138e8076f348 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bcostm 1:138e8076f348 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bcostm 1:138e8076f348 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bcostm 1:138e8076f348 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bcostm 1:138e8076f348 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 1:138e8076f348 34 *
bcostm 1:138e8076f348 35 ******************************************************************************
bcostm 1:138e8076f348 36 */
bcostm 1:138e8076f348 37
bcostm 1:138e8076f348 38
bcostm 1:138e8076f348 39 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 1:138e8076f348 40 #ifndef __GYRO_H
bcostm 1:138e8076f348 41 #define __GYRO_H
bcostm 1:138e8076f348 42
bcostm 1:138e8076f348 43 #ifdef __cplusplus
bcostm 1:138e8076f348 44 extern "C" {
bcostm 1:138e8076f348 45 #endif
bcostm 1:138e8076f348 46
bcostm 1:138e8076f348 47 /* Includes ------------------------------------------------------------------*/
bcostm 1:138e8076f348 48 #include <stdint.h>
bcostm 1:138e8076f348 49
bcostm 1:138e8076f348 50 /** @addtogroup BSP
bcostm 1:138e8076f348 51 * @{
bcostm 1:138e8076f348 52 */
bcostm 1:138e8076f348 53
bcostm 1:138e8076f348 54 /** @addtogroup Components
bcostm 1:138e8076f348 55 * @{
bcostm 1:138e8076f348 56 */
bcostm 1:138e8076f348 57
bcostm 1:138e8076f348 58 /** @addtogroup GYRO
bcostm 1:138e8076f348 59 * @{
bcostm 1:138e8076f348 60 */
bcostm 1:138e8076f348 61
bcostm 1:138e8076f348 62 /** @defgroup GYRO_Exported_Types
bcostm 1:138e8076f348 63 * @{
bcostm 1:138e8076f348 64 */
bcostm 1:138e8076f348 65
bcostm 1:138e8076f348 66 /** @defgroup GYRO_Driver_structure Gyroscope Driver structure
bcostm 1:138e8076f348 67 * @{
bcostm 1:138e8076f348 68 */
bcostm 1:138e8076f348 69 typedef struct
bcostm 1:138e8076f348 70 {
bcostm 1:138e8076f348 71 void (*Init)(uint16_t);
bcostm 1:138e8076f348 72 void (*DeInit)(void);
bcostm 1:138e8076f348 73 uint8_t (*ReadID)(void);
bcostm 1:138e8076f348 74 void (*Reset)(void);
bcostm 1:138e8076f348 75 void (*LowPower)(uint16_t);
bcostm 1:138e8076f348 76 void (*ConfigIT)(uint16_t);
bcostm 1:138e8076f348 77 void (*EnableIT)(uint8_t);
bcostm 1:138e8076f348 78 void (*DisableIT)(uint8_t);
bcostm 1:138e8076f348 79 uint8_t (*ITStatus)(uint16_t, uint16_t);
bcostm 1:138e8076f348 80 void (*ClearIT)(uint16_t, uint16_t);
bcostm 1:138e8076f348 81 void (*FilterConfig)(uint8_t);
bcostm 1:138e8076f348 82 void (*FilterCmd)(uint8_t);
bcostm 1:138e8076f348 83 void (*GetXYZ)(float *);
bcostm 1:138e8076f348 84 }GYRO_DrvTypeDef;
bcostm 1:138e8076f348 85 /**
bcostm 1:138e8076f348 86 * @}
bcostm 1:138e8076f348 87 */
bcostm 1:138e8076f348 88
bcostm 1:138e8076f348 89 /** @defgroup GYRO_Config_structure Gyroscope Configuration structure
bcostm 1:138e8076f348 90 * @{
bcostm 1:138e8076f348 91 */
bcostm 1:138e8076f348 92
bcostm 1:138e8076f348 93 typedef struct
bcostm 1:138e8076f348 94 {
bcostm 1:138e8076f348 95 uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */
bcostm 1:138e8076f348 96 uint8_t Output_DataRate; /* OUT data rate */
bcostm 1:138e8076f348 97 uint8_t Axes_Enable; /* Axes enable */
bcostm 1:138e8076f348 98 uint8_t Band_Width; /* Bandwidth selection */
bcostm 1:138e8076f348 99 uint8_t BlockData_Update; /* Block Data Update */
bcostm 1:138e8076f348 100 uint8_t Endianness; /* Endian Data selection */
bcostm 1:138e8076f348 101 uint8_t Full_Scale; /* Full Scale selection */
bcostm 1:138e8076f348 102 }GYRO_InitTypeDef;
bcostm 1:138e8076f348 103
bcostm 1:138e8076f348 104 /* GYRO High Pass Filter struct */
bcostm 1:138e8076f348 105 typedef struct
bcostm 1:138e8076f348 106 {
bcostm 1:138e8076f348 107 uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */
bcostm 1:138e8076f348 108 uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */
bcostm 1:138e8076f348 109 }GYRO_FilterConfigTypeDef;
bcostm 1:138e8076f348 110
bcostm 1:138e8076f348 111 /*GYRO Interrupt struct */
bcostm 1:138e8076f348 112 typedef struct
bcostm 1:138e8076f348 113 {
bcostm 1:138e8076f348 114 uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */
bcostm 1:138e8076f348 115 uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */
bcostm 1:138e8076f348 116 uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */
bcostm 1:138e8076f348 117 }GYRO_InterruptConfigTypeDef;
bcostm 1:138e8076f348 118
bcostm 1:138e8076f348 119 /**
bcostm 1:138e8076f348 120 * @}
bcostm 1:138e8076f348 121 */
bcostm 1:138e8076f348 122
bcostm 1:138e8076f348 123 /**
bcostm 1:138e8076f348 124 * @}
bcostm 1:138e8076f348 125 */
bcostm 1:138e8076f348 126
bcostm 1:138e8076f348 127 /**
bcostm 1:138e8076f348 128 * @}
bcostm 1:138e8076f348 129 */
bcostm 1:138e8076f348 130
bcostm 1:138e8076f348 131 /**
bcostm 1:138e8076f348 132 * @}
bcostm 1:138e8076f348 133 */
bcostm 1:138e8076f348 134
bcostm 1:138e8076f348 135 /**
bcostm 1:138e8076f348 136 * @}
bcostm 1:138e8076f348 137 */
bcostm 1:138e8076f348 138
bcostm 1:138e8076f348 139 #ifdef __cplusplus
bcostm 1:138e8076f348 140 }
bcostm 1:138e8076f348 141 #endif
bcostm 1:138e8076f348 142
bcostm 1:138e8076f348 143 #endif /* __GYRO_H */
bcostm 1:138e8076f348 144
bcostm 1:138e8076f348 145 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/