3328 |
povik |
1 |
#ifndef __STM32_EVAL_H__ |
|
|
2 |
#define __STM32_EVAL_H__ |
|
|
3 |
|
|
|
4 |
#include "stm32f10x_conf.h" |
|
|
5 |
|
|
|
6 |
#define LEDn 4 |
|
|
7 |
#define LED1_GPIO_PORT GPIOB |
|
|
8 |
#define LED1_GPIO_CLK RCC_APB2Periph_GPIOB |
|
|
9 |
#define LED1_GPIO_PIN GPIO_Pin_4 |
|
|
10 |
|
|
|
11 |
#define LED2_GPIO_PORT GPIOB |
|
|
12 |
#define LED2_GPIO_CLK RCC_APB2Periph_GPIOB |
|
|
13 |
#define LED2_GPIO_PIN GPIO_Pin_5 |
|
|
14 |
|
|
|
15 |
#define LED3_GPIO_PORT GPIOB |
|
|
16 |
#define LED3_GPIO_CLK RCC_APB2Periph_GPIOB |
|
|
17 |
#define LED3_GPIO_PIN GPIO_Pin_6 |
|
|
18 |
|
|
|
19 |
#define LED4_GPIO_PORT GPIOB |
|
|
20 |
#define LED4_GPIO_CLK RCC_APB2Periph_GPIOB |
|
|
21 |
#define LED4_GPIO_PIN GPIO_Pin_7 |
|
|
22 |
|
|
|
23 |
typedef enum |
|
|
24 |
{ |
|
|
25 |
LED1 = 0, |
|
|
26 |
LED2 = 1, |
|
|
27 |
LED3 = 2, |
|
|
28 |
LED4 = 3 |
|
|
29 |
} Led_TypeDef; |
|
|
30 |
|
|
|
31 |
void STM_EVAL_LEDInit(Led_TypeDef Led); |
|
|
32 |
void STM_EVAL_LEDOn(Led_TypeDef Led); |
|
|
33 |
void STM_EVAL_LEDOff(Led_TypeDef Led); |
|
|
34 |
void STM_EVAL_LEDToggle(Led_TypeDef Led); |
|
|
35 |
|
|
|
36 |
#endif /* __STM32_EVAL_H__ */ |