-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
51 lines (47 loc) · 1.12 KB
/
main.c
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
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' |_/ |
// \ .-\__ '-' ___/-. /
// ___'. .' /--.--\ `. .'___
// ."" '< `.___\_<|>_/___.' >' "".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `_. \_ __\ /__ _/ .-` / /
// =====`-.____`.___ \_____/___.-`___.-'=====
// `=---='
//
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// 佛祖保佑 永无BUG
//
//
#include "stm32f10x.h"
#include "led.h"
#include "key.h"
#include "usart.h"
#include "exti.h"
int main(void)
{
led_init();
key_init();
usart1_init();
usart2_init();
exti_init();
Usart_SendString(USART1, "ÊÇ·ñ\n");
while(1)
{
if(Key_Scan(KEY1_GPIO_PORT, KEY1_GPIO_PIN) == 0)
{
LED1_TOGGLE;
}
}
}