当年调试LPC1343时使用的led闪烁程序
#include "LPC13xx.h"                        /* LPC13xx definitions */
#include "clkconfig.h"
#include "gpio.h"
#include "config.h"
#include "timer32.h"
int main (void) {
  init_timer32(0, TIME_INTERVAL);
  enable_timer32(0);
  GPIOInit();
  GPIOSetDir( LED_PORT, LED_BIT, 1 );
  while (1)
  {
 if ( (timer32_0_counter%LED_TOGGLE_TICKS) < (LED_TOGGLE_TICKS/2) )
 {
   GPIOSetValue( LED_PORT, LED_BIT, LED_OFF );
 } else
 {
   GPIOSetValue( LED_PORT, LED_BIT, LED_ON );
 }
    __WFI();
  }
}

 
					
				
 
			
			
			
						
			 我要赚赏金
 我要赚赏金 STM32
STM32 MCU
MCU 通讯及无线技术
通讯及无线技术 物联网技术
物联网技术 电子DIY
电子DIY 板卡试用
板卡试用 基础知识
基础知识 软件与操作系统
软件与操作系统 我爱生活
我爱生活 小e食堂
小e食堂

