-
Notifications
You must be signed in to change notification settings - Fork 0
/
led.h
39 lines (29 loc) · 1.2 KB
/
led.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __LED_H
#define __LED_H
#include "stm32w108xx.h"
#include "m2c_defs.h"
/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum
{
GLED = 0,
RLED = 1,
} Led_TypeDef;
/* Private define ------------------------------------------------------------*/
#define LEDn 2
#define GLED_PIN GPIO_Pin_6
#define GLED_GPIO_PORT GPIOA
#define GLED_GPIO_CLK RCC_AHBPeriph_GPIOA
#define RLED_PIN GPIO_Pin_7
#define RLED_GPIO_PORT GPIOA
#define RLED_GPIO_CLK RCC_AHBPeriph_GPIOA
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void M2C_LEDInit(Led_TypeDef Led);
void M2C_LEDOn(Led_TypeDef Led);
void M2C_LEDOff(Led_TypeDef Led);
void M2C_LEDToggle(Led_TypeDef Led);
void M2C_LEDBlink(Led_TypeDef Led, uint8_t times);
#endif
/* vim: set tabstop=4 autoindent shiftwidth=4 smartindent fdm=syntax: */