📄 led.c
字号:
#include "ledcfg.h"
#include "dsk5416.h"
#include "dsk5416_led.h"
/*
* Blink0() - This task blinks LED #0
*/
void Blink0()
{
int delay;
// Set delay between LED transitions
delay = 500;
// Blink LED #0
while(1)
{
// Turn the LED on
DSK5416_LED_on(0);
TSK_sleep(delay);
// Turn the LED off
DSK5416_LED_off(0);
TSK_sleep(delay);
}
}
/*
* Blink3() - This task blinks LED #3
*/
void Blink3()
{
// Set delay between LED transitions
int delay = 100;
// Blink LED #3
while(1)
{
// Turn the LED on
DSK5416_LED_on(3);
TSK_sleep(delay);
// Turn the LED off
DSK5416_LED_off(3);
TSK_sleep(delay);
}
}
void main()
{
// Initialize the board support library
DSK5416_init();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -