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

📄 fp_vol.c

📁 sunplus spca514 cdmp3 源码
💻 C
字号:
#include <iom163.h>
#include "..\uicc_def.h"
#include "..\key.h"
#include "..\io.h"
extern unsigned int dvd_key;
static unsigned char fp_vol_0_cnt = 0;
static unsigned char fp_vol_1_cnt = 0;
extern unsigned char uicc_code;
#pragma interrupt_handler int0_isr:2
void int0_isr(void) // fp_vol_key_input
{
   	if(get_vol_input())
		{
			fp_vol_0_cnt++;
		}
		else
		{
			 fp_vol_1_cnt++;
		}
}
void clear_vol_cnt(void)
{
 fp_vol_0_cnt = 0;
 fp_vol_1_cnt = 0;
}

void fp_vol_scan(void)
{
	/*if(g_ui_key_cnt)
		g_ui_key_cnt--;
	if (fp_next_cnt >fp_prev_cnt)
	{
		if((fp_next_cnt-fp_prev_cnt)>2)
		{
			ui_input_handler(UICC_SKIPF);
			fp_next_cnt = 0;
			fp_prev_cnt = 0;
			g_ui_key_cnt = 5;
		};
	}
	else if((fp_prev_cnt-fp_next_cnt)>1)
	{
		ui_input_handler(UICC_SKIPB);
		fp_next_cnt = 0;
		fp_prev_cnt = 0;
		g_ui_key_cnt = 5;
	};
	*/
	if (fp_vol_0_cnt >fp_vol_1_cnt)
	{
		if((fp_vol_0_cnt-fp_vol_1_cnt)>1)
		{
			uicc_code = UICC_VOLUME_DOWN;
			ui_input_handler();
			//dvd_key = IRKC_VOLUME_DOWN;
			fp_vol_0_cnt = 0;
			fp_vol_1_cnt = 0;
		};
	}
	else if((fp_vol_1_cnt-fp_vol_0_cnt)>2)
	{
		uicc_code = UICC_VOLUME_UP;
		ui_input_handler();
		//dvd_key = IRKC_VOLUME_UP;
		fp_vol_0_cnt = 0;
		fp_vol_1_cnt = 0;
	}
}

⌨️ 快捷键说明

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