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

📄 led_test.c

📁 IARSOURCECODE是基于LPC2478嵌入式软件IAR EWARM V4.42的应用实例代码
💻 C
字号:
#include "LPC2468.h"                        /* LPC24xx definitions */
#include "type.h"
#include "irq.h"
#include "target.h"
#include "timer.h"

#include "fio.h"

/*****************************************************************************
**   Main Function  main()
******************************************************************************/
int main (void)
{
    DWORD counter=0,i;

    TargetResetInit();

    /* GPIOInit() need to be carefully called if you want to run some
	other peripherals, it will set the PINSEL to default value and change
	the direction of IOs. */

    GPIOInit( 3, FAST_PORT, DIR_OUT );    // 将P3组配置为输出口

    LedsInit();


    while ( 1 )
	{
          for(i=0;i<999999;i++)i=i;
	  LedOn(counter);
          for(i=0;i<999999;i++)i=i;
	  LedOff(counter);
          counter++;
	}

}

/*****************************************************************************
**                            End Of File
*****************************************************************************/

⌨️ 快捷键说明

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