halrunled.c
来自「威望公司MP3 + USB MCU 的参考软件」· C语言 代码 · 共 64 行
C
64 行
/****************************************************************
* 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 + =
减小字号Ctrl + -
显示快捷键?