-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
63 lines (47 loc) · 2.06 KB
/
main.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "stm32f401xe.h"
//#include "Interrupts.h"
//extern volatile uint32_t tick;
//extern volatile uint32_t _tick;
#define GPIO_PIN_0 ((uint16_t)0x0001) /* Pin 0 selected */
#define GPIO_PIN_1 ((uint16_t)0x0002) /* Pin 1 selected */
#define GPIO_PIN_2 ((uint16_t)0x0004) /* Pin 2 selected */
#define GPIO_PIN_3 ((uint16_t)0x0008) /* Pin 3 selected */
#define GPIO_PIN_4 ((uint16_t)0x0010) /* Pin 4 selected */
#define GPIO_PIN_5 ((uint16_t)0x0020) /* Pin 5 selected */
#define GPIO_PIN_6 ((uint16_t)0x0040) /* Pin 6 selected */
#define GPIO_PIN_7 ((uint16_t)0x0080) /* Pin 7 selected */
#define GPIO_PIN_8 ((uint16_t)0x0100) /* Pin 8 selected */
#define GPIO_PIN_9 ((uint16_t)0x0200) /* Pin 9 selected */
#define GPIO_PIN_10 ((uint16_t)0x0400) /* Pin 10 selected */
#define GPIO_PIN_11 ((uint16_t)0x0800) /* Pin 11 selected */
#define GPIO_PIN_12 ((uint16_t)0x1000) /* Pin 12 selected */
#define GPIO_PIN_13 ((uint16_t)0x2000) /* Pin 13 selected */
#define GPIO_PIN_14 ((uint16_t)0x4000) /* Pin 14 selected */
#define GPIO_PIN_15 ((uint16_t)0x8000) /* Pin 15 selected */
#define GPIO_PIN_All ((uint16_t)0xFFFF) /* All pins selected */
#define MY_LED_Pin GPIO_PIN_13
#define MY_LED_GPIO_Port GPIOC
#define DELL_SMALLGREEN_Pin GPIO_PIN_0
#define DELL_SMALLGREEN_GPIO_Port GPIOA
#define DELL_YELLOW_Pin GPIO_PIN_1
#define DELL_YELLOW_GPIO_Port GPIOA
#define DELL_HDD_Pin GPIO_PIN_2
#define DELL_HDD_GPIO_Port GPIOA
void DELL_SMALLGREEN_OFF(void);
void DELL_SMALLGREEN_ON(void);
void MY_LED_OFF(void);
void MY_LED_ON(void);
void DELL_YELLOW_OFF(void);
void DELL_YELLOW_ON(void);
void DELL_HDD_OFF(void);
void DELL_HDD_ON(void);
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */