xref: /btstack/port/stm32-f4discovery-usb/bsp/stm32f4_discovery.h (revision f763b8ceaf9411e1c5e999bc4423cdc8accb9a47)
1*f763b8ceSMatthias Ringwald /**
2*f763b8ceSMatthias Ringwald   ******************************************************************************
3*f763b8ceSMatthias Ringwald   * @file    stm32f4_discovery.h
4*f763b8ceSMatthias Ringwald   * @author  MCD Application Team
5*f763b8ceSMatthias Ringwald   * @version V2.1.2
6*f763b8ceSMatthias Ringwald   * @date    27-January-2017
7*f763b8ceSMatthias Ringwald   * @brief   This file contains definitions for STM32F4-Discovery Kit's Leds and
8*f763b8ceSMatthias Ringwald   *          push-button hardware resources.
9*f763b8ceSMatthias Ringwald   ******************************************************************************
10*f763b8ceSMatthias Ringwald   * @attention
11*f763b8ceSMatthias Ringwald   *
12*f763b8ceSMatthias Ringwald   * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
13*f763b8ceSMatthias Ringwald   *
14*f763b8ceSMatthias Ringwald   * Redistribution and use in source and binary forms, with or without modification,
15*f763b8ceSMatthias Ringwald   * are permitted provided that the following conditions are met:
16*f763b8ceSMatthias Ringwald   *   1. Redistributions of source code must retain the above copyright notice,
17*f763b8ceSMatthias Ringwald   *      this list of conditions and the following disclaimer.
18*f763b8ceSMatthias Ringwald   *   2. Redistributions in binary form must reproduce the above copyright notice,
19*f763b8ceSMatthias Ringwald   *      this list of conditions and the following disclaimer in the documentation
20*f763b8ceSMatthias Ringwald   *      and/or other materials provided with the distribution.
21*f763b8ceSMatthias Ringwald   *   3. Neither the name of STMicroelectronics nor the names of its contributors
22*f763b8ceSMatthias Ringwald   *      may be used to endorse or promote products derived from this software
23*f763b8ceSMatthias Ringwald   *      without specific prior written permission.
24*f763b8ceSMatthias Ringwald   *
25*f763b8ceSMatthias Ringwald   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26*f763b8ceSMatthias Ringwald   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27*f763b8ceSMatthias Ringwald   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28*f763b8ceSMatthias Ringwald   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29*f763b8ceSMatthias Ringwald   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30*f763b8ceSMatthias Ringwald   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31*f763b8ceSMatthias Ringwald   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32*f763b8ceSMatthias Ringwald   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33*f763b8ceSMatthias Ringwald   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34*f763b8ceSMatthias Ringwald   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35*f763b8ceSMatthias Ringwald   *
36*f763b8ceSMatthias Ringwald   ******************************************************************************
37*f763b8ceSMatthias Ringwald   */
38*f763b8ceSMatthias Ringwald 
39*f763b8ceSMatthias Ringwald /* Define to prevent recursive inclusion -------------------------------------*/
40*f763b8ceSMatthias Ringwald #ifndef __STM32F4_DISCOVERY_H
41*f763b8ceSMatthias Ringwald #define __STM32F4_DISCOVERY_H
42*f763b8ceSMatthias Ringwald 
43*f763b8ceSMatthias Ringwald #ifdef __cplusplus
44*f763b8ceSMatthias Ringwald  extern "C" {
45*f763b8ceSMatthias Ringwald #endif
46*f763b8ceSMatthias Ringwald 
47*f763b8ceSMatthias Ringwald /* Includes ------------------------------------------------------------------*/
48*f763b8ceSMatthias Ringwald #include "stm32f4xx_hal.h"
49*f763b8ceSMatthias Ringwald 
50*f763b8ceSMatthias Ringwald /** @addtogroup BSP
51*f763b8ceSMatthias Ringwald   * @{
52*f763b8ceSMatthias Ringwald   */
53*f763b8ceSMatthias Ringwald 
54*f763b8ceSMatthias Ringwald /** @addtogroup STM32F4_DISCOVERY
55*f763b8ceSMatthias Ringwald   * @{
56*f763b8ceSMatthias Ringwald   */
57*f763b8ceSMatthias Ringwald 
58*f763b8ceSMatthias Ringwald /** @addtogroup STM32F4_DISCOVERY_LOW_LEVEL
59*f763b8ceSMatthias Ringwald   * @{
60*f763b8ceSMatthias Ringwald   */
61*f763b8ceSMatthias Ringwald 
62*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_Exported_Types STM32F4 DISCOVERY LOW LEVEL_Exported_Types
63*f763b8ceSMatthias Ringwald   * @{
64*f763b8ceSMatthias Ringwald   */
65*f763b8ceSMatthias Ringwald typedef enum
66*f763b8ceSMatthias Ringwald {
67*f763b8ceSMatthias Ringwald   LED4 = 0,
68*f763b8ceSMatthias Ringwald   LED3 = 1,
69*f763b8ceSMatthias Ringwald   LED5 = 2,
70*f763b8ceSMatthias Ringwald   LED6 = 3
71*f763b8ceSMatthias Ringwald } Led_TypeDef;
72*f763b8ceSMatthias Ringwald 
73*f763b8ceSMatthias Ringwald typedef enum
74*f763b8ceSMatthias Ringwald {
75*f763b8ceSMatthias Ringwald   BUTTON_KEY = 0,
76*f763b8ceSMatthias Ringwald } Button_TypeDef;
77*f763b8ceSMatthias Ringwald 
78*f763b8ceSMatthias Ringwald typedef enum
79*f763b8ceSMatthias Ringwald {
80*f763b8ceSMatthias Ringwald   BUTTON_MODE_GPIO = 0,
81*f763b8ceSMatthias Ringwald   BUTTON_MODE_EXTI = 1
82*f763b8ceSMatthias Ringwald } ButtonMode_TypeDef;
83*f763b8ceSMatthias Ringwald /**
84*f763b8ceSMatthias Ringwald   * @}
85*f763b8ceSMatthias Ringwald   */
86*f763b8ceSMatthias Ringwald 
87*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_Exported_Constants STM32F4 DISCOVERY LOW LEVEL Exported Constants
88*f763b8ceSMatthias Ringwald   * @{
89*f763b8ceSMatthias Ringwald   */
90*f763b8ceSMatthias Ringwald 
91*f763b8ceSMatthias Ringwald /**
92*f763b8ceSMatthias Ringwald * @brief  Define for STM32F4_DISCOVERY board
93*f763b8ceSMatthias Ringwald */
94*f763b8ceSMatthias Ringwald #if !defined (USE_STM32F4_DISCO)
95*f763b8ceSMatthias Ringwald  #define USE_STM32F4_DISCO
96*f763b8ceSMatthias Ringwald #endif
97*f763b8ceSMatthias Ringwald 
98*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_LED STM32F4 DISCOVERY LOW LEVEL LED
99*f763b8ceSMatthias Ringwald   * @{
100*f763b8ceSMatthias Ringwald   */
101*f763b8ceSMatthias Ringwald #define LEDn                             4
102*f763b8ceSMatthias Ringwald 
103*f763b8ceSMatthias Ringwald #define LED4_PIN                         GPIO_PIN_12
104*f763b8ceSMatthias Ringwald #define LED4_GPIO_PORT                   GPIOD
105*f763b8ceSMatthias Ringwald #define LED4_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
106*f763b8ceSMatthias Ringwald #define LED4_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
107*f763b8ceSMatthias Ringwald 
108*f763b8ceSMatthias Ringwald #define LED3_PIN                         GPIO_PIN_13
109*f763b8ceSMatthias Ringwald #define LED3_GPIO_PORT                   GPIOD
110*f763b8ceSMatthias Ringwald #define LED3_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
111*f763b8ceSMatthias Ringwald #define LED3_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
112*f763b8ceSMatthias Ringwald 
113*f763b8ceSMatthias Ringwald #define LED5_PIN                         GPIO_PIN_14
114*f763b8ceSMatthias Ringwald #define LED5_GPIO_PORT                   GPIOD
115*f763b8ceSMatthias Ringwald #define LED5_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
116*f763b8ceSMatthias Ringwald #define LED5_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
117*f763b8ceSMatthias Ringwald 
118*f763b8ceSMatthias Ringwald #define LED6_PIN                         GPIO_PIN_15
119*f763b8ceSMatthias Ringwald #define LED6_GPIO_PORT                   GPIOD
120*f763b8ceSMatthias Ringwald #define LED6_GPIO_CLK_ENABLE()           __HAL_RCC_GPIOD_CLK_ENABLE()
121*f763b8ceSMatthias Ringwald #define LED6_GPIO_CLK_DISABLE()          __HAL_RCC_GPIOD_CLK_DISABLE()
122*f763b8ceSMatthias Ringwald 
123*f763b8ceSMatthias Ringwald #define LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED4_GPIO_CLK_ENABLE(); else \
124*f763b8ceSMatthias Ringwald                                            if((__INDEX__) == 1) LED3_GPIO_CLK_ENABLE(); else \
125*f763b8ceSMatthias Ringwald                                            if((__INDEX__) == 2) LED5_GPIO_CLK_ENABLE(); else \
126*f763b8ceSMatthias Ringwald                                            if((__INDEX__) == 3) LED6_GPIO_CLK_ENABLE(); \
127*f763b8ceSMatthias Ringwald                                            }while(0)
128*f763b8ceSMatthias Ringwald 
129*f763b8ceSMatthias Ringwald #define LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED4_GPIO_CLK_DISABLE(); else \
130*f763b8ceSMatthias Ringwald                                             if((__INDEX__) == 1) LED3_GPIO_CLK_DISABLE(); else \
131*f763b8ceSMatthias Ringwald                                             if((__INDEX__) == 2) LED5_GPIO_CLK_DISABLE(); else \
132*f763b8ceSMatthias Ringwald                                             if((__INDEX__) == 3) LED6_GPIO_CLK_DISABLE(); \
133*f763b8ceSMatthias Ringwald                                             }while(0)
134*f763b8ceSMatthias Ringwald /**
135*f763b8ceSMatthias Ringwald   * @}
136*f763b8ceSMatthias Ringwald   */
137*f763b8ceSMatthias Ringwald 
138*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_BUTTON STM32F4 DISCOVERY LOW LEVEL BUTTON
139*f763b8ceSMatthias Ringwald   * @{
140*f763b8ceSMatthias Ringwald   */
141*f763b8ceSMatthias Ringwald #define BUTTONn                          1
142*f763b8ceSMatthias Ringwald 
143*f763b8ceSMatthias Ringwald /**
144*f763b8ceSMatthias Ringwald  * @brief Wakeup push-button
145*f763b8ceSMatthias Ringwald  */
146*f763b8ceSMatthias Ringwald #define KEY_BUTTON_PIN                GPIO_PIN_0
147*f763b8ceSMatthias Ringwald #define KEY_BUTTON_GPIO_PORT          GPIOA
148*f763b8ceSMatthias Ringwald #define KEY_BUTTON_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOA_CLK_ENABLE()
149*f763b8ceSMatthias Ringwald #define KEY_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
150*f763b8ceSMatthias Ringwald #define KEY_BUTTON_EXTI_IRQn          EXTI0_IRQn
151*f763b8ceSMatthias Ringwald 
152*f763b8ceSMatthias Ringwald #define BUTTONx_GPIO_CLK_ENABLE(__INDEX__)    do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_ENABLE(); \
153*f763b8ceSMatthias Ringwald                                                 }while(0)
154*f763b8ceSMatthias Ringwald 
155*f763b8ceSMatthias Ringwald #define BUTTONx_GPIO_CLK_DISABLE(__INDEX__)    do{if((__INDEX__) == 0) KEY_BUTTON_GPIO_CLK_DISABLE(); \
156*f763b8ceSMatthias Ringwald                                                  }while(0)
157*f763b8ceSMatthias Ringwald /**
158*f763b8ceSMatthias Ringwald   * @}
159*f763b8ceSMatthias Ringwald   */
160*f763b8ceSMatthias Ringwald 
161*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_BUS STM32F4 DISCOVERY LOW LEVEL BUS
162*f763b8ceSMatthias Ringwald   * @{
163*f763b8ceSMatthias Ringwald   */
164*f763b8ceSMatthias Ringwald 
165*f763b8ceSMatthias Ringwald /*############################### SPI1 #######################################*/
166*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx                              SPI1
167*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_CLK_ENABLE()                 __HAL_RCC_SPI1_CLK_ENABLE()
168*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_GPIO_PORT                    GPIOA                      /* GPIOA */
169*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_AF                           GPIO_AF5_SPI1
170*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_GPIO_CLK_ENABLE()            __HAL_RCC_GPIOA_CLK_ENABLE()
171*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_GPIO_CLK_DISABLE()           __HAL_RCC_GPIOA_CLK_DISABLE()
172*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_SCK_PIN                      GPIO_PIN_5                 /* PA.05 */
173*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_MISO_PIN                     GPIO_PIN_6                 /* PA.06 */
174*f763b8ceSMatthias Ringwald #define DISCOVERY_SPIx_MOSI_PIN                     GPIO_PIN_7                 /* PA.07 */
175*f763b8ceSMatthias Ringwald 
176*f763b8ceSMatthias Ringwald /* Maximum Timeout values for flags waiting loops. These timeouts are not based
177*f763b8ceSMatthias Ringwald    on accurate values, they just guarantee that the application will not remain
178*f763b8ceSMatthias Ringwald    stuck if the SPI communication is corrupted.
179*f763b8ceSMatthias Ringwald    You may modify these timeout values depending on CPU frequency and application
180*f763b8ceSMatthias Ringwald    conditions (interrupts routines ...). */
181*f763b8ceSMatthias Ringwald #define SPIx_TIMEOUT_MAX                            0x1000 /*<! The value of the maximal timeout for BUS waiting loops */
182*f763b8ceSMatthias Ringwald 
183*f763b8ceSMatthias Ringwald 
184*f763b8ceSMatthias Ringwald /*############################# I2C1 #########################################*/
185*f763b8ceSMatthias Ringwald /* I2C clock speed configuration (in Hz) */
186*f763b8ceSMatthias Ringwald #ifndef BSP_I2C_SPEED
187*f763b8ceSMatthias Ringwald  #define BSP_I2C_SPEED                            100000
188*f763b8ceSMatthias Ringwald #endif /* BSP_I2C_SPEED */
189*f763b8ceSMatthias Ringwald 
190*f763b8ceSMatthias Ringwald /* I2C peripheral configuration defines (control interface of the audio codec) */
191*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx                            I2C1
192*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_CLK_ENABLE()               __HAL_RCC_I2C1_CLK_ENABLE()
193*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_SCL_SDA_GPIO_CLK_ENABLE()  __HAL_RCC_GPIOB_CLK_ENABLE()
194*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_SCL_SDA_AF                 GPIO_AF4_I2C1
195*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_SCL_SDA_GPIO_PORT          GPIOB
196*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_SCL_PIN                    GPIO_PIN_6
197*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_SDA_PIN                    GPIO_PIN_9
198*f763b8ceSMatthias Ringwald 
199*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_FORCE_RESET()              __HAL_RCC_I2C1_FORCE_RESET()
200*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_RELEASE_RESET()            __HAL_RCC_I2C1_RELEASE_RESET()
201*f763b8ceSMatthias Ringwald 
202*f763b8ceSMatthias Ringwald /* I2C interrupt requests */
203*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_EV_IRQn                    I2C1_EV_IRQn
204*f763b8ceSMatthias Ringwald #define DISCOVERY_I2Cx_ER_IRQn                    I2C1_ER_IRQn
205*f763b8ceSMatthias Ringwald 
206*f763b8ceSMatthias Ringwald /* Maximum Timeout values for flags waiting loops. These timeouts are not based
207*f763b8ceSMatthias Ringwald    on accurate values, they just guarantee that the application will not remain
208*f763b8ceSMatthias Ringwald    stuck if the SPI communication is corrupted.
209*f763b8ceSMatthias Ringwald    You may modify these timeout values depending on CPU frequency and application
210*f763b8ceSMatthias Ringwald    conditions (interrupts routines ...). */
211*f763b8ceSMatthias Ringwald #define I2Cx_TIMEOUT_MAX    0x1000 /*<! The value of the maximal timeout for BUS waiting loops */
212*f763b8ceSMatthias Ringwald 
213*f763b8ceSMatthias Ringwald 
214*f763b8ceSMatthias Ringwald /*############################# ACCELEROMETER ################################*/
215*f763b8ceSMatthias Ringwald /* Read/Write command */
216*f763b8ceSMatthias Ringwald #define READWRITE_CMD                     ((uint8_t)0x80)
217*f763b8ceSMatthias Ringwald /* Multiple byte read/write command */
218*f763b8ceSMatthias Ringwald #define MULTIPLEBYTE_CMD                  ((uint8_t)0x40)
219*f763b8ceSMatthias Ringwald /* Dummy Byte Send by the SPI Master device in order to generate the Clock to the Slave device */
220*f763b8ceSMatthias Ringwald #define DUMMY_BYTE                        ((uint8_t)0x00)
221*f763b8ceSMatthias Ringwald 
222*f763b8ceSMatthias Ringwald /* Chip Select macro definition */
223*f763b8ceSMatthias Ringwald #define ACCELERO_CS_LOW()       HAL_GPIO_WritePin(ACCELERO_CS_GPIO_PORT, ACCELERO_CS_PIN, GPIO_PIN_RESET)
224*f763b8ceSMatthias Ringwald #define ACCELERO_CS_HIGH()      HAL_GPIO_WritePin(ACCELERO_CS_GPIO_PORT, ACCELERO_CS_PIN, GPIO_PIN_SET)
225*f763b8ceSMatthias Ringwald 
226*f763b8ceSMatthias Ringwald /**
227*f763b8ceSMatthias Ringwald   * @brief  ACCELEROMETER Interface pins
228*f763b8ceSMatthias Ringwald   */
229*f763b8ceSMatthias Ringwald #define ACCELERO_CS_PIN                        GPIO_PIN_3                 /* PE.03 */
230*f763b8ceSMatthias Ringwald #define ACCELERO_CS_GPIO_PORT                  GPIOE                      /* GPIOE */
231*f763b8ceSMatthias Ringwald #define ACCELERO_CS_GPIO_CLK_ENABLE()          __HAL_RCC_GPIOE_CLK_ENABLE()
232*f763b8ceSMatthias Ringwald #define ACCELERO_CS_GPIO_CLK_DISABLE()         __HAL_RCC_GPIOE_CLK_DISABLE()
233*f763b8ceSMatthias Ringwald #define ACCELERO_INT_GPIO_PORT                 GPIOE                      /* GPIOE */
234*f763b8ceSMatthias Ringwald #define ACCELERO_INT_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOE_CLK_ENABLE()
235*f763b8ceSMatthias Ringwald #define ACCELERO_INT_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOE_CLK_DISABLE()
236*f763b8ceSMatthias Ringwald #define ACCELERO_INT1_PIN                      GPIO_PIN_0                 /* PE.00 */
237*f763b8ceSMatthias Ringwald #define ACCELERO_INT1_EXTI_IRQn                EXTI0_IRQn
238*f763b8ceSMatthias Ringwald #define ACCELERO_INT2_PIN                      GPIO_PIN_1                 /* PE.01 */
239*f763b8ceSMatthias Ringwald #define ACCELERO_INT2_EXTI_IRQn                EXTI1_IRQn
240*f763b8ceSMatthias Ringwald /**
241*f763b8ceSMatthias Ringwald   * @}
242*f763b8ceSMatthias Ringwald   */
243*f763b8ceSMatthias Ringwald 
244*f763b8ceSMatthias Ringwald 
245*f763b8ceSMatthias Ringwald /*############################### AUDIO ######################################*/
246*f763b8ceSMatthias Ringwald /**
247*f763b8ceSMatthias Ringwald   * @brief  AUDIO I2C Interface pins
248*f763b8ceSMatthias Ringwald   */
249*f763b8ceSMatthias Ringwald #define AUDIO_I2C_ADDRESS                     0x94
250*f763b8ceSMatthias Ringwald 
251*f763b8ceSMatthias Ringwald   /* Audio Reset Pin definition */
252*f763b8ceSMatthias Ringwald #define AUDIO_RESET_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOD_CLK_ENABLE()
253*f763b8ceSMatthias Ringwald #define AUDIO_RESET_PIN                       GPIO_PIN_4
254*f763b8ceSMatthias Ringwald #define AUDIO_RESET_GPIO                      GPIOD
255*f763b8ceSMatthias Ringwald /**
256*f763b8ceSMatthias Ringwald   * @}
257*f763b8ceSMatthias Ringwald   */
258*f763b8ceSMatthias Ringwald 
259*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_Exported_Macros STM32F4 DISCOVERY LOW LEVEL Exported Macros
260*f763b8ceSMatthias Ringwald   * @{
261*f763b8ceSMatthias Ringwald   */
262*f763b8ceSMatthias Ringwald /**
263*f763b8ceSMatthias Ringwald   * @}
264*f763b8ceSMatthias Ringwald   */
265*f763b8ceSMatthias Ringwald 
266*f763b8ceSMatthias Ringwald /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_Exported_Functions STM32F4 DISCOVERY LOW LEVEL Exported Functions
267*f763b8ceSMatthias Ringwald   * @{
268*f763b8ceSMatthias Ringwald   */
269*f763b8ceSMatthias Ringwald uint32_t BSP_GetVersion(void);
270*f763b8ceSMatthias Ringwald void     BSP_LED_Init(Led_TypeDef Led);
271*f763b8ceSMatthias Ringwald void     BSP_LED_On(Led_TypeDef Led);
272*f763b8ceSMatthias Ringwald void     BSP_LED_Off(Led_TypeDef Led);
273*f763b8ceSMatthias Ringwald void     BSP_LED_Toggle(Led_TypeDef Led);
274*f763b8ceSMatthias Ringwald void     BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Mode);
275*f763b8ceSMatthias Ringwald uint32_t BSP_PB_GetState(Button_TypeDef Button);
276*f763b8ceSMatthias Ringwald 
277*f763b8ceSMatthias Ringwald /**
278*f763b8ceSMatthias Ringwald   * @}
279*f763b8ceSMatthias Ringwald   */
280*f763b8ceSMatthias Ringwald 
281*f763b8ceSMatthias Ringwald /**
282*f763b8ceSMatthias Ringwald   * @}
283*f763b8ceSMatthias Ringwald   */
284*f763b8ceSMatthias Ringwald 
285*f763b8ceSMatthias Ringwald /**
286*f763b8ceSMatthias Ringwald   * @}
287*f763b8ceSMatthias Ringwald   */
288*f763b8ceSMatthias Ringwald 
289*f763b8ceSMatthias Ringwald /**
290*f763b8ceSMatthias Ringwald   * @}
291*f763b8ceSMatthias Ringwald   */
292*f763b8ceSMatthias Ringwald 
293*f763b8ceSMatthias Ringwald /**
294*f763b8ceSMatthias Ringwald   * @}
295*f763b8ceSMatthias Ringwald   */
296*f763b8ceSMatthias Ringwald 
297*f763b8ceSMatthias Ringwald #ifdef __cplusplus
298*f763b8ceSMatthias Ringwald }
299*f763b8ceSMatthias Ringwald #endif
300*f763b8ceSMatthias Ringwald 
301*f763b8ceSMatthias Ringwald #endif /* __STM32F4_DISCOVERY_H */
302*f763b8ceSMatthias Ringwald 
303*f763b8ceSMatthias Ringwald /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
304