Esempio n. 1
0
/*----------------------------------------------------------------------------*/
void disp_music_play_time(void)
{
    u16 play_time;
    u8 min,sec;
	
	play_time_filenum_slider++;
   	if(play_time_filenum_slider<30){
   	
	    play_time = dec_msg->play_time;
	    min = play_time / 60;
	    sec = play_time % 60;
#if(monitor == DISP_LED5X7)
	    printf_num(sec,2,2);
	    printf_num(min,0,2);
	    led_putchar(':',0);
#endif
   	}
   	else{

              disp_input_number(filenum_phy_logic(fs_msg.fileNumber));
			  
		if(play_time_filenum_slider==36){
			play_time_filenum_slider=0;
		}

   	}

	if(alm_on_flag){
		led_disp_icon(LED0_ALARM);
	}	
}
Esempio n. 2
0
/*----------------------------------------------------------------------------*/
void disp_alarm(void)
{
	if(alarm.bSource==0){
		
    		printf_str(" USb",0);
		led_disp_icon(LED0_USB);
	}
	else if(alarm.bSource==1){
		
		led_disp_icon(LED0_SD);
    		printf_str(" Sd",0);
	}
	else if(alarm.bSource==2){
		
	    if(frequency > 999)
	    {
	        printf_num(frequency,0,4);
	    }
	    else
	    {
	        printf_num(frequency,1,3);
	    }

		led_disp_icon(LED0_FM);
	}
	else if(alarm.bSource==3){
		
		led_disp_icon(LED0_AUX);
    		printf_str(" AUX",0);
	}
	else{
    		printf_str(" OFF",0);
	}		
}
Esempio n. 3
0
void disp_fm_main(void)
{
    if(frequency > 999)
    {
        printf_num(frequency,0,4);
    }
    else
    {
        printf_num(frequency,1,3);
    }

	fm_rec_disp();

	led_disp_icon(LED0_FM);

	if(alm_on_flag){
		led_disp_icon(LED0_ALARM);
	}
//	if(RECODE_WORKING == encode_status)
//    {
//        led_disp_icon(LED0_FM);
//    }
//    else if(RECODE_PAUSE == encode_status)
//    {
//        led_flash_icon(LED0_FM);
//    }
//	else
//	{
//	 	led_disp_icon(LED0_FM);
//	}
}
Esempio n. 4
0
/*----------------------------------------------------------------------------*/
void disp_rec_time(void)
{
    u16 encoder_time;
    u8 min,sec;

    encoder_time = encode_time();
    min = encoder_time / 60;
    sec = encoder_time % 60;

    printf_num(sec,2,2);
    printf_num(min,0,2);
    led_putchar(':',0);
	
}
Esempio n. 5
0
/*----------------------------------------------------------------------------*/
void disp_main_vol(u8 vol)
{
    led_putchar('U',0);
    led_putchar('L',1);
    printf_num(vol,2,2);

}
Esempio n. 6
0
/*----------------------------------------------------------------------------*/
void disp_eq(void)
{
#if 1
        printf_str(&EQ_const[eq_mode][0],0);            
#else
	printf_str("Eq",1);
    printf_num(eq_mode,3,1);
#endif	
}
Esempio n. 7
0
void disp_fm_find_station(void)
{
    led_putchar('P',1);
    printf_num(fre_channel,2,2);//my_printf("%c P%02b%m", fre_channel, LED_FM_ICON);
	fm_rec_disp();
    delay_10ms(50);


}
Esempio n. 8
0
void disp_sleep_timer(void)
{

	if(timer_disp>0){
	       printf_str("SL  ",0);	
    		printf_num(timer_disp,2,2);
	}
	else{
	    	printf_str(" OFF",0);
	}

	if(alm_on_flag){
		led_disp_icon(LED0_ALARM);
	}	
}
Esempio n. 9
0
File: tft.c Progetto: bionllo/myarm
/**
 * @brief 使用lcd显示文字
 * @param word_display: 将会显示的目标字符串
 *  这个参数可以取得到以下的值:\n
 *  	@arg
 * @param x0: 字符串显示的横坐标
 * @param y0: 字符串显示的纵坐标
 * @retval none
 * \date 2012-3-31 下午4:45:29
 * @note
 */
void LCD_Display_Words(INT8U* word_display , INT16U x0 , INT16U y0)
{
	INT32U myfont_index[50] ;
	INT32U count = 1 ;
	Unicode_Index_MyFont(word_display , myfont_index) ;                    //转换unicode码
#ifdef __DEBUG__
	        printfs("myfont_index[0] :") ;
	        printf_num(*myfont_index, 'h') ;
	        printfs("\r\n") ;
	        printfs("myfont_index[1] :") ;
	        printf_num(*(myfont_index + 1), 'h') ;
	        printfs("\r\n") ;
	        printfs("myfont_index[2] :") ;
	        printf_num(*(myfont_index + 2), 'h') ;
	        printfs("\r\n") ;
	        printfs("myfont_index[3] :") ;
	        printf_num(*(myfont_index + 3), 'h') ;
	        printfs("\r\n") ;
	        printfs("myfont_index[4] :") ;
	        printf_num(*(myfont_index + 4), 'h') ;
	        printfs("\r\n") ;
#endif
#if LIB_FONT == POINT_LIB
	while(myfont_index[0] --)
	{
		display_word_mode((INT8U*) &chinese_font_mode[ *(myfont_index + count)] , x0 , y0) ;                    //显示一个汉字,只需要给显示字模函数一个字库索引
		x0 += WORD_FONT_WIDTH ;
#ifdef __DEBUG__
		printfs("chinese_font_mode[*(myfont_index + count)] :") ;
		printf_num(&chinese_font_mode, 'h') ;
		printfs("\r\n") ;
#endif
		count ++ ;
	}
#elif LIB_FONT == IMAGE_LIB
	while (myfont_index[0]--)
	{
		display_word_mode(chinese_font_mode[*(myfont_index + count)], x0, y0) ;                    //显示一个汉字,只需要给显示字模函数一个字库索引
		count++ ;
		x0 += WORD_FONT_WIDTH ;
	}
#endif
}
Esempio n. 10
0
File: tft.c Progetto: bionllo/myarm
/**
 * @brief 将字体的点阵模显示出来
 * @param index_word_lib 该字体的模所在的首地址
 *  这个参数可以取得到以下的值:\n
 *  	@arg
 * @param x0 该字体的模显示的横坐标
 * @param y0 该字体的模显示的纵坐标
 * @retval none
 * \date 2012-3-31 下午4:55:52
 * @note 不足的是不能显示不够整数方框个数的字模,如果能显示也会有安全隐患
 */
void display_word_mode(INT8U* index_word_lib , INT16U x0 , INT16U y0)
{
#if LIB_FONT == POINT_LIB
	INT32U word_mode_size = WORD_FONT_SIZE ;                    //为了确认到字模什么时候能够写完
	INT8U temp ;
	INT16U count = 0 ;
	INT16U x0_no_change = x0 ;
	INT16U x = x0 ;
	INT16U y = y0 ;                    //这两个变量是为了方便控制x0,y0。
#ifdef __DEBUG__
	printfs("index_word_lib:") ;
	printf_num((INT32U) index_word_lib, 'h') ;
	printfs("\r\n") ;
#endif
	/*
	 * 假设下面是一个点阵汉字,取模由4个8*8的方框按顺序组成
	 *
	 *
	 *	一开始的时候
	 *		 |x=x0,count指的是字库里面的原始数据,x0_no_change,这个变量不会变,如果y>8的适合将x0被这个变量置位
	 *	 	 |
	 *	 	 V
	 y=y0--> ******************************
	 *			   *			  *
	 *			   *			  *
	 *	1		   *		2	  *
	 *	 		   *			  *
	 *			   *			  *
	 ******************************
	 *			   *			  *
	 *			   *			  *
	 *	3		   *		4	  *
	 *			   * 			  *
	 *			   *			  *
	 ******************************
	 *	当一个字节写好后
	 *		 |x
	 *		 |x0_no_change |count
	 *		 |			   |x0
	 *	 	 |			   |
	 *	 	 V			   v
	 y-->  ******************************
	 y0--> *			   *			  *				y0指向下一行的时候,x0将会被x置位,即x0,又回到一开始的位置
	 *			   *			  *
	 *	1		   *		2	  *
	 *	 		   *			  *
	 *			   *			  *
	 ******************************
	 *			   *			  *
	 *			   *			  *
	 *	3		   *		4	  *
	 *			   * 			  *
	 *			   *			  *
	 ******************************
	 *	当八个字节写好后,x,y的坐标将会指向下一个方框的首地址,都是被x,y值重置了,因为到了同一行的另外一个字框,所以x的指向会被修改为x+8,而count是只管增加就行了
	 *		 |
	 *		 |x0_no_change  |count
	 *		 |			    |x
	 *	 	 |			    |x0
	 *	 	 V			    v
	 y0=y--> ******************************
	 *			   *			  *
	 *			   *			  *
	 *	1		   *		2	  *
	 *	 		   *			  *
	 *			   *			  *
	 ******************************
	 *			   *			  *
	 *			   *			  *
	 *	3		   *		4	  *
	 *			   * 			  *
	 *			   *			  *
	 ******************************
	 *第一行的方框全部写完后,x0,x将会被原本的x0_no_change改变,重新修改为指向第一列
	 *		 |x0
	 *		 |x0_no_change  |
	 *		 |x			    |
	 *	 	 |			    |
	 *	 	 V			    v
	 ******************************
	 *			   *			  *
	 *			   *			  *
	 *	1		   *		2	  *
	 *	 		   *			  *
	 *			   *			  *
	 y0=y-->	 ******************************
	 * <--count	   *			  *
	 *			   *			  *
	 *	3		   *		4	  *
	 *			   * 			  *
	 *			   *			  *
	 ******************************
	 */
	while(word_mode_size --)
	{
		temp = *(index_word_lib + count) ;
		count ++ ;
		if (temp == 0)
		{
			y0 ++ ;
		}
		else
		{
			while(temp)
			{
				if (temp & 0x80)
				{
					draw_word_point(x0 , y0) ;
					x0 ++ ;
				}
				else
				{
					x0 ++ ;
				}
				temp <<= 1 ;
			}
			y0 ++ ;
			x0 = x ;
		}

		if (count % 8 == 0)
		{
			y0 = y ;
			x += 8 ;
			x0 = x ;
		}
		if (count % WORD_FONT_WIDTH == 0)
		{
			y += 8 ;
			y0 = y ;
			x = x0_no_change ;
			x0 = x0_no_change ;
		}

	}
#elif LIB_FONT == IMAGE_LIB
#ifdef __DEBUG__
	printf_num((INT32U) index_word_lib, 'h') ;
#endif
	set_rect(x0, y0,WORD_FONT_WIDTH,WORD_FONT_HIGH) ;
	write_to_FramRam((INT16U*)index_word_lib,WORD_FONT_WIDTH,WORD_FONT_HIGH) ;
#endif
}
Esempio n. 11
0
/*----------------------------------------------------------------------------*/
void disp_curr_time(void)
{
	static bool rtc_col=0;
	 
     if(rtc_mode_setting == RTC_DISPLAY){

	     	printf_num(curr_time.min,2,2);
     		printf_num(curr_time.hour,0,2);	
	 
		rtc_col =~rtc_col;
		if(rtc_col){
    			led_putchar(':',0);

		}		

		if(work_mode == AUX_MODE){
    			led_disp_icon(LED0_AUX);
		}	
     }
     else if(rtc_mode_setting == RTC_SETTING){

		rtc_col =~rtc_col;
		
		if(rtc_coordinate==3){

			if(rtc_col){
     				printf_num(curr_time.hour,0,2);	
			}
			
   			printf_num(curr_time.min,2,2);
		}
		else{

			if(rtc_col){
   				printf_num(curr_time.min,2,2);
			}		
			
     			printf_num(curr_time.hour,0,2);	
		}
    		led_putchar(':',0);

     }	 
     else if(rtc_mode_setting == ALARM_SETTING){
	 	
		rtc_col =~rtc_col;
		if(alm_coordinate==1){

			if(rtc_col){
     				printf_num(alarm.hour,0,2);	
			}
			
   			printf_num(alarm.min,2,2);
		}
		else{

			if(rtc_col){
   				printf_num(alarm.min,2,2);
			}		
			
     			printf_num(alarm.hour,0,2);	
		}
    		led_putchar(':',0);

     }	 	 
	
	if(alarm.sw==1){

    		led_disp_icon(LED0_ALARM);
			
	}
	else{
    		led_clr_icon(LED0_ALARM);
	}
}
Esempio n. 12
0
void disp_music_stop(void)
{
    printf_num(logic_fileTotal,0,4);
    disp_device();

}
Esempio n. 13
0
void disp_rev_strong(void)
{
    //led_putchar('5',0);
    printf_num(app_echo.strong,1,3);

}
Esempio n. 14
0
void disp_rev_deep(void)
{

    printf_num(app_echo.deep,1,2);

}
Esempio n. 15
0
/*----------------------------------------------------------------------------*/
void disp_input_number(u16 num)
{
    printf_num(num,0,4);      

}
Esempio n. 16
0
void disp_fm_channel(void)
{
    led_putchar('P',1);
    printf_num(fre_channel,2,2);
	fm_rec_disp();
}