roverSTM  UM2 2013
Projet M1 Navarro Benjamin
 All Classes Files Functions Groups Pages
stm32f4_discovery.h
Go to the documentation of this file.
1 
23 /* Define to prevent recursive inclusion -------------------------------------*/
24 #ifndef __STM32F4_DISCOVERY_H
25 #define __STM32F4_DISCOVERY_H
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 /* Includes ------------------------------------------------------------------*/
32  #include "stm32f4xx.h"
33 
49 typedef enum
50 {
51  LED4 = 0,
52  LED3 = 1,
53  LED5 = 2,
54  LED6 = 3
55 } Led_TypeDef;
56 
57 typedef enum
58 {
59  BUTTON_USER = 0,
60 } Button_TypeDef;
61 
62 typedef enum
63 {
64  BUTTON_MODE_GPIO = 0,
65  BUTTON_MODE_EXTI = 1
66 } ButtonMode_TypeDef;
78 #define LEDn 4
79 
80 #define LED4_PIN GPIO_Pin_12
81 #define LED4_GPIO_PORT GPIOD
82 #define LED4_GPIO_CLK RCC_AHB1Periph_GPIOD
83 
84 #define LED3_PIN GPIO_Pin_13
85 #define LED3_GPIO_PORT GPIOD
86 #define LED3_GPIO_CLK RCC_AHB1Periph_GPIOD
87 
88 #define LED5_PIN GPIO_Pin_14
89 #define LED5_GPIO_PORT GPIOD
90 #define LED5_GPIO_CLK RCC_AHB1Periph_GPIOD
91 
92 #define LED6_PIN GPIO_Pin_15
93 #define LED6_GPIO_PORT GPIOD
94 #define LED6_GPIO_CLK RCC_AHB1Periph_GPIOD
95 
102 #define BUTTONn 1
103 
107 #define USER_BUTTON_PIN GPIO_Pin_0
108 #define USER_BUTTON_GPIO_PORT GPIOA
109 #define USER_BUTTON_GPIO_CLK RCC_AHB1Periph_GPIOA
110 #define USER_BUTTON_EXTI_LINE EXTI_Line0
111 #define USER_BUTTON_EXTI_PORT_SOURCE EXTI_PortSourceGPIOA
112 #define USER_BUTTON_EXTI_PIN_SOURCE EXTI_PinSource0
113 #define USER_BUTTON_EXTI_IRQn EXTI0_IRQn
114 
129 void STM_EVAL_LEDInit(Led_TypeDef Led);
130 void STM_EVAL_LEDOn(Led_TypeDef Led);
131 void STM_EVAL_LEDOff(Led_TypeDef Led);
132 void STM_EVAL_LEDToggle(Led_TypeDef Led);
133 void STM_EVAL_PBInit(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
134 uint32_t STM_EVAL_PBGetState(Button_TypeDef Button);
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif /* __STM32F4_DISCOVERY_H */
144 
158 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/