leds.c
来自「led buttons yanshishuoming」· C语言 代码 · 共 38 行
C
38 行
// 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 + =
减小字号Ctrl + -
显示快捷键?