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

📄 led.c

📁 TI evm642的源码,给那些没有买TI的评估板,却想要评估板程序的人.
💻 C
字号:
/*
 *  Copyright 2003 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 */

/*
 *  ======== led.c ========
 *
 *  This example blinks LED #0 at a rate of about 2.5 times per second using
 *  the LED module of the the DM642 EVM Board Support Library.
 *
 *  The purpose of this example is to demonstrate basic BSL usage as well
 *  as provide a project base for your own code.
 *
 *  Please see the DM642 BSL help file under Software/Examples for more
 *  detailed information.
 */

/*
 *  DSP/BIOS is configured using the DSP/BIOS configuration tool.  Settings
 *  for this example are stored in a configuration file called led.cdb.  At
 *  compile time, Code Composer will auto-generate DSP/BIOS related files
 *  based on these settings.  A header file called ledcfg.h contains the
 *  results of the autogeneration and must be included for proper operation.
 *  The name of the file is taken from led.cdb and adding cfg.h.
 */
#include "ledcfg.h"

/*
 *  The DM642 EVM Board Support Library is divided into several modules, each
 *  of which has its own include file.  The file evmdm642.h must be included
 *  in every program that uses the BSL.  This example also includes
 *  evmdm642_led.h because it uses the LED module.
 */
#include "evmdm642.h"
#include "evmdm642_led.h"


/*
 *  main() - Main code routine, initializes BSL and runs LED application
 */
 
void main()
{
    /* Initialize the board support library, must be first BSL call */
    EVMDM642_init();

    /* Initialize the LED and DIP switch modules of the BSL */
    EVMDM642_LED_init();
    
    while(1)
    {
        /* Toggle LED #0 */
        EVMDM642_LED_toggle(0);
            
        /* Spin in a software delay loop for about 200ms */
        EVMDM642_waitusec(200000);
    }   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -