STM32L476G-Discovery board drivers V1.0.0

Dependents:   DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more

Committer:
jeromecoutant
Date:
Tue Sep 24 18:00:58 2019 +0200
Revision:
5:4943b15cce9f
Parent:
3:4c7d003a8259
Update BSP files with CubeL4 V1.14.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 1:917af0ca86df 1 /**
Jerome Coutant 1:917af0ca86df 2 ******************************************************************************
Jerome Coutant 1:917af0ca86df 3 * @file gyro.h
Jerome Coutant 1:917af0ca86df 4 * @author MCD Application Team
Jerome Coutant 1:917af0ca86df 5 * @brief This header file contains the functions prototypes for the gyroscope driver.
Jerome Coutant 1:917af0ca86df 6 ******************************************************************************
Jerome Coutant 1:917af0ca86df 7 * @attention
Jerome Coutant 1:917af0ca86df 8 *
jeromecoutant 5:4943b15cce9f 9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
jeromecoutant 5:4943b15cce9f 10 * All rights reserved.</center></h2>
Jerome Coutant 1:917af0ca86df 11 *
jeromecoutant 5:4943b15cce9f 12 * This software component is licensed by ST under BSD 3-Clause license,
jeromecoutant 5:4943b15cce9f 13 * the "License"; You may not use this file except in compliance with the
jeromecoutant 5:4943b15cce9f 14 * License. You may obtain a copy of the License at:
jeromecoutant 5:4943b15cce9f 15 * opensource.org/licenses/BSD-3-Clause
Jerome Coutant 1:917af0ca86df 16 *
Jerome Coutant 1:917af0ca86df 17 ******************************************************************************
Jerome Coutant 1:917af0ca86df 18 */
Jerome Coutant 1:917af0ca86df 19
Jerome Coutant 1:917af0ca86df 20
Jerome Coutant 1:917af0ca86df 21 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 1:917af0ca86df 22 #ifndef __GYRO_H
Jerome Coutant 1:917af0ca86df 23 #define __GYRO_H
Jerome Coutant 1:917af0ca86df 24
Jerome Coutant 1:917af0ca86df 25 #ifdef __cplusplus
Jerome Coutant 1:917af0ca86df 26 extern "C" {
Jerome Coutant 1:917af0ca86df 27 #endif
Jerome Coutant 1:917af0ca86df 28
Jerome Coutant 1:917af0ca86df 29 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 1:917af0ca86df 30 #include <stdint.h>
Jerome Coutant 1:917af0ca86df 31
Jerome Coutant 1:917af0ca86df 32 /** @addtogroup BSP
Jerome Coutant 1:917af0ca86df 33 * @{
Jerome Coutant 1:917af0ca86df 34 */
Jerome Coutant 1:917af0ca86df 35
Jerome Coutant 1:917af0ca86df 36 /** @addtogroup Components
Jerome Coutant 1:917af0ca86df 37 * @{
Jerome Coutant 1:917af0ca86df 38 */
Jerome Coutant 1:917af0ca86df 39
Jerome Coutant 1:917af0ca86df 40 /** @addtogroup GYRO
Jerome Coutant 1:917af0ca86df 41 * @{
Jerome Coutant 1:917af0ca86df 42 */
Jerome Coutant 1:917af0ca86df 43
Jerome Coutant 1:917af0ca86df 44 /** @defgroup GYRO_Exported_Types
Jerome Coutant 1:917af0ca86df 45 * @{
Jerome Coutant 1:917af0ca86df 46 */
Jerome Coutant 1:917af0ca86df 47
Jerome Coutant 1:917af0ca86df 48 /** @defgroup GYRO_Driver_structure Gyroscope Driver structure
Jerome Coutant 1:917af0ca86df 49 * @{
Jerome Coutant 1:917af0ca86df 50 */
Jerome Coutant 1:917af0ca86df 51 typedef struct
Jerome Coutant 1:917af0ca86df 52 {
Jerome Coutant 1:917af0ca86df 53 void (*Init)(uint16_t);
Jerome Coutant 1:917af0ca86df 54 void (*DeInit)(void);
Jerome Coutant 1:917af0ca86df 55 uint8_t (*ReadID)(void);
Jerome Coutant 1:917af0ca86df 56 void (*Reset)(void);
Jerome Coutant 1:917af0ca86df 57 void (*LowPower)(uint16_t);
Jerome Coutant 1:917af0ca86df 58 void (*ConfigIT)(uint16_t);
Jerome Coutant 1:917af0ca86df 59 void (*EnableIT)(uint8_t);
Jerome Coutant 1:917af0ca86df 60 void (*DisableIT)(uint8_t);
Jerome Coutant 1:917af0ca86df 61 uint8_t (*ITStatus)(uint16_t, uint16_t);
Jerome Coutant 1:917af0ca86df 62 void (*ClearIT)(uint16_t, uint16_t);
Jerome Coutant 1:917af0ca86df 63 void (*FilterConfig)(uint8_t);
Jerome Coutant 1:917af0ca86df 64 void (*FilterCmd)(uint8_t);
Jerome Coutant 1:917af0ca86df 65 void (*GetXYZ)(float *);
Jerome Coutant 1:917af0ca86df 66 }GYRO_DrvTypeDef;
Jerome Coutant 1:917af0ca86df 67 /**
Jerome Coutant 1:917af0ca86df 68 * @}
Jerome Coutant 1:917af0ca86df 69 */
Jerome Coutant 1:917af0ca86df 70
Jerome Coutant 1:917af0ca86df 71 /** @defgroup GYRO_Config_structure Gyroscope Configuration structure
Jerome Coutant 1:917af0ca86df 72 * @{
Jerome Coutant 1:917af0ca86df 73 */
Jerome Coutant 1:917af0ca86df 74
Jerome Coutant 1:917af0ca86df 75 typedef struct
Jerome Coutant 1:917af0ca86df 76 {
Jerome Coutant 1:917af0ca86df 77 uint8_t Power_Mode; /* Power-down/Sleep/Normal Mode */
Jerome Coutant 1:917af0ca86df 78 uint8_t Output_DataRate; /* OUT data rate */
Jerome Coutant 1:917af0ca86df 79 uint8_t Axes_Enable; /* Axes enable */
Jerome Coutant 1:917af0ca86df 80 uint8_t Band_Width; /* Bandwidth selection */
Jerome Coutant 1:917af0ca86df 81 uint8_t BlockData_Update; /* Block Data Update */
Jerome Coutant 1:917af0ca86df 82 uint8_t Endianness; /* Endian Data selection */
Jerome Coutant 1:917af0ca86df 83 uint8_t Full_Scale; /* Full Scale selection */
Jerome Coutant 1:917af0ca86df 84 }GYRO_InitTypeDef;
Jerome Coutant 1:917af0ca86df 85
Jerome Coutant 1:917af0ca86df 86 /* GYRO High Pass Filter struct */
Jerome Coutant 1:917af0ca86df 87 typedef struct
Jerome Coutant 1:917af0ca86df 88 {
Jerome Coutant 1:917af0ca86df 89 uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */
Jerome Coutant 1:917af0ca86df 90 uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */
Jerome Coutant 1:917af0ca86df 91 }GYRO_FilterConfigTypeDef;
Jerome Coutant 1:917af0ca86df 92
Jerome Coutant 1:917af0ca86df 93 /*GYRO Interrupt struct */
Jerome Coutant 1:917af0ca86df 94 typedef struct
Jerome Coutant 1:917af0ca86df 95 {
Jerome Coutant 1:917af0ca86df 96 uint8_t Latch_Request; /* Latch interrupt request into CLICK_SRC register */
Jerome Coutant 1:917af0ca86df 97 uint8_t Interrupt_Axes; /* X, Y, Z Axes Interrupts */
Jerome Coutant 1:917af0ca86df 98 uint8_t Interrupt_ActiveEdge; /* Interrupt Active edge */
Jerome Coutant 1:917af0ca86df 99 }GYRO_InterruptConfigTypeDef;
Jerome Coutant 1:917af0ca86df 100
Jerome Coutant 1:917af0ca86df 101 /**
Jerome Coutant 1:917af0ca86df 102 * @}
Jerome Coutant 1:917af0ca86df 103 */
Jerome Coutant 1:917af0ca86df 104
Jerome Coutant 1:917af0ca86df 105 /**
Jerome Coutant 1:917af0ca86df 106 * @}
Jerome Coutant 1:917af0ca86df 107 */
Jerome Coutant 1:917af0ca86df 108
Jerome Coutant 1:917af0ca86df 109 /**
Jerome Coutant 1:917af0ca86df 110 * @}
Jerome Coutant 1:917af0ca86df 111 */
Jerome Coutant 1:917af0ca86df 112
Jerome Coutant 1:917af0ca86df 113 /**
Jerome Coutant 1:917af0ca86df 114 * @}
Jerome Coutant 1:917af0ca86df 115 */
Jerome Coutant 1:917af0ca86df 116
Jerome Coutant 1:917af0ca86df 117 /**
Jerome Coutant 1:917af0ca86df 118 * @}
Jerome Coutant 1:917af0ca86df 119 */
Jerome Coutant 1:917af0ca86df 120
Jerome Coutant 1:917af0ca86df 121 #ifdef __cplusplus
Jerome Coutant 1:917af0ca86df 122 }
Jerome Coutant 1:917af0ca86df 123 #endif
Jerome Coutant 1:917af0ca86df 124
Jerome Coutant 1:917af0ca86df 125 #endif /* __GYRO_H */
Jerome Coutant 1:917af0ca86df 126
Jerome Coutant 1:917af0ca86df 127 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/