Files
stm32f103_spl_clion/User/main.c
2026-08-11 23:30:04 +08:00

23 lines
325 B
C

#include "stm32f10x.h"
#include "Delay.h"
#include "LED.h"
#include "Key.h"
uint8_t KeyNum;
int main(void){
LED_Init();
Key_Init();
while(1){
KeyNum = Key_GetNum();
if (KeyNum == 1) {
LED0_TOGGLE();
}
if (KeyNum == 2) {
LED1_TOGGLE();
}
}
}