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:
Jerome Coutant
Date:
Wed Nov 20 16:48:24 2019 +0100
Revision:
2:106c7b82e064
Parent:
0:d83f1c8ca282
Update BSP files with CubeL4 V1.14.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 *
Jerome Coutant 2:106c7b82e064 9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
Jerome Coutant 2:106c7b82e064 10 * All rights reserved.</center></h2>
bcostm 0:d83f1c8ca282 11 *
Jerome Coutant 2:106c7b82e064 12 * This software component is licensed by ST under BSD 3-Clause license,
Jerome Coutant 2:106c7b82e064 13 * the "License"; You may not use this file except in compliance with the
Jerome Coutant 2:106c7b82e064 14 * License. You may obtain a copy of the License at:
Jerome Coutant 2:106c7b82e064 15 * opensource.org/licenses/BSD-3-Clause
bcostm 0:d83f1c8ca282 16 *
bcostm 0:d83f1c8ca282 17 ******************************************************************************
bcostm 0:d83f1c8ca282 18 */
bcostm 0:d83f1c8ca282 19
bcostm 0:d83f1c8ca282 20 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 0:d83f1c8ca282 21 #ifndef __ACCELERO_H
bcostm 0:d83f1c8ca282 22 #define __ACCELERO_H
bcostm 0:d83f1c8ca282 23
bcostm 0:d83f1c8ca282 24 #ifdef __cplusplus
bcostm 0:d83f1c8ca282 25 extern "C" {
bcostm 0:d83f1c8ca282 26 #endif
bcostm 0:d83f1c8ca282 27
bcostm 0:d83f1c8ca282 28 /* Includes ------------------------------------------------------------------*/
bcostm 0:d83f1c8ca282 29 #include <stdint.h>
bcostm 0:d83f1c8ca282 30
bcostm 0:d83f1c8ca282 31 /** @addtogroup BSP
bcostm 0:d83f1c8ca282 32 * @{
bcostm 0:d83f1c8ca282 33 */
bcostm 0:d83f1c8ca282 34
bcostm 0:d83f1c8ca282 35 /** @addtogroup Components
bcostm 0:d83f1c8ca282 36 * @{
bcostm 0:d83f1c8ca282 37 */
bcostm 0:d83f1c8ca282 38
bcostm 0:d83f1c8ca282 39 /** @addtogroup ACCELERO
bcostm 0:d83f1c8ca282 40 * @{
bcostm 0:d83f1c8ca282 41 */
bcostm 0:d83f1c8ca282 42
bcostm 0:d83f1c8ca282 43 /** @defgroup ACCELERO_Exported_Types
bcostm 0:d83f1c8ca282 44 * @{
bcostm 0:d83f1c8ca282 45 */
bcostm 0:d83f1c8ca282 46
bcostm 0:d83f1c8ca282 47 /** @defgroup ACCELERO_Driver_structure Accelerometer Driver structure
bcostm 0:d83f1c8ca282 48 * @{
bcostm 0:d83f1c8ca282 49 */
bcostm 0:d83f1c8ca282 50 typedef struct
bcostm 0:d83f1c8ca282 51 {
bcostm 0:d83f1c8ca282 52 void (*Init)(uint16_t);
bcostm 0:d83f1c8ca282 53 void (*DeInit)(void);
bcostm 0:d83f1c8ca282 54 uint8_t (*ReadID)(void);
bcostm 0:d83f1c8ca282 55 void (*Reset)(void);
bcostm 0:d83f1c8ca282 56 void (*LowPower)(uint16_t);
bcostm 0:d83f1c8ca282 57 void (*ConfigIT)(void);
bcostm 0:d83f1c8ca282 58 void (*EnableIT)(uint8_t);
bcostm 0:d83f1c8ca282 59 void (*DisableIT)(uint8_t);
bcostm 0:d83f1c8ca282 60 uint8_t (*ITStatus)(uint16_t);
bcostm 0:d83f1c8ca282 61 void (*ClearIT)(void);
bcostm 0:d83f1c8ca282 62 void (*FilterConfig)(uint8_t);
bcostm 0:d83f1c8ca282 63 void (*FilterCmd)(uint8_t);
bcostm 0:d83f1c8ca282 64 void (*GetXYZ)(int16_t *);
bcostm 0:d83f1c8ca282 65 }ACCELERO_DrvTypeDef;
bcostm 0:d83f1c8ca282 66 /**
bcostm 0:d83f1c8ca282 67 * @}
bcostm 0:d83f1c8ca282 68 */
bcostm 0:d83f1c8ca282 69
bcostm 0:d83f1c8ca282 70 /** @defgroup ACCELERO_Configuration_structure Accelerometer Configuration structure
bcostm 0:d83f1c8ca282 71 * @{
bcostm 0:d83f1c8ca282 72 */
bcostm 0:d83f1c8ca282 73
bcostm 0:d83f1c8ca282 74 /* ACCELERO struct */
bcostm 0:d83f1c8ca282 75 typedef struct
bcostm 0:d83f1c8ca282 76 {
bcostm 0:d83f1c8ca282 77 uint8_t Power_Mode; /* Power-down/Normal Mode */
bcostm 0:d83f1c8ca282 78 uint8_t AccOutput_DataRate; /* OUT data rate */
bcostm 0:d83f1c8ca282 79 uint8_t Axes_Enable; /* Axes enable */
bcostm 0:d83f1c8ca282 80 uint8_t High_Resolution; /* High Resolution enabling/disabling */
bcostm 0:d83f1c8ca282 81 uint8_t BlockData_Update; /* Block Data Update */
bcostm 0:d83f1c8ca282 82 uint8_t Endianness; /* Endian Data selection */
bcostm 0:d83f1c8ca282 83 uint8_t AccFull_Scale; /* Full Scale selection */
bcostm 0:d83f1c8ca282 84 uint8_t Communication_Mode;
bcostm 0:d83f1c8ca282 85 }ACCELERO_InitTypeDef;
bcostm 0:d83f1c8ca282 86
bcostm 0:d83f1c8ca282 87 /* ACCELERO High Pass Filter struct */
bcostm 0:d83f1c8ca282 88 typedef struct
bcostm 0:d83f1c8ca282 89 {
bcostm 0:d83f1c8ca282 90 uint8_t HighPassFilter_Mode_Selection; /* Internal filter mode */
bcostm 0:d83f1c8ca282 91 uint8_t HighPassFilter_CutOff_Frequency; /* High pass filter cut-off frequency */
bcostm 0:d83f1c8ca282 92 uint8_t HighPassFilter_AOI1; /* HPF_enabling/disabling for AOI function on interrupt 1 */
bcostm 0:d83f1c8ca282 93 uint8_t HighPassFilter_AOI2; /* HPF_enabling/disabling for AOI function on interrupt 2 */
bcostm 0:d83f1c8ca282 94 uint8_t HighPassFilter_Data_Sel;
bcostm 0:d83f1c8ca282 95 uint8_t HighPassFilter_Stat;
bcostm 0:d83f1c8ca282 96 }ACCELERO_FilterConfigTypeDef;
bcostm 0:d83f1c8ca282 97
bcostm 0:d83f1c8ca282 98 /**
bcostm 0:d83f1c8ca282 99 * @}
bcostm 0:d83f1c8ca282 100 */
bcostm 0:d83f1c8ca282 101
bcostm 0:d83f1c8ca282 102
bcostm 0:d83f1c8ca282 103 /**
bcostm 0:d83f1c8ca282 104 * @}
bcostm 0:d83f1c8ca282 105 */
bcostm 0:d83f1c8ca282 106
bcostm 0:d83f1c8ca282 107 /**
bcostm 0:d83f1c8ca282 108 * @}
bcostm 0:d83f1c8ca282 109 */
bcostm 0:d83f1c8ca282 110
bcostm 0:d83f1c8ca282 111 /**
bcostm 0:d83f1c8ca282 112 * @}
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 #ifdef __cplusplus
bcostm 0:d83f1c8ca282 120 }
bcostm 0:d83f1c8ca282 121 #endif
bcostm 0:d83f1c8ca282 122
bcostm 0:d83f1c8ca282 123 #endif /* __ACCELERO_H */
bcostm 0:d83f1c8ca282 124
bcostm 0:d83f1c8ca282 125 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/