BSP driver for DISCO_L496AG

Dependents:   DISCO_L496AG-LCD-prova_1 DISCO_L496AG-LCD-prova_2 DISCO_L496AG-LCD-demo DISCO_L496AG-SRAM-demo

Committer:
bcostm
Date:
Mon Mar 26 10:28:18 2018 +0200
Revision:
0:d83f1c8ca282
Child:
2:106c7b82e064
Add BSP files coming from CubeL4 V1.11.0

Who changed what in which revision?

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