fsdfsdf

Fork of BSP_DISCO_F469NI by ST

Committer:
bcostm
Date:
Fri Dec 18 07:32:01 2015 +0000
Revision:
0:0002c86c2220
Initial version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:0002c86c2220 1 /**
bcostm 0:0002c86c2220 2 ******************************************************************************
bcostm 0:0002c86c2220 3 * @file stm32469i_discovery.h
bcostm 0:0002c86c2220 4 * @author MCD Application Team
bcostm 0:0002c86c2220 5 * @version V1.0.1
bcostm 0:0002c86c2220 6 * @date 29-September-2015
bcostm 0:0002c86c2220 7 * @brief This file contains definitions for STM32469I-Discovery LEDs,
bcostm 0:0002c86c2220 8 * push-buttons hardware resources.
bcostm 0:0002c86c2220 9 ******************************************************************************
bcostm 0:0002c86c2220 10 * @attention
bcostm 0:0002c86c2220 11 *
bcostm 0:0002c86c2220 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
bcostm 0:0002c86c2220 13 *
bcostm 0:0002c86c2220 14 * Redistribution and use in source and binary forms, with or without modification,
bcostm 0:0002c86c2220 15 * are permitted provided that the following conditions are met:
bcostm 0:0002c86c2220 16 * 1. Redistributions of source code must retain the above copyright notice,
bcostm 0:0002c86c2220 17 * this list of conditions and the following disclaimer.
bcostm 0:0002c86c2220 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 0:0002c86c2220 19 * this list of conditions and the following disclaimer in the documentation
bcostm 0:0002c86c2220 20 * and/or other materials provided with the distribution.
bcostm 0:0002c86c2220 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bcostm 0:0002c86c2220 22 * may be used to endorse or promote products derived from this software
bcostm 0:0002c86c2220 23 * without specific prior written permission.
bcostm 0:0002c86c2220 24 *
bcostm 0:0002c86c2220 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bcostm 0:0002c86c2220 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bcostm 0:0002c86c2220 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bcostm 0:0002c86c2220 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bcostm 0:0002c86c2220 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bcostm 0:0002c86c2220 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bcostm 0:0002c86c2220 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bcostm 0:0002c86c2220 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bcostm 0:0002c86c2220 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bcostm 0:0002c86c2220 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 0:0002c86c2220 35 *
bcostm 0:0002c86c2220 36 ******************************************************************************
bcostm 0:0002c86c2220 37 */
bcostm 0:0002c86c2220 38
bcostm 0:0002c86c2220 39 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 0:0002c86c2220 40 #ifndef __STM32469I_DISCOVERY_H
bcostm 0:0002c86c2220 41 #define __STM32469I_DISCOVERY_H
bcostm 0:0002c86c2220 42
bcostm 0:0002c86c2220 43 #ifdef __cplusplus
bcostm 0:0002c86c2220 44 extern "C" {
bcostm 0:0002c86c2220 45 #endif
bcostm 0:0002c86c2220 46
bcostm 0:0002c86c2220 47 /* Includes ------------------------------------------------------------------*/
bcostm 0:0002c86c2220 48 #include "stm32f4xx_hal.h"
bcostm 0:0002c86c2220 49
bcostm 0:0002c86c2220 50 // mbed
bcostm 0:0002c86c2220 51 void wait_ms(int ms);
bcostm 0:0002c86c2220 52
bcostm 0:0002c86c2220 53 /** @addtogroup BSP
bcostm 0:0002c86c2220 54 * @{
bcostm 0:0002c86c2220 55 */
bcostm 0:0002c86c2220 56
bcostm 0:0002c86c2220 57 /** @addtogroup STM32469I_Discovery
bcostm 0:0002c86c2220 58 * @{
bcostm 0:0002c86c2220 59 */
bcostm 0:0002c86c2220 60
bcostm 0:0002c86c2220 61 /** @defgroup STM32469I_Discovery_LOW_LEVEL STM32469I-Discovery LOW LEVEL
bcostm 0:0002c86c2220 62 * @{
bcostm 0:0002c86c2220 63 */
bcostm 0:0002c86c2220 64
bcostm 0:0002c86c2220 65 /** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Types STM32469I Discovery Low Level Exported Types
bcostm 0:0002c86c2220 66 * @{
bcostm 0:0002c86c2220 67 */
bcostm 0:0002c86c2220 68
bcostm 0:0002c86c2220 69 /** @brief Led_TypeDef
bcostm 0:0002c86c2220 70 * STM32469I_Discovery board leds definitions.
bcostm 0:0002c86c2220 71 */
bcostm 0:0002c86c2220 72 typedef enum
bcostm 0:0002c86c2220 73 {
bcostm 0:0002c86c2220 74 DISCO_LED1 = 0,
bcostm 0:0002c86c2220 75 DISCO_LED_GREEN = DISCO_LED1,
bcostm 0:0002c86c2220 76 DISCO_LED2 = 1,
bcostm 0:0002c86c2220 77 DISCO_LED_ORANGE = DISCO_LED2,
bcostm 0:0002c86c2220 78 DISCO_LED3 = 2,
bcostm 0:0002c86c2220 79 DISCO_LED_RED = DISCO_LED3,
bcostm 0:0002c86c2220 80 DISCO_LED4 = 3,
bcostm 0:0002c86c2220 81 DISCO_LED_BLUE = DISCO_LED4
bcostm 0:0002c86c2220 82
bcostm 0:0002c86c2220 83 } Led_TypeDef;
bcostm 0:0002c86c2220 84
bcostm 0:0002c86c2220 85 /** @brief Button_TypeDef
bcostm 0:0002c86c2220 86 * STM32469I_Discovery board Buttons definitions.
bcostm 0:0002c86c2220 87 */
bcostm 0:0002c86c2220 88 typedef enum
bcostm 0:0002c86c2220 89 {
bcostm 0:0002c86c2220 90 BUTTON_WAKEUP = 0
bcostm 0:0002c86c2220 91 } Button_TypeDef;
bcostm 0:0002c86c2220 92
bcostm 0:0002c86c2220 93 #define BUTTON_USER BUTTON_WAKEUP
bcostm 0:0002c86c2220 94
bcostm 0:0002c86c2220 95 /** @brief ButtonMode_TypeDef
bcostm 0:0002c86c2220 96 * STM32469I_Discovery board Buttons Modes definitions.
bcostm 0:0002c86c2220 97 */
bcostm 0:0002c86c2220 98 typedef enum
bcostm 0:0002c86c2220 99 {
bcostm 0:0002c86c2220 100 BUTTON_MODE_GPIO = 0,
bcostm 0:0002c86c2220 101 BUTTON_MODE_EXTI = 1
bcostm 0:0002c86c2220 102
bcostm 0:0002c86c2220 103 } ButtonMode_TypeDef;
bcostm 0:0002c86c2220 104
bcostm 0:0002c86c2220 105 /** @addtogroup Exported_types
bcostm 0:0002c86c2220 106 * @{
bcostm 0:0002c86c2220 107 */
bcostm 0:0002c86c2220 108 typedef enum
bcostm 0:0002c86c2220 109 {
bcostm 0:0002c86c2220 110 PB_SET = 0,
bcostm 0:0002c86c2220 111 PB_RESET = !PB_SET
bcostm 0:0002c86c2220 112 } ButtonValue_TypeDef;
bcostm 0:0002c86c2220 113
bcostm 0:0002c86c2220 114
bcostm 0:0002c86c2220 115 /** @brief DISCO_Status_TypeDef
bcostm 0:0002c86c2220 116 * STM32469I_DISCO board Status return possible values.
bcostm 0:0002c86c2220 117 */
bcostm 0:0002c86c2220 118 typedef enum
bcostm 0:0002c86c2220 119 {
bcostm 0:0002c86c2220 120 DISCO_OK = 0,
bcostm 0:0002c86c2220 121 DISCO_ERROR = 1
bcostm 0:0002c86c2220 122
bcostm 0:0002c86c2220 123 } DISCO_Status_TypeDef;
bcostm 0:0002c86c2220 124
bcostm 0:0002c86c2220 125 /**
bcostm 0:0002c86c2220 126 * @}
bcostm 0:0002c86c2220 127 */
bcostm 0:0002c86c2220 128
bcostm 0:0002c86c2220 129 /** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Constants STM32469I Discovery Low Level Exported Constants
bcostm 0:0002c86c2220 130 * @{
bcostm 0:0002c86c2220 131 */
bcostm 0:0002c86c2220 132
bcostm 0:0002c86c2220 133
bcostm 0:0002c86c2220 134 /** @addtogroup STM32469I_Discovery_LOW_LEVEL_LED STM32469I Discovery Low Level Led
bcostm 0:0002c86c2220 135 * @{
bcostm 0:0002c86c2220 136 */
bcostm 0:0002c86c2220 137 /* Always four leds for all revisions of Discovery boards */
bcostm 0:0002c86c2220 138 #define LEDn ((uint8_t)4)
bcostm 0:0002c86c2220 139
bcostm 0:0002c86c2220 140
bcostm 0:0002c86c2220 141 /* 4 Leds are connected to MCU directly on PG6, PD4, PD5, PK3 */
bcostm 0:0002c86c2220 142 #define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
bcostm 0:0002c86c2220 143 #define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
bcostm 0:0002c86c2220 144 #define LED3_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
bcostm 0:0002c86c2220 145 #define LED4_GPIO_PORT ((GPIO_TypeDef*)GPIOK)
bcostm 0:0002c86c2220 146
bcostm 0:0002c86c2220 147 #define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
bcostm 0:0002c86c2220 148 #define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
bcostm 0:0002c86c2220 149 #define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
bcostm 0:0002c86c2220 150 #define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
bcostm 0:0002c86c2220 151 #define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
bcostm 0:0002c86c2220 152 #define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
bcostm 0:0002c86c2220 153 #define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
bcostm 0:0002c86c2220 154 #define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
bcostm 0:0002c86c2220 155
bcostm 0:0002c86c2220 156 #define LED1_PIN ((uint32_t)GPIO_PIN_6)
bcostm 0:0002c86c2220 157 #define LED2_PIN ((uint32_t)GPIO_PIN_4)
bcostm 0:0002c86c2220 158 #define LED3_PIN ((uint32_t)GPIO_PIN_5)
bcostm 0:0002c86c2220 159 #define LED4_PIN ((uint32_t)GPIO_PIN_3)
bcostm 0:0002c86c2220 160 /**
bcostm 0:0002c86c2220 161 * @}
bcostm 0:0002c86c2220 162 */
bcostm 0:0002c86c2220 163
bcostm 0:0002c86c2220 164 /** @addtogroup STM32469I_Discovery_LOW_LEVEL_BUTTON STM32469I Discovery Low Level Button
bcostm 0:0002c86c2220 165 * @{
bcostm 0:0002c86c2220 166 */
bcostm 0:0002c86c2220 167 /* Only one User/Wakeup button */
bcostm 0:0002c86c2220 168 #define BUTTONn ((uint8_t)1)
bcostm 0:0002c86c2220 169
bcostm 0:0002c86c2220 170 /**
bcostm 0:0002c86c2220 171 * @brief Wakeup push-button
bcostm 0:0002c86c2220 172 */
bcostm 0:0002c86c2220 173 #define WAKEUP_BUTTON_PIN GPIO_PIN_0
bcostm 0:0002c86c2220 174 #define WAKEUP_BUTTON_GPIO_PORT GPIOA
bcostm 0:0002c86c2220 175 #define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
bcostm 0:0002c86c2220 176 #define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
bcostm 0:0002c86c2220 177 #define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
bcostm 0:0002c86c2220 178
bcostm 0:0002c86c2220 179 /* Define the USER button as an alias of the Wakeup button */
bcostm 0:0002c86c2220 180 #define USER_BUTTON_PIN WAKEUP_BUTTON_PIN
bcostm 0:0002c86c2220 181 #define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT
bcostm 0:0002c86c2220 182 #define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE()
bcostm 0:0002c86c2220 183 #define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE()
bcostm 0:0002c86c2220 184 #define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn
bcostm 0:0002c86c2220 185
bcostm 0:0002c86c2220 186 #define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
bcostm 0:0002c86c2220 187
bcostm 0:0002c86c2220 188 /**
bcostm 0:0002c86c2220 189 * @}
bcostm 0:0002c86c2220 190 */
bcostm 0:0002c86c2220 191
bcostm 0:0002c86c2220 192 /**
bcostm 0:0002c86c2220 193 * @brief Discovery Pins definition
bcostm 0:0002c86c2220 194 * TODO : to be modified/reviewed
bcostm 0:0002c86c2220 195 */
bcostm 0:0002c86c2220 196 #define AUDIO_INT_PIN GPIO_PIN_7
bcostm 0:0002c86c2220 197 #define AUDIO_INT_PORT GPIOB
bcostm 0:0002c86c2220 198 #define AUDIO_INT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
bcostm 0:0002c86c2220 199
bcostm 0:0002c86c2220 200 #define OTG_FS1_OVER_CURRENT_PIN GPIO_PIN_7
bcostm 0:0002c86c2220 201 #define OTG_FS1_OVER_CURRENT_PORT GPIOB
bcostm 0:0002c86c2220 202 #define OTG_FS1_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
bcostm 0:0002c86c2220 203
bcostm 0:0002c86c2220 204 #define OTG_FS1_POWER_SWITCH_PIN GPIO_PIN_2
bcostm 0:0002c86c2220 205 #define OTG_FS1_POWER_SWITCH_PORT GPIOB
bcostm 0:0002c86c2220 206 #define OTG_FS1_POWER_SWITCH_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
bcostm 0:0002c86c2220 207
bcostm 0:0002c86c2220 208 /**
bcostm 0:0002c86c2220 209 * @brief SD-detect signal
bcostm 0:0002c86c2220 210 */
bcostm 0:0002c86c2220 211 #define SD_DETECT_PIN ((uint32_t)GPIO_PIN_2)
bcostm 0:0002c86c2220 212 #define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
bcostm 0:0002c86c2220 213 #define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
bcostm 0:0002c86c2220 214 #define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
bcostm 0:0002c86c2220 215 #define SD_DETECT_EXTI_IRQn EXTI2_IRQn
bcostm 0:0002c86c2220 216
bcostm 0:0002c86c2220 217 /**
bcostm 0:0002c86c2220 218 * @brief TS_INT signal from TouchScreen when it is configured in interrupt mode
bcostm 0:0002c86c2220 219 * GPIOJ5 is used for that purpose on Manta Dragon Discovery board
bcostm 0:0002c86c2220 220 */
bcostm 0:0002c86c2220 221 #define TS_INT_PIN ((uint32_t)GPIO_PIN_5)
bcostm 0:0002c86c2220 222 #define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
bcostm 0:0002c86c2220 223 #define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE()
bcostm 0:0002c86c2220 224 #define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE()
bcostm 0:0002c86c2220 225 #define TS_INT_EXTI_IRQn EXTI9_5_IRQn
bcostm 0:0002c86c2220 226
bcostm 0:0002c86c2220 227 /**
bcostm 0:0002c86c2220 228 * @brief TouchScreen FT6206 Slave I2C address
bcostm 0:0002c86c2220 229 */
bcostm 0:0002c86c2220 230 #define TS_I2C_ADDRESS ((uint16_t)0x54)
bcostm 0:0002c86c2220 231
bcostm 0:0002c86c2220 232
bcostm 0:0002c86c2220 233 /**
bcostm 0:0002c86c2220 234 * @brief Audio I2C Slave address
bcostm 0:0002c86c2220 235 */
bcostm 0:0002c86c2220 236 #define AUDIO_I2C_ADDRESS ((uint16_t)0x94)
bcostm 0:0002c86c2220 237
bcostm 0:0002c86c2220 238 /**
bcostm 0:0002c86c2220 239 * @brief EEPROM I2C Slave address 1
bcostm 0:0002c86c2220 240 */
bcostm 0:0002c86c2220 241 #define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0)
bcostm 0:0002c86c2220 242
bcostm 0:0002c86c2220 243 /**
bcostm 0:0002c86c2220 244 * @brief EEPROM I2C Slave address 2
bcostm 0:0002c86c2220 245 */
bcostm 0:0002c86c2220 246 #define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6)
bcostm 0:0002c86c2220 247
bcostm 0:0002c86c2220 248 /**
bcostm 0:0002c86c2220 249 * @brief I2C clock speed configuration (in Hz)
bcostm 0:0002c86c2220 250 * WARNING:
bcostm 0:0002c86c2220 251 * Make sure that this define is not already declared in other files
bcostm 0:0002c86c2220 252 * It can be used in parallel by other modules.
bcostm 0:0002c86c2220 253 */
bcostm 0:0002c86c2220 254 #ifndef I2C1_SCL_FREQ_KHZ
bcostm 0:0002c86c2220 255 #define I2C1_SCL_FREQ_KHZ 400000 /*!< f(I2C_SCL) = 400 kHz */
bcostm 0:0002c86c2220 256 #endif /* I2C1_SCL_FREQ_KHZ */
bcostm 0:0002c86c2220 257
bcostm 0:0002c86c2220 258 /**
bcostm 0:0002c86c2220 259 * @brief User can use this section to tailor I2C1/I2C1 instance used and associated
bcostm 0:0002c86c2220 260 * resources.
bcostm 0:0002c86c2220 261 * Definition for I2C1 clock resources
bcostm 0:0002c86c2220 262 */
bcostm 0:0002c86c2220 263 #define DISCO_I2C1 I2C1
bcostm 0:0002c86c2220 264 #define DISCO_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
bcostm 0:0002c86c2220 265 #define DISCO_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
bcostm 0:0002c86c2220 266 #define DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
bcostm 0:0002c86c2220 267
bcostm 0:0002c86c2220 268 #define DISCO_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
bcostm 0:0002c86c2220 269 #define DISCO_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
bcostm 0:0002c86c2220 270
bcostm 0:0002c86c2220 271 /** @brief Definition for I2C1 Pins
bcostm 0:0002c86c2220 272 */
bcostm 0:0002c86c2220 273 #define DISCO_I2C1_SCL_PIN GPIO_PIN_8 /*!< PB8 */
bcostm 0:0002c86c2220 274 #define DISCO_I2C1_SCL_SDA_GPIO_PORT GPIOB
bcostm 0:0002c86c2220 275 #define DISCO_I2C1_SCL_SDA_AF GPIO_AF4_I2C1
bcostm 0:0002c86c2220 276 #define DISCO_I2C1_SDA_PIN GPIO_PIN_9 /*!< PB9 */
bcostm 0:0002c86c2220 277
bcostm 0:0002c86c2220 278 /** @brief Definition of I2C interrupt requests
bcostm 0:0002c86c2220 279 */
bcostm 0:0002c86c2220 280 #define DISCO_I2C1_EV_IRQn I2C1_EV_IRQn
bcostm 0:0002c86c2220 281 #define DISCO_I2C1_ER_IRQn I2C1_ER_IRQn
bcostm 0:0002c86c2220 282
bcostm 0:0002c86c2220 283
bcostm 0:0002c86c2220 284
bcostm 0:0002c86c2220 285 /**
bcostm 0:0002c86c2220 286 * @brief I2C2 clock speed configuration (in Hz)
bcostm 0:0002c86c2220 287 * WARNING:
bcostm 0:0002c86c2220 288 * Make sure that this define is not already declared in other files
bcostm 0:0002c86c2220 289 * It can be used in parallel by other modules.
bcostm 0:0002c86c2220 290 */
bcostm 0:0002c86c2220 291 #ifndef I2C2_SCL_FREQ_KHZ
bcostm 0:0002c86c2220 292 #define I2C2_SCL_FREQ_KHZ 100000 /*!< f(I2C2_SCL) < 100 kHz */
bcostm 0:0002c86c2220 293 #endif /* I2C2_SCL_FREQ_KHZ */
bcostm 0:0002c86c2220 294
bcostm 0:0002c86c2220 295 /**
bcostm 0:0002c86c2220 296 * @brief User can use this section to tailor I2C2/I2C2 instance used and associated
bcostm 0:0002c86c2220 297 * resources (audio codec).
bcostm 0:0002c86c2220 298 * Definition for I2C2 clock resources
bcostm 0:0002c86c2220 299 */
bcostm 0:0002c86c2220 300 #define DISCO_I2C2 I2C2
bcostm 0:0002c86c2220 301 #define DISCO_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
bcostm 0:0002c86c2220 302 #define DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
bcostm 0:0002c86c2220 303
bcostm 0:0002c86c2220 304 #define DISCO_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET()
bcostm 0:0002c86c2220 305 #define DISCO_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET()
bcostm 0:0002c86c2220 306
bcostm 0:0002c86c2220 307 /** @brief Definition for I2C2 Pins
bcostm 0:0002c86c2220 308 */
bcostm 0:0002c86c2220 309 #define DISCO_I2C2_SCL_PIN GPIO_PIN_4 /*!< PH4 */
bcostm 0:0002c86c2220 310 #define DISCO_I2C2_SCL_SDA_GPIO_PORT GPIOH
bcostm 0:0002c86c2220 311 #define DISCO_I2C2_SCL_SDA_AF GPIO_AF4_I2C2
bcostm 0:0002c86c2220 312 #define DISCO_I2C2_SDA_PIN GPIO_PIN_5 /*!< PH5 */
bcostm 0:0002c86c2220 313
bcostm 0:0002c86c2220 314 /** @brief Definition of I2C2 interrupt requests
bcostm 0:0002c86c2220 315 */
bcostm 0:0002c86c2220 316 #define DISCO_I2C2_EV_IRQn I2C2_EV_IRQn
bcostm 0:0002c86c2220 317 #define DISCO_I2C2_ER_IRQn I2C2_ER_IRQn
bcostm 0:0002c86c2220 318
bcostm 0:0002c86c2220 319
bcostm 0:0002c86c2220 320 /**
bcostm 0:0002c86c2220 321 * @}
bcostm 0:0002c86c2220 322 */
bcostm 0:0002c86c2220 323
bcostm 0:0002c86c2220 324 /** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Macros STM32469I Discovery Low Level Exported Macros
bcostm 0:0002c86c2220 325 * @{
bcostm 0:0002c86c2220 326 */
bcostm 0:0002c86c2220 327 /**
bcostm 0:0002c86c2220 328 * @}
bcostm 0:0002c86c2220 329 */
bcostm 0:0002c86c2220 330
bcostm 0:0002c86c2220 331 /** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Functions STM32469I Discovery Low Level Exported Functions
bcostm 0:0002c86c2220 332 * @{
bcostm 0:0002c86c2220 333 */
bcostm 0:0002c86c2220 334 uint32_t BSP_GetVersion(void);
bcostm 0:0002c86c2220 335 void BSP_LED_Init(Led_TypeDef Led);
bcostm 0:0002c86c2220 336 void BSP_LED_DeInit(Led_TypeDef Led);
bcostm 0:0002c86c2220 337 void BSP_LED_On(Led_TypeDef Led);
bcostm 0:0002c86c2220 338 void BSP_LED_Off(Led_TypeDef Led);
bcostm 0:0002c86c2220 339 void BSP_LED_Toggle(Led_TypeDef Led);
bcostm 0:0002c86c2220 340 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
bcostm 0:0002c86c2220 341 void BSP_PB_DeInit(Button_TypeDef Button);
bcostm 0:0002c86c2220 342 uint32_t BSP_PB_GetState(Button_TypeDef Button);
bcostm 0:0002c86c2220 343
bcostm 0:0002c86c2220 344 /**
bcostm 0:0002c86c2220 345 * @}
bcostm 0:0002c86c2220 346 */
bcostm 0:0002c86c2220 347
bcostm 0:0002c86c2220 348 /**
bcostm 0:0002c86c2220 349 * @}
bcostm 0:0002c86c2220 350 */
bcostm 0:0002c86c2220 351
bcostm 0:0002c86c2220 352 /**
bcostm 0:0002c86c2220 353 * @}
bcostm 0:0002c86c2220 354 */
bcostm 0:0002c86c2220 355
bcostm 0:0002c86c2220 356 /**
bcostm 0:0002c86c2220 357 * @}
bcostm 0:0002c86c2220 358 */
bcostm 0:0002c86c2220 359
bcostm 0:0002c86c2220 360 /**
bcostm 0:0002c86c2220 361 * @}
bcostm 0:0002c86c2220 362 */
bcostm 0:0002c86c2220 363
bcostm 0:0002c86c2220 364
bcostm 0:0002c86c2220 365 #ifdef __cplusplus
bcostm 0:0002c86c2220 366 }
bcostm 0:0002c86c2220 367 #endif
bcostm 0:0002c86c2220 368
bcostm 0:0002c86c2220 369 #endif /* __STM32469I_DISCOVERY_H */
bcostm 0:0002c86c2220 370
bcostm 0:0002c86c2220 371 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/