BSP driver for DISCO_L496AG
Dependents: DISCO_L496AG-LCD-prova_1 DISCO_L496AG-LCD-prova_2 DISCO_L496AG-LCD-demo DISCO_L496AG-SRAM-demo
Drivers/BSP/Components/Common/idd.h@2:106c7b82e064, 2019-11-20 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:d83f1c8ca282 | 1 | /** |
bcostm | 0:d83f1c8ca282 | 2 | ****************************************************************************** |
bcostm | 0:d83f1c8ca282 | 3 | * @file idd.h |
bcostm | 0:d83f1c8ca282 | 4 | * @author MCD Application Team |
bcostm | 0:d83f1c8ca282 | 5 | * @brief This file contains all the functions prototypes for the IDD driver. |
bcostm | 0:d83f1c8ca282 | 6 | ****************************************************************************** |
bcostm | 0:d83f1c8ca282 | 7 | * @attention |
bcostm | 0:d83f1c8ca282 | 8 | * |
Jerome Coutant
2:106c7b82e064
|
9
|
* <h2><center>© 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 __IDD_H |
bcostm | 0:d83f1c8ca282 | 22 | #define __IDD_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 IDD |
bcostm | 0:d83f1c8ca282 | 40 | * @{ |
bcostm | 0:d83f1c8ca282 | 41 | */ |
bcostm | 0:d83f1c8ca282 | 42 | |
bcostm | 0:d83f1c8ca282 | 43 | /** @defgroup IDD_Exported_Types IDD Exported Types |
bcostm | 0:d83f1c8ca282 | 44 | * @{ |
bcostm | 0:d83f1c8ca282 | 45 | */ |
bcostm | 0:d83f1c8ca282 | 46 | |
bcostm | 0:d83f1c8ca282 | 47 | /** @defgroup IDD_Config_structure IDD Configuration structure |
bcostm | 0:d83f1c8ca282 | 48 | * @{ |
bcostm | 0:d83f1c8ca282 | 49 | */ |
bcostm | 0:d83f1c8ca282 | 50 | typedef struct |
bcostm | 0:d83f1c8ca282 | 51 | { |
bcostm | 0:d83f1c8ca282 | 52 | uint16_t AmpliGain; /*!< Specifies ampli gain value |
bcostm | 0:d83f1c8ca282 | 53 | */ |
bcostm | 0:d83f1c8ca282 | 54 | uint16_t VddMin; /*!< Specifies minimum MCU VDD can reach to protect MCU from reset |
bcostm | 0:d83f1c8ca282 | 55 | */ |
bcostm | 0:d83f1c8ca282 | 56 | uint16_t Shunt0Value; /*!< Specifies value of Shunt 0 if existing |
bcostm | 0:d83f1c8ca282 | 57 | */ |
bcostm | 0:d83f1c8ca282 | 58 | uint16_t Shunt1Value; /*!< Specifies value of Shunt 1 if existing |
bcostm | 0:d83f1c8ca282 | 59 | */ |
bcostm | 0:d83f1c8ca282 | 60 | uint16_t Shunt2Value; /*!< Specifies value of Shunt 2 if existing |
bcostm | 0:d83f1c8ca282 | 61 | */ |
bcostm | 0:d83f1c8ca282 | 62 | uint16_t Shunt3Value; /*!< Specifies value of Shunt 3 if existing |
bcostm | 0:d83f1c8ca282 | 63 | */ |
bcostm | 0:d83f1c8ca282 | 64 | uint16_t Shunt4Value; /*!< Specifies value of Shunt 4 if existing |
bcostm | 0:d83f1c8ca282 | 65 | */ |
bcostm | 0:d83f1c8ca282 | 66 | uint16_t Shunt0StabDelay; /*!< Specifies delay of Shunt 0 stabilization if existing |
bcostm | 0:d83f1c8ca282 | 67 | */ |
bcostm | 0:d83f1c8ca282 | 68 | uint16_t Shunt1StabDelay; /*!< Specifies delay of Shunt 1 stabilization if existing |
bcostm | 0:d83f1c8ca282 | 69 | */ |
bcostm | 0:d83f1c8ca282 | 70 | uint16_t Shunt2StabDelay; /*!< Specifies delay of Shunt 2 stabilization if existing |
bcostm | 0:d83f1c8ca282 | 71 | */ |
bcostm | 0:d83f1c8ca282 | 72 | uint16_t Shunt3StabDelay; /*!< Specifies delay of Shunt 3 stabilization if existing |
bcostm | 0:d83f1c8ca282 | 73 | */ |
bcostm | 0:d83f1c8ca282 | 74 | uint16_t Shunt4StabDelay; /*!< Specifies delay of Shunt 4 stabilization if existing |
bcostm | 0:d83f1c8ca282 | 75 | */ |
bcostm | 0:d83f1c8ca282 | 76 | uint8_t ShuntNbOnBoard; /*!< Specifies number of shunts that are present on board |
bcostm | 0:d83f1c8ca282 | 77 | This parameter can be a value of @ref IDD_shunt_number */ |
bcostm | 0:d83f1c8ca282 | 78 | uint8_t ShuntNbUsed; /*!< Specifies number of shunts used for measurement |
bcostm | 0:d83f1c8ca282 | 79 | This parameter can be a value of @ref IDD_shunt_number */ |
bcostm | 0:d83f1c8ca282 | 80 | uint8_t VrefMeasurement; /*!< Specifies if Vref is automatically measured before each Idd measurement |
bcostm | 0:d83f1c8ca282 | 81 | This parameter can be a value of @ref IDD_Vref_Measurement */ |
bcostm | 0:d83f1c8ca282 | 82 | uint8_t Calibration; /*!< Specifies if calibration is done before each Idd measurement |
bcostm | 0:d83f1c8ca282 | 83 | */ |
bcostm | 0:d83f1c8ca282 | 84 | uint8_t PreDelayUnit; /*!< Specifies Pre delay unit |
bcostm | 0:d83f1c8ca282 | 85 | This parameter can be a value of @ref IDD_PreDelay */ |
bcostm | 0:d83f1c8ca282 | 86 | uint8_t PreDelayValue; /*!< Specifies Pre delay value in selected unit |
bcostm | 0:d83f1c8ca282 | 87 | */ |
bcostm | 0:d83f1c8ca282 | 88 | uint8_t MeasureNb; /*!< Specifies number of Measure to be performed |
bcostm | 0:d83f1c8ca282 | 89 | This parameter can be a value between 1 and 256 */ |
bcostm | 0:d83f1c8ca282 | 90 | uint8_t DeltaDelayUnit; /*!< Specifies Delta delay unit |
bcostm | 0:d83f1c8ca282 | 91 | This parameter can be a value of @ref IDD_DeltaDelay */ |
bcostm | 0:d83f1c8ca282 | 92 | uint8_t DeltaDelayValue; /*!< Specifies Delta delay between 2 measures |
bcostm | 0:d83f1c8ca282 | 93 | value can be between 1 and 128 */ |
bcostm | 0:d83f1c8ca282 | 94 | }IDD_ConfigTypeDef; |
bcostm | 0:d83f1c8ca282 | 95 | /** |
bcostm | 0:d83f1c8ca282 | 96 | * @} |
bcostm | 0:d83f1c8ca282 | 97 | */ |
bcostm | 0:d83f1c8ca282 | 98 | |
bcostm | 0:d83f1c8ca282 | 99 | /** @defgroup IDD_Driver_structure IDD Driver structure |
bcostm | 0:d83f1c8ca282 | 100 | * @{ |
bcostm | 0:d83f1c8ca282 | 101 | */ |
bcostm | 0:d83f1c8ca282 | 102 | typedef struct |
bcostm | 0:d83f1c8ca282 | 103 | { |
bcostm | 0:d83f1c8ca282 | 104 | void (*Init)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 105 | void (*DeInit)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 106 | uint16_t (*ReadID)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 107 | void (*Reset)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 108 | void (*LowPower)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 109 | void (*WakeUp)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 110 | void (*Start)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 111 | void (*Config)(uint16_t,IDD_ConfigTypeDef); |
bcostm | 0:d83f1c8ca282 | 112 | void (*GetValue)(uint16_t, uint32_t *); |
bcostm | 0:d83f1c8ca282 | 113 | void (*EnableIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 114 | void (*ClearIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 115 | uint8_t (*GetITStatus)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 116 | void (*DisableIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 117 | void (*ErrorEnableIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 118 | void (*ErrorClearIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 119 | uint8_t (*ErrorGetITStatus)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 120 | void (*ErrorDisableIT)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 121 | uint8_t (*ErrorGetSrc)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 122 | uint8_t (*ErrorGetCode)(uint16_t); |
bcostm | 0:d83f1c8ca282 | 123 | }IDD_DrvTypeDef; |
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 | |
bcostm | 0:d83f1c8ca282 | 136 | /** |
bcostm | 0:d83f1c8ca282 | 137 | * @} |
bcostm | 0:d83f1c8ca282 | 138 | */ |
bcostm | 0:d83f1c8ca282 | 139 | |
bcostm | 0:d83f1c8ca282 | 140 | /** |
bcostm | 0:d83f1c8ca282 | 141 | * @} |
bcostm | 0:d83f1c8ca282 | 142 | */ |
bcostm | 0:d83f1c8ca282 | 143 | |
bcostm | 0:d83f1c8ca282 | 144 | #ifdef __cplusplus |
bcostm | 0:d83f1c8ca282 | 145 | } |
bcostm | 0:d83f1c8ca282 | 146 | #endif |
bcostm | 0:d83f1c8ca282 | 147 | |
bcostm | 0:d83f1c8ca282 | 148 | #endif /* __IDD_H */ |
bcostm | 0:d83f1c8ca282 | 149 | |
bcostm | 0:d83f1c8ca282 | 150 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |