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

📄 halrunled.c

📁 威望公司MP3 + USB MCU 的参考软件
💻 C
字号:
/****************************************************************
*                      Viaon Technology (Suzhou) Co.,Ltd
*
*    Copyright 2007, Viaon Technology (Suzhou) Co.,Ltd,Suzhou,China
*                    All rights reserved.
*
*
* Filename:      	halrunled.c
*
* Programmer:    	Greg 
*
* Created: 	 	1/2/2008
*
* Description: 		public functions 
*              
*        
* Change History (most recent first):	2008.1.2
****************************************************************/
#include "utiltypedef.h"
#include "common.h"
#include "halrunled.h"
#include "config.h"

#ifdef ENABLE_RUN_LED

extern volatile BYTE data gRunled_tick;

void halLEDInit(void)
{
	LED_PIN_INIT();
	SET_RUN_LED_USB();
	
	return;
}

void halRunLED()
{
	 if(FSMState != FSMSTATE_INIT){
		SET_RUN_LED_USB();
		return;
	  }
		
	if(mp3status == MP3STATUS_PLAY){
		if(gRunled_tick >= 5){
			if(CHK_RUN_LED_USB())
				CLR_RUN_LED_USB();
			else
				SET_RUN_LED_USB();

			DISABLE_INTERRUPTS;
			gRunled_tick = 0;
			ENABLE_INTERRUPTS;
		}
	}else if(mp3status == MP3STATUS_PAUSE){
		SET_RUN_LED_USB();
	}

	return;
}

#endif


⌨️ 快捷键说明

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