📄 leds.c
字号:
// leds.c
#include "leds.h"
#include "bits.h"
#include <iostr711.h>
// Init led
void InitLeds(void) {
// LED port as output
IOPORT1_PC2 = BIT8|BIT9;
}
// turn on Led1
void Led1_On(void) {
//LED1=ON
IOPORT1_PD_bit.no8 = 0;
}
// turn off Led1
void Led1_Off(void) {
//LED1=OFF
IOPORT1_PD_bit.no8 = 1;
}
// turn on Led2
void Led2_On(void) {
//LED2=ON
IOPORT1_PD_bit.no9 = 0;
}
// turn off Led2
void Led2_Off(void) {
//LED2=OFF
IOPORT1_PD_bit.no9 = 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -