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

📄 ir_drv.c

📁 凌阳8202T的红外接收代码及LED屏的驱动代码
💻 C
📖 第 1 页 / 共 5 页
字号:
			//清除左部的'选定框';
			vod_osd_clear_checkbox(  0 );
			//画右部选定框
			vod_logo_draw_checkbox(1);

		}
		else{
			if(vod_current_button_right == VOD_BUTTON_3||
				vod_current_button_right == VOD_BUTTON_8)
				return 0;

			vod_current_button_right ++;	
			//画右部选定框
			vod_logo_draw_checkbox(1);


		}
		return 0;
	}
	//按键'OK'
	if(rx == VOD_IRC_CONFIRM){	
		if(vod_current_button_right == VOD_BUTTON_NULL){
			vod_current_button_right = VOD_BUTTON_1;
			//清除左部的'选定框';
			vod_osd_clear_checkbox(  0 );
			//画右部选定框
			vod_logo_draw_checkbox(1);		
		}
		else if(vod_current_button_right <= VOD_BUTTON_6){	
			vod_logo_12_confirm();		
		}
		//上一页
		else if(vod_current_button_right == VOD_BUTTON_7){
			if(vod_current_page<=0)
				return 0;
			vod_current_page --;
			//画6张小BMP图
			vod_logo_12_draw_BMP();	
			
		}
		//下一页
		else if(vod_current_button_right == VOD_BUTTON_8){
			if(vod_current_page>=1)
				return 0;
			vod_current_page ++;
			//画6张小BMP图
			vod_logo_12_draw_BMP();	
		}

		
	}
	return 0;
}
/***************************************************
	在vod_logo_12中画framebuf图
******************************************************/
void vod_logo_12_draw_BMP(){

	if(vod_current_button_left > VOD_BUTTON_2)
		return;
	
	//画framebuf图
	//第几类别的图像
	BYTE * framebufBMP_type_data_start_temp  = (BYTE *)(vod_framebufBMP_type_bufstart + VOD_SERVER_HEADER+(vod_framebufBMP_type_header+vod_current_button_left+1)->type_bufstart ) ;
	vod_framebufBMP_header = (vod_framebufBMP_header_t *)(framebufBMP_type_data_start_temp+0x04);

	coordinate start  = ( vod_zuobiao_header +vod_current_button_left_counts )->start;

	//coordinate start ;
	//start.x = 160;
	//start.y = 80+52;
	dimension dim  =  vod_framebufBMP_header->dim;

	//第几页的第一张图像
	vod_framebufBMP_datastart = (BYTE *)( framebufBMP_type_data_start_temp  + (vod_framebufBMP_header+6*vod_current_page)->bufstart );
	
	vod_framebuf_draw_counts( vod_framebufBMP_datastart, start , dim,6);
	
}

/***************************************************
	在vod_logo_12中等待确定
******************************************************/
BYTE vod_logo_12_confirm(){

	if(vod_current_button_left > VOD_BUTTON_2)
		return 0;
	vod_order_amount = 1;
	//清除右部的'选定框';
	vod_osd_clear_checkbox(  1 );	
	//画产品的数量选定框
	vod_osd_order_amount();

	vod_current_logo = VOD_LOGO_121;
	
		
	return 0;
}

/***************************************************
	在vod_logo_12中等待确定
******************************************************/
BYTE vod_logo_121(UINT16 rx){
	//按键‘上’
	if(rx == VOD_IRC_UP){	
		if(vod_order_amount<9){
			vod_order_amount ++;
			vod_osd_change_order_amount();
		}
	}
	//按键‘下’
	if(rx == VOD_IRC_DOWN){	
		if(vod_order_amount>1){
			vod_order_amount --;	
			vod_osd_change_order_amount();
		}
	}			
	//返回
	if(rx == VOD_IRC_RETURN){
		//清除产品的数量选定框
		vod_osd_clear_order_amount();

		vod_current_logo = VOD_LOGO_12;
		//画右部选定框
		vod_osd_draw_checkbox( 1  );
		return 0;
	}
	//确定
	if(rx == VOD_IRC_CONFIRM){
		//清除产品的数量选定框
		vod_osd_clear_order_amount();

		vod_current_logo = VOD_LOGO_12;
		//画右部选定框
		vod_osd_draw_checkbox( 1  );
		return 0;
	}	
	return 0;
}
#endif

/*************************************************************
	精彩电影logo13
**************************************************************/
//BYTE vod_logo_13(UINT16 rx){
BYTE vod_logo_11(UINT16 rx){
	
	//返回
	if(rx == VOD_IRC_RETURN){
		//返回上一页
		if(vod_current_button_right == VOD_BUTTON_NULL)
			vod_switch_logo(VOD_LOGO_1);
		else{
			if(vod_current_button_right <=VOD_BUTTON_6){
				//字符串不被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				//先让字符串没选中,再复位右键
				vod_current_button_right = VOD_BUTTON_NULL;
				//画左部选定框
				vod_osd_draw_checkbox( 0  );				
			}
			else{
				//清除右部选定框
				vod_osd_clear_checkbox( 1  );	
				vod_current_button_right = VOD_BUTTON_NULL;
				//画左部选定框
				vod_osd_draw_checkbox( 0  );	
			}
		}
			

		return 0;
	}

	//按键‘上’
	if(rx == VOD_IRC_UP){	
		if(vod_current_button_right == VOD_BUTTON_NULL){
			if(vod_current_button_left <= VOD_BUTTON_1)
				return 0;

			vod_current_button_left   --;		
			//页数清0
			vod_current_page = 0;

			//画左部选定框
			vod_logo_draw_checkbox(0);	
			//列出6条OSD字幕信息
			//vod_logo_11_search_song_byGxm("陈楚生");	
			vod_logo_search_program_byType(vod_current_button_left);
			
		}
		else{
			if(vod_current_button_right <= VOD_BUTTON_1)
				return 0;
			if(vod_current_button_right <= VOD_BUTTON_6){
				//字符串不被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_current_button_right --;
				//字符串被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
				return 0;
			}
			if (vod_current_button_right == VOD_BUTTON_7){
				//是否不满一页
				if((vod_current_page+1)*6 > vod_program_search_result[0])
					vod_current_button_right =  (vod_program_search_result[0]-1)%6;
				else
					vod_current_button_right --;
				vod_osd_clear_checkbox(1);
				//字符串被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
				return 0;
			}
			
			vod_current_button_right --;
			//画右部选定框
			vod_logo_draw_checkbox(1);
			
				
		}
		return 0;
		
	}
	//按键‘下’
	if(rx == VOD_IRC_DOWN){	
		if(vod_current_button_right == VOD_BUTTON_NULL){
			if(vod_current_button_left >= VOD_BUTTON_9)
				return 0;

			vod_current_button_left   ++;	
			//页数清0
			vod_current_page = 0;

			//画左部选定框
			vod_logo_draw_checkbox(0);
			//列出6条OSD字幕信息
			//vod_logo_11_search_song_byGxm("张学友");		
			vod_logo_search_program_byType(vod_current_button_left);
			
		}
		else{
			if(vod_current_button_right <=VOD_BUTTON_5){
				
				//字符串不被选中
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				//是否没有下一项了?
				if(vod_current_page*6+vod_current_button_right+1 >= vod_program_search_result[0]){
					vod_current_button_right =  VOD_BUTTON_7;
					//画右部选定框
					vod_logo_draw_checkbox2(1);
					return 0;
				}
				
				vod_current_button_right ++;				
				//字符串被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_SEL);	
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
				return 0;
			}
			if(vod_current_button_right ==VOD_BUTTON_6){
				//字符串不被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_current_button_right ++;	
				//画右部选定框
				vod_logo_draw_checkbox2(1);
				return 0;
			}
			if(vod_current_button_right <=VOD_BUTTON_8){
				vod_current_button_right ++;		
				//画右部选定框
				vod_logo_draw_checkbox(1);
			}
		}
		return 0;
	}
	//按键‘左’
	if(rx == VOD_IRC_LEFT){	
		if(vod_current_button_right != VOD_BUTTON_NULL){
			if(vod_current_button_right <=VOD_BUTTON_6){

				//字符串不被选中
				//vod_logo_11_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				vod_logo_draw_string_byColor(VOD_FONTCOLOR_NOT_SEL);
				//先让字符串没选中,再复位右键
				vod_current_button_right = VOD_BUTTON_NULL;
				//画左部选定框
				vod_osd_draw_checkbox( 0  );				
			}
			else if(vod_current_button_right >=VOD_BUTTON_8){

				vod_current_button_right --;	
				//画右部选定框
				vod_logo_draw_checkbox(1);
			}
		}
		return 0;
	}
	//按键‘右’
	if(rx == VOD_IRC_RIGHT){		
		if(vod_current_button_right == VOD_BUTTON_NULL){

			//如果记录为空
			if(vod_program_search_result[0] == 0)
				return 0;
			//如果记录不为空
			vod_current_button_right = VOD_BUTTON_1;
			//清除左部的'选定框';
			vod_osd_clear_checkbox(  0 );
			//字符串被选中
			vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);

		}
		else if(vod_current_button_right == VOD_BUTTON_7||
			vod_current_button_right == VOD_BUTTON_8){
			vod_current_button_right ++;	
			//画右部选定框
			vod_logo_draw_checkbox(1);


		}
		return 0;
	}
	//按键'OK'
	if(rx == VOD_IRC_CONFIRM){	
		//选择某一类型的电影
		if(vod_current_button_right == VOD_BUTTON_NULL){
			//如果记录为空
			if(vod_program_search_result[0] == 0)
				return 0;

			//如果记录不为空
			vod_current_button_right = VOD_BUTTON_1;
			//清除左部的'选定框';
			vod_osd_clear_checkbox(  0 );
			//字符串被选中
			vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
			return 0;
		}
		//电影简介信息
		if(vod_current_button_right <= VOD_BUTTON_6){
			
			if(vod_logo_11_film_info())
				return 1;
			return 0;	
		}
		//上一页
		if(vod_current_button_right == VOD_BUTTON_8){
			if(vod_current_page<=0)
				return 0;
			vod_current_page --;
			//列出6条字符串记录
			//vod_logo_11_draw_string_list();	
			vod_logo_draw_string_list();
			return 0;
		}
		//下一页
		if(vod_current_button_right == VOD_BUTTON_9){

			//是否下一页没有记录可以显示了?
			if((vod_current_page+1)*6 >= vod_program_search_result[0])
				return 0;
			vod_current_page ++;
			//列出6条字符串记录
			//vod_logo_11_draw_string_list();	
			vod_logo_draw_string_list();
			return 0;
		}
		//返回类型选择
		if(vod_current_button_right == VOD_BUTTON_7){
			vod_current_button_right = VOD_BUTTON_NULL;
			//清除右部的'选定框';
			vod_osd_clear_checkbox(  1 );
			//画左部选定框
			vod_osd_draw_checkbox( 0  );	
		}
		return 0;
	}

	//获得数字按键
	if(vod_logo_get_button_digital(rx)){
		//清除右部选定框
		vod_osd_clear_checkbox( 1  );
		vod_current_button_right = VOD_BUTTON_NULL;
		//页数清0
		vod_current_page = 0;
		//画左部选定框
		vod_logo_draw_checkbox(0);	
		//列出6条OSD字幕信息
		vod_logo_search_program_byType(vod_current_button_left);
		return 0;
	}

	//上页
	if(rx == VOD_IRC_PAGE_UP){		
		if(vod_current_page<=0)
			return 0;
		vod_current_page --;
		//列出6条字符串记录
		vod_logo_draw_string_list();

		//如果选定了字符串
		if(vod_current_button_right <= VOD_BUTTON_6){
			vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
		}
		return 0;
	}
	//下页
	if(rx == VOD_IRC_PAGE_DOWN){		
		//是否下一页没有记录可以显示了?
		if((vod_current_page+1)*6 >= vod_program_search_result[0])
			return 0;
		vod_current_page ++;
		//列出6条字符串记录
		vod_logo_draw_string_list();

		//如果选定了字符串
		if(vod_current_button_right <= VOD_BUTTON_6){
			//如果下一页没有这一项
			if(vod_current_page*6 + vod_current_button_right +1 > vod_program_search_result[0])
				vod_current_button_right =  (vod_program_search_result[0] -1) %6;
			vod_logo_draw_string_byColor(VOD_FONTCOLOR_SEL);
		}
		return 0;
	}
	
	return 0;
}

/*
void vod_logo_11_search_song_byGxm(char * gxm){
	UINT16 gqbh =0;
	char * gm = NULL;
	char mtv =0;
	char yb = 0;
	char gl = 0;
	char * py = NULL;
	char zs =0;
	UINT16 gxbh = 0 ;
	//char * gxm = "刘德华";
	char ycyg =0;
	char yl =0;
	UINT16 djs =0;
	UINT16 jg =0;

	vod_song_search(gqbh, gm, mtv, yb, gl,  py, zs, gxbh,  gxm,  ycyg, yl,  djs, jg);
	vod_logo_11_draw_string_list();
	
}

void vod_logo_11_draw_string_list(){	
	coordinate  start;
	UINT16 area_width;
	font_palette palette ;
	palette.background_color=0;
	palette.font_color = VOD_FONTCOLOR_NOT_SEL;
	char only_font_color = 1;
	const char region_1 = 1;
	const UINT16 region_0_height = 52;

	//	清空之前画的列表
	vod_logo_clear_string_list();
	
	UINT16 i;
	for (i = 0 ; i < 6 && vod_current_page*6+i< vod_song_search_result[0]; i++){
		//注意:加1,因为第1个数是表示搜索结果条数
		char * song_name = (vod_song_header+vod_song_search_result[vod_current_page*6+i+1])->gm;	

		start = ( vod_zuobiao_header +vod_current_button_left_counts+i)->start;
		start.y -= region_0_height;
		area_width = (( vod_zuobiao_header +vod_current_button_left_counts+i)->dim).x_length;
		vod_osd_draw_string_center(song_name, start, area_width,&palette, region_1, only_font_color);		
	}
	//printf_w("###### vod_song_search_result[0]=%d\n", vod_song_search_result[0]);
}




void vod_logo_11_draw_string_byColor(char  font_color){
	coordinate  start;
	UINT16 area_width;
	font_palette palette ;
	palette.background_color=0;
	palette.font_color=font_color;
	char only_font_color = 0;
	const char region_1 = 1;
	const UINT16 region_0_height = 52;

	//注意:加1,因为第1个数是表示搜索结果条数
	char * song_name = (vod_song_header+vod_song_search_result[vod_current_page*6+vod_current_button_right+1])->gm;
	start = ( vod_zuobiao_header +vod_current_button_left_counts+vod_current_button_right)->start;
	start.y -= region_0_height;	//减去0区域的高度
	area_width = (( vod_zuobiao_header +vod_current_button_left_counts+vod_current_button_right)->dim).x_length;
	vod_osd_draw_string_center(song_name, start, area_width,&palette, region_1, only_font_color);
}
*/

/***************************************************
	按分类搜索
******************************************************/
void vod

⌨️ 快捷键说明

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