STM32Cube BSP FW for STM32F769I-Discovery

Dependents:   mbed-os-example-blinky-5 DISCO-F769NI_TOUCHSCREEN_demo_custom_1 Datarecorder2 DISCO-F769NI_TOUCHSCREEN_demo ... more

Committer:
Jerome Coutant
Date:
Fri Feb 10 13:08:21 2017 +0100
Revision:
0:c0f3bbab73d2
STM32Cube_FW_F7_V1.5.1 BSP STM32F769I-Discovery

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 0:c0f3bbab73d2 1 /**
Jerome Coutant 0:c0f3bbab73d2 2 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 3 * @file idd.h
Jerome Coutant 0:c0f3bbab73d2 4 * @author MCD Application Team
Jerome Coutant 0:c0f3bbab73d2 5 * @version V4.0.1
Jerome Coutant 0:c0f3bbab73d2 6 * @date 21-July-2015
Jerome Coutant 0:c0f3bbab73d2 7 * @brief This file contains all the functions prototypes for the IDD driver.
Jerome Coutant 0:c0f3bbab73d2 8 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 9 * @attention
Jerome Coutant 0:c0f3bbab73d2 10 *
Jerome Coutant 0:c0f3bbab73d2 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Jerome Coutant 0:c0f3bbab73d2 12 *
Jerome Coutant 0:c0f3bbab73d2 13 * Redistribution and use in source and binary forms, with or without modification,
Jerome Coutant 0:c0f3bbab73d2 14 * are permitted provided that the following conditions are met:
Jerome Coutant 0:c0f3bbab73d2 15 * 1. Redistributions of source code must retain the above copyright notice,
Jerome Coutant 0:c0f3bbab73d2 16 * this list of conditions and the following disclaimer.
Jerome Coutant 0:c0f3bbab73d2 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Jerome Coutant 0:c0f3bbab73d2 18 * this list of conditions and the following disclaimer in the documentation
Jerome Coutant 0:c0f3bbab73d2 19 * and/or other materials provided with the distribution.
Jerome Coutant 0:c0f3bbab73d2 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Jerome Coutant 0:c0f3bbab73d2 21 * may be used to endorse or promote products derived from this software
Jerome Coutant 0:c0f3bbab73d2 22 * without specific prior written permission.
Jerome Coutant 0:c0f3bbab73d2 23 *
Jerome Coutant 0:c0f3bbab73d2 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Jerome Coutant 0:c0f3bbab73d2 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Jerome Coutant 0:c0f3bbab73d2 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Jerome Coutant 0:c0f3bbab73d2 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Jerome Coutant 0:c0f3bbab73d2 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Jerome Coutant 0:c0f3bbab73d2 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Jerome Coutant 0:c0f3bbab73d2 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Jerome Coutant 0:c0f3bbab73d2 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Jerome Coutant 0:c0f3bbab73d2 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Jerome Coutant 0:c0f3bbab73d2 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Jerome Coutant 0:c0f3bbab73d2 34 *
Jerome Coutant 0:c0f3bbab73d2 35 ******************************************************************************
Jerome Coutant 0:c0f3bbab73d2 36 */
Jerome Coutant 0:c0f3bbab73d2 37
Jerome Coutant 0:c0f3bbab73d2 38 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 39 #ifndef __IDD_H
Jerome Coutant 0:c0f3bbab73d2 40 #define __IDD_H
Jerome Coutant 0:c0f3bbab73d2 41
Jerome Coutant 0:c0f3bbab73d2 42 #ifdef __cplusplus
Jerome Coutant 0:c0f3bbab73d2 43 extern "C" {
Jerome Coutant 0:c0f3bbab73d2 44 #endif
Jerome Coutant 0:c0f3bbab73d2 45
Jerome Coutant 0:c0f3bbab73d2 46 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 0:c0f3bbab73d2 47 #include <stdint.h>
Jerome Coutant 0:c0f3bbab73d2 48
Jerome Coutant 0:c0f3bbab73d2 49 /** @addtogroup BSP
Jerome Coutant 0:c0f3bbab73d2 50 * @{
Jerome Coutant 0:c0f3bbab73d2 51 */
Jerome Coutant 0:c0f3bbab73d2 52
Jerome Coutant 0:c0f3bbab73d2 53 /** @addtogroup Components
Jerome Coutant 0:c0f3bbab73d2 54 * @{
Jerome Coutant 0:c0f3bbab73d2 55 */
Jerome Coutant 0:c0f3bbab73d2 56
Jerome Coutant 0:c0f3bbab73d2 57 /** @addtogroup IDD
Jerome Coutant 0:c0f3bbab73d2 58 * @{
Jerome Coutant 0:c0f3bbab73d2 59 */
Jerome Coutant 0:c0f3bbab73d2 60
Jerome Coutant 0:c0f3bbab73d2 61 /** @defgroup IDD_Exported_Types IDD Exported Types
Jerome Coutant 0:c0f3bbab73d2 62 * @{
Jerome Coutant 0:c0f3bbab73d2 63 */
Jerome Coutant 0:c0f3bbab73d2 64
Jerome Coutant 0:c0f3bbab73d2 65 /** @defgroup IDD_Config_structure IDD Configuration structure
Jerome Coutant 0:c0f3bbab73d2 66 * @{
Jerome Coutant 0:c0f3bbab73d2 67 */
Jerome Coutant 0:c0f3bbab73d2 68 typedef struct
Jerome Coutant 0:c0f3bbab73d2 69 {
Jerome Coutant 0:c0f3bbab73d2 70 uint16_t AmpliGain; /*!< Specifies ampli gain value
Jerome Coutant 0:c0f3bbab73d2 71 */
Jerome Coutant 0:c0f3bbab73d2 72 uint16_t VddMin; /*!< Specifies minimum MCU VDD can reach to protect MCU from reset
Jerome Coutant 0:c0f3bbab73d2 73 */
Jerome Coutant 0:c0f3bbab73d2 74 uint16_t Shunt0Value; /*!< Specifies value of Shunt 0 if existing
Jerome Coutant 0:c0f3bbab73d2 75 */
Jerome Coutant 0:c0f3bbab73d2 76 uint16_t Shunt1Value; /*!< Specifies value of Shunt 1 if existing
Jerome Coutant 0:c0f3bbab73d2 77 */
Jerome Coutant 0:c0f3bbab73d2 78 uint16_t Shunt2Value; /*!< Specifies value of Shunt 2 if existing
Jerome Coutant 0:c0f3bbab73d2 79 */
Jerome Coutant 0:c0f3bbab73d2 80 uint16_t Shunt3Value; /*!< Specifies value of Shunt 3 if existing
Jerome Coutant 0:c0f3bbab73d2 81 */
Jerome Coutant 0:c0f3bbab73d2 82 uint16_t Shunt4Value; /*!< Specifies value of Shunt 4 if existing
Jerome Coutant 0:c0f3bbab73d2 83 */
Jerome Coutant 0:c0f3bbab73d2 84 uint16_t Shunt0StabDelay; /*!< Specifies delay of Shunt 0 stabilization if existing
Jerome Coutant 0:c0f3bbab73d2 85 */
Jerome Coutant 0:c0f3bbab73d2 86 uint16_t Shunt1StabDelay; /*!< Specifies delay of Shunt 1 stabilization if existing
Jerome Coutant 0:c0f3bbab73d2 87 */
Jerome Coutant 0:c0f3bbab73d2 88 uint16_t Shunt2StabDelay; /*!< Specifies delay of Shunt 2 stabilization if existing
Jerome Coutant 0:c0f3bbab73d2 89 */
Jerome Coutant 0:c0f3bbab73d2 90 uint16_t Shunt3StabDelay; /*!< Specifies delay of Shunt 3 stabilization if existing
Jerome Coutant 0:c0f3bbab73d2 91 */
Jerome Coutant 0:c0f3bbab73d2 92 uint16_t Shunt4StabDelay; /*!< Specifies delay of Shunt 4 stabilization if existing
Jerome Coutant 0:c0f3bbab73d2 93 */
Jerome Coutant 0:c0f3bbab73d2 94 uint8_t ShuntNbOnBoard; /*!< Specifies number of shunts that are present on board
Jerome Coutant 0:c0f3bbab73d2 95 This parameter can be a value of @ref IDD_shunt_number */
Jerome Coutant 0:c0f3bbab73d2 96 uint8_t ShuntNbUsed; /*!< Specifies number of shunts used for measurement
Jerome Coutant 0:c0f3bbab73d2 97 This parameter can be a value of @ref IDD_shunt_number */
Jerome Coutant 0:c0f3bbab73d2 98 uint8_t VrefMeasurement; /*!< Specifies if Vref is automatically measured before each Idd measurement
Jerome Coutant 0:c0f3bbab73d2 99 This parameter can be a value of @ref IDD_Vref_Measurement */
Jerome Coutant 0:c0f3bbab73d2 100 uint8_t Calibration; /*!< Specifies if calibration is done before each Idd measurement
Jerome Coutant 0:c0f3bbab73d2 101 */
Jerome Coutant 0:c0f3bbab73d2 102 uint8_t PreDelayUnit; /*!< Specifies Pre delay unit
Jerome Coutant 0:c0f3bbab73d2 103 This parameter can be a value of @ref IDD_PreDelay */
Jerome Coutant 0:c0f3bbab73d2 104 uint8_t PreDelayValue; /*!< Specifies Pre delay value in selected unit
Jerome Coutant 0:c0f3bbab73d2 105 */
Jerome Coutant 0:c0f3bbab73d2 106 uint8_t MeasureNb; /*!< Specifies number of Measure to be performed
Jerome Coutant 0:c0f3bbab73d2 107 This parameter can be a value between 1 and 256 */
Jerome Coutant 0:c0f3bbab73d2 108 uint8_t DeltaDelayUnit; /*!< Specifies Delta delay unit
Jerome Coutant 0:c0f3bbab73d2 109 This parameter can be a value of @ref IDD_DeltaDelay */
Jerome Coutant 0:c0f3bbab73d2 110 uint8_t DeltaDelayValue; /*!< Specifies Delta delay between 2 measures
Jerome Coutant 0:c0f3bbab73d2 111 value can be between 1 and 128 */
Jerome Coutant 0:c0f3bbab73d2 112 }IDD_ConfigTypeDef;
Jerome Coutant 0:c0f3bbab73d2 113 /**
Jerome Coutant 0:c0f3bbab73d2 114 * @}
Jerome Coutant 0:c0f3bbab73d2 115 */
Jerome Coutant 0:c0f3bbab73d2 116
Jerome Coutant 0:c0f3bbab73d2 117 /** @defgroup IDD_Driver_structure IDD Driver structure
Jerome Coutant 0:c0f3bbab73d2 118 * @{
Jerome Coutant 0:c0f3bbab73d2 119 */
Jerome Coutant 0:c0f3bbab73d2 120 typedef struct
Jerome Coutant 0:c0f3bbab73d2 121 {
Jerome Coutant 0:c0f3bbab73d2 122 void (*Init)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 123 void (*DeInit)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 124 uint16_t (*ReadID)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 125 void (*Reset)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 126 void (*LowPower)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 127 void (*WakeUp)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 128 void (*Start)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 129 void (*Config)(uint16_t,IDD_ConfigTypeDef);
Jerome Coutant 0:c0f3bbab73d2 130 void (*GetValue)(uint16_t, uint32_t *);
Jerome Coutant 0:c0f3bbab73d2 131 void (*EnableIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 132 void (*ClearIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 133 uint8_t (*GetITStatus)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 134 void (*DisableIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 135 void (*ErrorEnableIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 136 void (*ErrorClearIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 137 uint8_t (*ErrorGetITStatus)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 138 void (*ErrorDisableIT)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 139 uint8_t (*ErrorGetSrc)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 140 uint8_t (*ErrorGetCode)(uint16_t);
Jerome Coutant 0:c0f3bbab73d2 141 }IDD_DrvTypeDef;
Jerome Coutant 0:c0f3bbab73d2 142 /**
Jerome Coutant 0:c0f3bbab73d2 143 * @}
Jerome Coutant 0:c0f3bbab73d2 144 */
Jerome Coutant 0:c0f3bbab73d2 145
Jerome Coutant 0:c0f3bbab73d2 146 /**
Jerome Coutant 0:c0f3bbab73d2 147 * @}
Jerome Coutant 0:c0f3bbab73d2 148 */
Jerome Coutant 0:c0f3bbab73d2 149
Jerome Coutant 0:c0f3bbab73d2 150 /**
Jerome Coutant 0:c0f3bbab73d2 151 * @}
Jerome Coutant 0:c0f3bbab73d2 152 */
Jerome Coutant 0:c0f3bbab73d2 153
Jerome Coutant 0:c0f3bbab73d2 154 /**
Jerome Coutant 0:c0f3bbab73d2 155 * @}
Jerome Coutant 0:c0f3bbab73d2 156 */
Jerome Coutant 0:c0f3bbab73d2 157
Jerome Coutant 0:c0f3bbab73d2 158 /**
Jerome Coutant 0:c0f3bbab73d2 159 * @}
Jerome Coutant 0:c0f3bbab73d2 160 */
Jerome Coutant 0:c0f3bbab73d2 161
Jerome Coutant 0:c0f3bbab73d2 162 #ifdef __cplusplus
Jerome Coutant 0:c0f3bbab73d2 163 }
Jerome Coutant 0:c0f3bbab73d2 164 #endif
Jerome Coutant 0:c0f3bbab73d2 165
Jerome Coutant 0:c0f3bbab73d2 166 #endif /* __IDD_H */
Jerome Coutant 0:c0f3bbab73d2 167
Jerome Coutant 0:c0f3bbab73d2 168 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/