⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 led.c

📁 基于DSPTMS320C5416的指示灯延迟程序
💻 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 + -