Exemple #1
0
//  低音设置时调用.
VOID DispBass(BOOL IsForced)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
	//DBG(("DispVolume,0\n"));
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{
		if((IsForced == TRUE) || (gDispPrevBass!= VolBass))
		{
			//DBG(("DispVolume,1\n"));
			DispChar(' ', POS_COM_THOUSAND);
			DispChar('b', POS_COM_HUNDREDS);
			DispChar((VolBass / 10), POS_COM_TENS);
			DispChar((VolBass % 10), POS_COM_UNITS);
			TimeOutSet(&DispTmr, INTERIM_INTERVAL);
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);
#ifdef FUNC_SEG_LCD_EN
			if(gDisplayMode == DISP_DEV_LCD58)
			{
				DBG(("DispVolume,LcdFlushDispData\n"));
				LcdFlushDispData();
			}
#endif
		}
	}

	gDispPrevBass = VolBass;

#endif
	IsForced = 0;
}
Exemple #2
0
// 文件夹功能打开/关闭时调用.
VOID DispFoldState(VOID)
{
#if (defined(FUNC_SEG_LCD_EN) || defined(FUNC_SEG_LED_EN))
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{
		if(gPlayCtrl.FolderEnable == TRUE)
		{
			DispString(" FDI");
		}
		else
		{
			DispString(" FEN");
		}
		DispIcon(ICON_COLON, LIGHT_OFF);
		DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
		TimeOutSet(&DispTmr, NORMAL_INTERVAL);
#ifdef FUNC_SEG_LCD_EN
		if(gDisplayMode == DISP_DEV_LCD58)
		{
			LcdFlushDispData();
		}
#endif
	}
#endif
}
Exemple #3
0
// 设置EQ时调用.
VOID DispEQ(BOOL IsForced)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
	if((gSys.SystemMode == SYS_MODE_USB) || (gSys.SystemMode == SYS_MODE_SD))
	{
		BYTE CODE EqName[DECD_EQ_SUM][4] =
		{
			" NOR", " ROC", " POP", " CLA", " JAS", " BLU", " HAL", " BAS", " SOF", " COU", " OPE"
		};
	
		if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
		{
			if((IsForced == TRUE) || (gDispPrevEQ != gPlayCtrl.Eq))
			{
				DispString(&EqName[gPlayCtrl.Eq][0]);
			}
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);
			TimeOutSet(&DispTmr, INTERIM_INTERVAL);
#ifdef FUNC_SEG_LCD_EN
			if(gDisplayMode == DISP_DEV_LCD58)
			{
				LcdFlushDispData();
			}
#endif
		}
	}
	gDispPrevEQ = gPlayCtrl.Eq;
#endif		
}
Exemple #4
0
// 音量设置时调用.
VOID DispVolume(BOOL IsForced)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
#ifdef FUNC_PT231X_EN
	//DBG(("DispVolume,0\n"));
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{
		if((IsForced == TRUE) || (gDispPrevVol != VolMain))
		{
			//DBG(("DispVolume,1\n"));
			DispChar(' ', POS_COM_THOUSAND);
			DispChar('U', POS_COM_HUNDREDS);
			DispChar((VolMain / 10), POS_COM_TENS);
			DispChar((VolMain % 10), POS_COM_UNITS);
			TimeOutSet(&DispTmr, INTERIM_INTERVAL);
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);
#ifdef FUNC_SEG_LCD_EN
			if(gDisplayMode == DISP_DEV_LCD58)
			{
				DBG(("DispVolume,LcdFlushDispData\n"));
				LcdFlushDispData();
			}
#endif
		}
	}

	gDispPrevVol = gSys.Volume;
#else
	//DBG(("DispVolume,0\n"));
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{
		if((IsForced == TRUE) || (gDispPrevVol != gSys.Volume))
		{
			//DBG(("DispVolume,1\n"));
			DispChar(' ', POS_COM_THOUSAND);
			DispChar('U', POS_COM_HUNDREDS);
			DispChar((gSys.Volume / 10), POS_COM_TENS);
			DispChar((gSys.Volume % 10), POS_COM_UNITS);
			TimeOutSet(&DispTmr, INTERIM_INTERVAL);
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);
#ifdef FUNC_SEG_LCD_EN
			if(gDisplayMode == DISP_DEV_LCD58)
			{
				DBG(("DispVolume,LcdFlushDispData\n"));
				LcdFlushDispData();
			}
#endif
		}
	}

	gDispPrevVol = gSys.Volume;
#endif
#endif
	IsForced = 0;
}
Exemple #5
0
// Clear digit-value(清数值显示位).
VOID ClearDigit(VOID)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
	DispString("    ");	  //灭
	DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
	DispIcon(ICON_COLON, LIGHT_OFF);
#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		LcdFlushDispData();
	}
#endif
#endif
}
Exemple #6
0
// 显示播放时间.
VOID DispPlayTime(BYTE Type)
{
#if (defined(FUNC_SEG_LCD_EN) || defined(FUNC_SEG_LED_EN))
	WORD TimeMMSS;
	static DWORD PrevTime = 0;

	if(DIS_PLAYTIME_PALY == Type)
	{
		if(PrevTime != gSongInfo.CurPlayTime)
		{
			PrevTime = gSongInfo.CurPlayTime;
		}
		else
		{
			return;
		}
	}

	TimeMMSS = gSongInfo.CurPlayTime / 60;
	TimeMMSS *= 100;
	TimeMMSS += gSongInfo.CurPlayTime % 60;
	Num2Char(TimeMMSS, TRUE);
	//DBG(("gSongInfo.CurPlayTime:%u, TimeMMSS:%u\n", gSongInfo.CurPlayTime, TimeMMSS));
	if((TimeMMSS > 9999) && (gDisplayMode > DISP_DEV_LED1888))
	{
		DispChar('P', 3);
	}

	if(DIS_PLAYTIME_PAUSE == Type)
	{
		return;
	}
	
	DispIcon(ICON_COLON, LIGHT_ON);
	DispIcon(ICON_PLAY, LIGHT_ON);
	DispIcon(ICON_PAUSE, LIGHT_OFF);
	DispIcon(ICON_MP3, LIGHT_ON);
#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		LcdFlushDispData();
	}
#endif
	//DBG(("**%02BX, %02BX, %02BX, %02BX, %02BX\n", gDispBuff[0], gDispBuff[1], gDispBuff[2], gDispBuff[3], gDispBuff[3]));
#else	
	Type = 0;
#endif	
}
Exemple #7
0
// 显示数值.
VOID DispNum(WORD Num)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
	//DBG(("DispVolume,0\n"));
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{	
#ifdef	FUNC_NUMBER_KEY_EN
		if(((NumKeyRadioFreqErrorFlag == TRUE) && (gSys.SystemMode == SYS_MODE_RADIO))
		|| ((Num > gFsInfo.FileSum) && ((gSys.SystemMode == SYS_MODE_USB) || (gSys.SystemMode == SYS_MODE_SD))))
		{
			if(NumKeyErrorDispFlag == FALSE)
			{
				Num2Char(Num, FALSE);
				NumKeyErrorDispFlag = TRUE;
				TimeOutSet(&RecvNumTimer, NORMAL_INTERVAL);
				TimeOutSet(&DispTmr, NORMAL_INTERVAL);
				TimeOutSet(&NumKeyErrDispTimer, 500);  //数字显示500ms
			}
			else
			{
				if(IsTimeOut(&NumKeyErrDispTimer))
				{
					DispString(" Err");
				}					
			}
		}
		else
#endif
		{
			Num2Char(Num, FALSE);
		}

#ifdef	FUNC_NUMBER_KEY_EN
		if((NumKeyErrorDispFlag == FALSE) && (NumKeyRadioFreqErrorFlag == FALSE))
#endif
		{
			TimeOutSet(&DispTmr, SET_INTERVL);
		}
#ifdef	FUNC_NUMBER_KEY_EN
		else
		{
			if(IsTimeOut(&DispTmr))
			{
				NumKeyRadioFreqErrorFlag = FALSE;
				NumKeyErrorDispFlag = FALSE;
			}			
		}
#endif
		DispIcon(ICON_COLON, LIGHT_OFF);
	}
#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		LcdFlushDispData();
	}
#endif
#else
	Num = 0;
#endif
}
Exemple #8
0
/*****************************************************************************
** Descriptions:	��ӭ����
** Parameters:    	s32 index
** Returned value:	
** Created By:		������2013.12.09
** Remarks: 		
*****************************************************************************/
SDK_UI_EXIT_VALUE PostShowWelcome(s32 index)
{
    SDK_DISP_PIXEL pixel;
    u8 temp[64] = {0};
    memset(&pixel, 0, sizeof(SDK_DISP_PIXEL));
    
    pgstTradeData->ucTradeId = TRADEID_WELCOME;
    if (pgstAppSetting->stComsetting.uiIdleCntDown > 0 && !sdkSysIsExPower())
    {
        giIdleClockTimer = sdkTimerGetId();
    }

    sdkUISetShowMode(SDK_UI_SHOW_MODE_1_ROW);
    sdkUIClearItems();
    sdkUIAddHideItem((s32)SDK_KEY_ENTER, MainFace);
 
    if (ShowBackground(WELCOMBMP) != SDK_OK) ShowLogo(0, 0);
    pixel = sdkDispGetScreenPixel();
    memset(temp,0,sizeof(temp));
    sdkDispFillRowRam(SDK_DISP_LINE2, pixel.siX / 2, "�����", SDK_DISP_LEFT_DEFAULT);
    memset(temp, 0, sizeof(temp));

#ifdef XGD_SDK_DEBUG
    sdkDispFillRowRam(SDK_DISP_LINE4, 0, "���԰汾,��������", SDK_DISP_DEFAULT);
#endif
    DispIcon();
    DispSysRtc(SDK_DISP_LINE5, false);
    sdkDispBrushScreen();
    return SDK_UI_EXIT_ENTER;
}
Exemple #9
0
//该 函数级别高主要处理RTC按键和判断闹钟是否到来
static BYTE DispRtcSet(VOID)
{
	BOOL Ret = FALSE;

	if(RtcSubState == RTC_SET_NONE)
	{	
#ifdef FUNC_ALARM_EN	
		if(RtcAutOutTimeCount > 0)//闹钟到	
		{
			Temp = gRtcTime.Hour * 100;//此时二者时间相等
			Temp += gRtcTime.Min;	
			
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
			if(gDisplayMode == DISP_DEV_LED57)
			{
				DispIcon(ICON_PLAY, LIGHT_OFF);	
				DispIcon(ICON_PAUSE, LIGHT_OFF);
				DispIcon(ICON_USB, LIGHT_OFF);
				DispIcon(ICON_SD, LIGHT_OFF);
				DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
				DispIcon(ICON_MP3, LIGHT_OFF);
			}
			else if(gDisplayMode == DISP_DEV_LED8888)
			{
				DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			}
		
			if(RtcAutOutTimeCount % 2)
			{
				Num2Char(Temp, TRUE);
			}
			else
			{
				ClearDigit();
			}

			Ret = TRUE;		
#endif		
		}
#endif				
	}
	else
	{
		DispRtc();//设置时间或者闹钟
		Ret = TRUE;
	}

#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		LcdFlushDispData();
	}
#endif

	return Ret;	 
}
Exemple #10
0
// 文件切换时调用.
VOID DispFileNum(VOID)
{
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))

#ifdef FUNC_RTC_EN
	if(RtcAutOutTimeCount > 0)
	{
		return;
	}
#endif

	//DBG((">>DispFileNum\n"));
	if(gFsInfo.FileSum > 0)	//if(gFsInitOK == 1)
	{
		//DBG(("gPlayCtrl.FileNum:%u\n", gPlayCtrl.FileNum));
		Num2Char(gPlayCtrl.FileNum, FALSE);		
		if((gPlayCtrl.FileNum > 9999) && (gDisplayMode > DISP_DEV_LED1888))
		{
			DispChar('F', 3);
		}
	}
	else
	{
		DBG(("NOF\n"));
		DispString(" NOF");
	}
	TimeOutSet(&DispTmr, DEV_SYMBOL_INTERVAL);
	DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
	DispIcon(ICON_COLON, LIGHT_OFF);
	DispIcon(ICON_PAUSE, LIGHT_OFF);
#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		LcdFlushDispData();
	}
#endif
#endif
}
//数字输入频点保存闪烁显示
VOID RadioDisBlink(VOID)
{
	switch(gDisplayMode)
	{
#ifdef FUNC_SINGLE_LED_EN	
		case DISP_DEV_SLED:
			//add code
			break;
#endif

#ifdef FUNC_SEG_LED_EN
		case DISP_DEV_LED1888:		
		case DISP_DEV_LED8888:		
		case DISP_DEV_LED57:
			if(RadioDisCount % 2)
			{	
				DispString("    ");		
				DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);					
			}
			else
			{
				Num2Char(gRadioData.CurrFreq, FALSE);
				DispIcon(ICON_DP_FM_MHZ, LIGHT_ON);	
			}				
			break;
#endif

#ifdef FUNC_SEG_LCD_EN
		case DISP_DEV_LCD58:
			//add code
			break;
#endif
		
		default:
			break;			
	}
}
Exemple #12
0
// Mute状态变化时调用.
VOID DispMute(VOID)
{
#ifdef FUNC_SEG_LCD_EN
	if(gDisplayMode == DISP_DEV_LCD58)
	{
		if(gSys.MuteFg == TRUE)
		{
	   		DispIcon(ICON_MUTE, LIGHT_ON);
		}
		else
		{
			DispIcon(ICON_MUTE, LIGHT_OFF);
		}

		LcdFlushDispData();
	}
#endif

#ifdef FUNC_SEG_LED_EN
//这部分代码用户可以根据需要打开
//	if((gDisplayMode < DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
//	{
//	 	if(gSys.MuteFg == TRUE)
//		{
//			//DBG(("LED MUTE\n"));
//			if(((gSys.SystemMode == SYS_MODE_USB) || (gSys.SystemMode == SYS_MODE_SD)) 
//			&& ((gPlayCtrl.State == PLAY_STATE_STOP) || (gPlayCtrl.State == PLAY_STATE_BROWSE) || (gPlayCtrl.State == PLAY_STATE_IDLE)))
//			{
//				//DBG(("MUTE Exit\n"));
//				gBlink.Blink.MuteBlink = 0;
//				gBlink.Blink.MuteBlankScreen = 0;
//				TimeOutSet(&DispTmr, 0);
//				// Todo here...
//			}
//			else if(!gBlink.Blink.MuteBlink)
//			{
//				//DBG(("MUTE Enter\n"));
//				gBlink.Blink.MuteBlink = 1;
//				gBlink.Blink.MuteBlankScreen = 1;
//				ClearDigit();
//				TimeOutSet(&DispTmr, MUTE_BLINK_INTERVAL);	
//			}
//		}
//		else
//		{
//			gBlink.Blink.MuteBlink = 0;
//			gBlink.Blink.MuteBlankScreen = 0;
//			TimeOutSet(&DispTmr, 0);
//			// Todo here...
//		}
//	}
#endif

#ifdef FUNC_SINGLE_LED_EN
	if(gDisplayMode == DISP_DEV_SLED)
	{
		//DBG(("SLedDispMute\n"));
		SLedDispMute();
	}
#endif
}
Exemple #13
0
// Exit from Special Display-Mode.
VOID DispResume(VOID)
{	
#if (defined(FUNC_SEG_LCD_EN) || defined(FUNC_SEG_LED_EN))
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{
		switch(gSys.SystemMode)
		{
			case SYS_MODE_NONE:				
#ifndef FUNC_RTC_EN
				//DBG(("NOD1"));
				DispString(" NOD");	
#else
				DispRtc();
#endif
				break;

#if (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN))
			case SYS_MODE_SD:
			case SYS_MODE_USB:
				if(gFsInfo.FileSum == 0)
				{
					//DBG(("**NOF\n"));
					DispString(" NOF");	
				}
				else if((gPlayCtrl.State == PLAY_STATE_STOP) || (gPlayCtrl.State == PLAY_STATE_PAUSE))
				{
					DispPlayState();
				}
#ifdef FUNC_FAST_PLAY_EN
				else if((gPlayCtrl.State == PLAY_STATE_PLAY) || (gPlayCtrl.State == PLAY_STATE_FF) || (gPlayCtrl.State == PLAY_STATE_FB))
#endif
				{
					if(gDisplayMode == DISP_DEV_LED1888)
					{
						DispFileNum();
					}
					else
					{						
						DispPlayTime(DIS_PLAYTIME_PALY);
					}
				}
				if(gSys.SystemMode == SYS_MODE_SD)
				{
					DispIcon(ICON_SD, LIGHT_ON);
				}
				else
				{
					DispIcon(ICON_USB, LIGHT_ON);
				}
				break;
#endif

#ifdef FUNC_RADIO_EN
			case SYS_MODE_RADIO:
				if(RadioDisFlag == RadioDisCurFreNum)
				{
					if((gRadioData.CurrFreq >= RADIO_LOWER_BOUND) && (gRadioData.CurrFreq <= RADIO_UPPER_BOUND))
					{
						if(gSys.MuteFg == TRUE)	//暂停状态
						{
							DispString("PAUS");
						}
						else
						{
							Num2Char(gRadioData.CurrFreq, FALSE);						
							DispIcon(ICON_DP_FM_MHZ, LIGHT_ON);
						}
#ifdef AU6210K_BOOMBOX_DEMO
						if(gRadioCtrl.State != RADIO_IDLE)
						{
							DispIcon(ICON_STERO, LIGHT_OFF);
						}
						else if((gRadioMonoEnableFlag == FALSE) && (RadioGetStereoState()))
						{
							DispIcon(ICON_STERO, LIGHT_ON);
						}
#endif
					}					
#ifdef AU6210K_BOOMBOX_DEMO
					DispIcon(ICON_MEMORY, LIGHT_OFF);
#endif
				}
				else if(RadioDisFlag == RadioDisCurChAutoscan)
				{						
					DispChar(' ', POS_COM_THOUSAND);
					DispChar('P', POS_COM_HUNDREDS);
					if(gRadioData.StationSum > 9)
					{
						DispChar((gRadioData.StationSum / 10), POS_COM_TENS);
						DispChar((gRadioData.StationSum % 10), POS_COM_UNITS);
					}
					else
					{
						DispChar(' ', POS_COM_TENS);
						DispChar(gRadioData.StationSum, POS_COM_UNITS);
					}
					DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
#ifdef AU6210K_BOOMBOX_DEMO
					DispIcon(ICON_STERO, LIGHT_OFF);
#endif
				}
				else if(RadioDisFlag == RadioDisCurChChange)
				{
					DispChar(' ', POS_COM_THOUSAND);
					DispChar('P', POS_COM_HUNDREDS);
					if((gRadioData.CurrStation + 1) > 9)
					{
						DispChar(((gRadioData.CurrStation + 1) / 10), POS_COM_TENS);
						DispChar(((gRadioData.CurrStation + 1) % 10), POS_COM_UNITS);
					}
					else
					{
						DispChar(' ', POS_COM_TENS);
						DispChar((gRadioData.CurrStation + 1), POS_COM_UNITS);
					}
					DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
#ifdef AU6210K_BOOMBOX_DEMO
					DispIcon(ICON_MEMORY, LIGHT_OFF);
					DispIcon(ICON_STERO, LIGHT_OFF);
#endif
				}
#ifdef AU6210K_BOOMBOX_DEMO
				else if(RadioDisFlag == RadioDisCurProgramNum)
				{
					DispChar(' ', POS_COM_THOUSAND);
					DispChar('P', POS_COM_HUNDREDS);
					if((gRadioData.CurrStation + 1) > 9)
					{
						DispChar(((gRadioData.CurrStation + 1) / 10), POS_COM_TENS);
						DispChar(((gRadioData.CurrStation + 1) % 10), POS_COM_UNITS);
					}
					else
					{
						DispChar(' ', POS_COM_TENS);
						DispChar((gRadioData.CurrStation + 1), POS_COM_UNITS);
					}
					DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
					DispIcon(ICON_MEMORY, LIGHT_OFF);
					DispIcon(ICON_STERO, LIGHT_OFF);
				}
				else if(RadioDisFlag == RadioDisCurPresetCh)
				{
					if((gRadioData.CurrFreq >= RADIO_LOWER_BOUND) && (gRadioData.CurrFreq <= RADIO_UPPER_BOUND))
					{							
						Num2Char(gRadioData.CurrFreq, FALSE);						
						DispIcon(ICON_DP_FM_MHZ, LIGHT_ON);
						DispIcon(ICON_MEMORY, LIGHT_ON);	
						if((gRadioMonoEnableFlag == FALSE) && (RadioGetStereoState()))
						{
							DispIcon(ICON_STERO, LIGHT_ON);
				}
					}
				}
#endif
				DispIcon(ICON_USB, LIGHT_OFF);
				DispIcon(ICON_SD, LIGHT_OFF);
				DispIcon(ICON_COLON, LIGHT_OFF);
				break;

#endif

#ifdef FUNC_LINEIN_EN
			case SYS_MODE_LINEIN:
				DispString(" AUX");
				DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
				DispIcon(ICON_COLON, LIGHT_OFF);
				break;
#endif

#ifdef FUNC_BLUETOOTH_EN
			case SYS_MODE_BLUETOOTH:
				DispIcon(ICON_USB, LIGHT_OFF);
				DispIcon(ICON_SD, LIGHT_OFF);
				DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
				DispIcon(ICON_MP3, LIGHT_OFF);
				DispIcon(ICON_PLAY, LIGHT_OFF);
				DispIcon(ICON_PAUSE, LIGHT_OFF);
				DispIcon(ICON_COLON, LIGHT_OFF);
				DispString("BLUE");
				break;
#endif


//#ifdef FUNC_RTC_EN
//	   		case SYS_MODE_RTC:
//				Temp = gRtcTime.Hour*100;
//				Temp += gRtcTime.Min;
//				Num2Char(Temp, TRUE);
//				DispIcon(ICON_COLON, LIGHT_BLINK);
//				break;
//#endif

#ifdef FUNC_AUDIO_EN
			case SYS_MODE_AUDIO:				
				DispString(" PC ");
			 	break;
#endif

#ifdef FUNC_READER_EN
			case SYS_MODE_READER:
				DispString(" REA");
			 	break;
#endif				

#ifdef FUNC_AUDIO_READER_EN
			case SYS_MODE_AUDIO_READER:
				DispString(" PC ");
			 	break;
#endif

#ifdef FUNC_STANDBY_EN
			case SYS_MODE_STANDBY:				
#ifndef FUNC_RTC_EN
				DispString(" CLO"); 
#else
				DispRtc();
#endif				
				break;
#endif

			default:
				break;
		}

#ifdef FUNC_SEG_LCD_EN
		if(gDisplayMode == DISP_DEV_LCD58)
		{
			LcdFlushDispData();
		}
#endif
	}
#endif	
}
Exemple #14
0
VOID DispRtc(VOID)
{
	RTC_DATE_TIME gDisRtcVal;
	
#ifdef FUNC_ALARM_EN		
	if(RtcState == RTC_STATE_SET_ALARM)
	{
		gDisRtcVal = gAlarmTime;
	}
	 else
#endif	 	
	{
		gDisRtcVal = gRtcTime;
	}
	
#if (defined(FUNC_SEG_LED_EN) || defined(FUNC_SEG_LCD_EN))
	if((gDisplayMode <= DISP_DEV_LCD58) && (gDisplayMode >= DISP_DEV_LED1888))
	{	
		if(gDisplayMode == DISP_DEV_LED57)
		{
			DispIcon(ICON_PLAY, LIGHT_OFF);	
			DispIcon(ICON_PAUSE, LIGHT_OFF);
			DispIcon(ICON_USB, LIGHT_OFF);
			DispIcon(ICON_SD, LIGHT_OFF);
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_MP3, LIGHT_OFF);
		}
		else if(gDisplayMode == DISP_DEV_LED8888)
		{
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
		}
		
#ifdef	AU6210K_CAR_MODEL_DEMO
		if(RtcState == RTC_STATE_SET_SOURCE)
		{
			switch(RtcSourceState)
			{
				case RTC_SOURCE_CLOCK:
					Temp = gRtcTime.Hour*100;
					Temp += gRtcTime.Min;		
					Num2Char(Temp, TRUE);
					DispIcon(ICON_SLEEP, LIGHT_OFF);
					if(gRtcTime.Sec%2)//秒闪烁
					{
						DispIcon(ICON_COLON, LIGHT_ON);	
					}
					else
					{
						DispIcon(ICON_COLON, LIGHT_OFF);	
					}			
					break;
					
				case RTC_SOURCE_YEAR:
					Temp = gRtcTime.Year;	
					Num2Char(Temp, TRUE);
					DispIcon(ICON_COLON, LIGHT_OFF);				
					break;

				case RTC_SOURCE_MON:
					Temp = gRtcTime.Mon*100;
					Temp += gRtcTime.Date;		
					Num2Char(Temp, TRUE);
					DispIcon(ICON_COLON, LIGHT_OFF);					
					break;

				case RTC_SOURCE_ALARM:
					Temp = gAlarmTime.Hour*100;
					Temp += gAlarmTime.Min;		
					Num2Char(Temp, TRUE);
					DispIcon(ICON_COLON, LIGHT_ON);	
					if(gRtcTime.Sec%2)//秒闪烁
					{
						DispIcon(ICON_SLEEP, LIGHT_ON);
					}
					else
					{
						DispIcon(ICON_SLEEP, LIGHT_OFF);
					}		
					break;

				case RTC_SOURCE_ONOFF:
					DispIcon(ICON_COLON, LIGHT_OFF);	
					if(gRtcTime.Sec%2)//秒闪烁
					{
						DispIcon(ICON_SLEEP, LIGHT_ON);
					}
					else
					{
						DispIcon(ICON_SLEEP, LIGHT_OFF);
					}		
					if(gAlarmState == ALARM_STATUS_OPEN)
					{
						DispChar(' ', 0);
						DispChar('O', 1);
						DispChar('N', 2);
						DispChar(' ', 3);
					}
					else if(gAlarmState == ALARM_STATUS_CLOSE)
					{
						DispChar(' ', 0);
						DispChar('O', 1);
						DispChar('F', 2);
						DispChar('F', 3);
					}
					break;

				default:
					break;			
			}
		}
		else
#endif
		{
			switch(RtcSubState)
			{
				case RTC_SET_NONE:			
					Temp = gRtcTime.Hour * 100;
					Temp += gRtcTime.Min;		
					Num2Char(Temp, TRUE);
					
#ifdef AU6210K_BOOMBOX_DEMO
					if(gAlarm1State == ALARM_STATUS_OPEN)
					{
						DispIcon(ICON_ALARM1, LIGHT_ON);
					}
					else
					{
						DispIcon(ICON_ALARM1, LIGHT_OFF);
					}
					
					if(gAlarm2State == ALARM_STATUS_OPEN)
					{
						DispIcon(ICON_ALARM2, LIGHT_ON);
					}
					else
					{
						DispIcon(ICON_ALARM2, LIGHT_OFF);
					}

					DispIcon(ICON_COLON, LIGHT_ON);	
					
#else
					
					if(gRtcTime.Sec % 2)//秒闪烁
					{
						DispIcon(ICON_COLON, LIGHT_ON);	
					}
					else
					{
						DispIcon(ICON_COLON, LIGHT_OFF);	
					}				
#endif
					break;
				
#ifdef FUNC_ALARM_EN
				case RTC_SET_ALARM_NUM:	
					DispIcon(ICON_COLON, LIGHT_OFF);	
					DispChar('A', 0);
					DispChar('L', 1);
					DispChar(' ', 2);
					
					if(RtcAutOutTimeCount % 2)
					{
						DispChar(RtcAlarmNum + 0x30, 3);
					}
					else
					{
						DispChar(' ', 3);
					}
					break;
		
				case RTC_SET_ALARM_MODE:
					DispIcon(ICON_COLON, LIGHT_OFF);	
					DispChar('A', 0);
					DispChar('O', 1);
					DispChar(' ', 2);
					
					if(RtcAutOutTimeCount % 2)
					{
						DispChar(gAlarmMode + 0x30, 3);
					}
					else
					{
						DispChar(' ', 3);
					}
					break;
		
				case RTC_SET_WEEK:
					DispIcon(ICON_COLON, LIGHT_OFF);	
					DispChar('A', 0);
					DispChar(' ', 1);
					DispChar(' ', 2);
					if(RtcAutOutTimeCount%2)
					{
						DispChar((gDisRtcVal.WDay + 0x30), 3);
					}
					else
					{
						DispChar(' ', 3);
					}
					break;
#endif
				
				case RTC_SET_YEAR:
					DispIcon(ICON_COLON, LIGHT_OFF);		
					if(gRtcRdWrFlag == SET_RTC_TIME_YEAR)		
					{					
						if(RtcAutOutTimeCount % 2)
						{
							Temp = gDisRtcVal.Year;
							Num2Char(Temp, TRUE);				
						}
						else
						{
							DispChar(' ', 3);
							DispChar(' ', 2);					
							DispChar(' ', 1);
							DispChar(' ', 0);	
						}	
					}
					else if(gRtcRdWrFlag == READ_RTC_TIME)//year->mon data->weekday->hour min
					{					
						if(RtcAutOutTimeCount > 15)				
						{
							Temp = gDisRtcVal.Year;
						}
						else if(RtcAutOutTimeCount > 10)
						{
							Temp = gDisRtcVal.Mon * 100;
							Temp += gDisRtcVal.Date;
						}
						else if(RtcAutOutTimeCount > 5)
						{
							Temp = gDisRtcVal.WDay;
						}
						else
						{
							Temp = gDisRtcVal.Hour * 100;
							Temp += gDisRtcVal.Min;
						}
						Num2Char(Temp, TRUE);									
					}
					break;
		
				case RTC_SET_MON:
					DispIcon(ICON_COLON, LIGHT_OFF);	
					if(RtcAutOutTimeCount % 2)
					{
						Temp = gDisRtcVal.Mon * 100;
						Temp += gDisRtcVal.Date;		
						Num2Char(Temp, TRUE);
					}
					else
					{
						DispChar(' ', 1);
						DispChar(' ', 0);
					}		
					break;
		
				case RTC_SET_DATE:
					DispIcon(ICON_COLON, LIGHT_OFF);	
					if(RtcAutOutTimeCount % 2)
					{
						Temp = gDisRtcVal.Mon * 100;
						Temp += gDisRtcVal.Date;		
						Num2Char(Temp, TRUE);
					}
					else
					{					
						DispChar(' ', 3);
						DispChar(' ', 2);
					}	
					break;
											
				case RTC_SET_HR:
					DispIcon(ICON_COLON, LIGHT_ON);	
					if(RtcAutOutTimeCount % 2)
					{
						Temp = gDisRtcVal.Hour * 100;
						Temp += gDisRtcVal.Min;		
						Num2Char(Temp, TRUE);
					}
					else
					{
						DispChar(' ', 1);
						DispChar(' ', 0);				
					}		
					break;
		
				case RTC_SET_MIN:
					DispIcon(ICON_COLON, LIGHT_ON);	
					if(RtcAutOutTimeCount % 2)
					{
						Temp = gDisRtcVal.Hour * 100;
						Temp += gDisRtcVal.Min;		
						Num2Char(Temp, TRUE);					
					}
					else
					{					
						DispChar(' ', 3);
						DispChar(' ', 2);
					}	
					break;

#ifdef	AU6210K_CAR_MODEL_DEMO
				case RTC_SET_ALARM_ONOFF:
					DispIcon(ICON_COLON, LIGHT_OFF);						
					if(gAlarmState == ALARM_STATUS_OPEN)
					{
					   	if(RtcAutOutTimeCount%2)
						{
							DispChar(' ', 0);
							DispChar('O', 1);
							DispChar('N', 2);
							DispChar(' ', 3);
						}
						else
						{
							DispChar(' ', 3);
							DispChar(' ', 2);
							DispChar(' ', 1);
							DispChar(' ', 0);
						}
					}
					else if(gAlarmState == ALARM_STATUS_CLOSE)
					{
					   	if(RtcAutOutTimeCount%2)
						{
							DispChar(' ', 0);
							DispChar('O', 1);
							DispChar('F', 2);
							DispChar('F', 3);
						}
						else
						{
							DispChar(' ', 3);
							DispChar(' ', 2);
							DispChar(' ', 1);
							DispChar(' ', 0);
						}
					}
					break;
#endif
					
#ifdef AU6210K_BOOMBOX_DEMO
				case RTC_SET_ALARM_SOURCE:
					if(gAlarmSource == RTC_ALARM_SOURCE_RADIO)
					{
						DispChar(' ', 0);
						DispChar('A', 1);
						DispChar('F', 2);
						DispChar(' ', 3);
					}
					else if(gAlarmSource == RTC_ALARM_SOURCE_USB)
					{
						DispChar(' ', 0);
						DispChar('A', 1);
						DispChar('U', 2);
						DispChar(' ', 3);
					}
					else if(gAlarmSource == RTC_ALARM_SOURCE_CARD)
					{
						DispChar(' ', 0);
						DispChar('A', 1);
						DispChar('D', 2);
						DispChar(' ', 3);
					}
					else if(gAlarmSource == RTC_ALARM_SOURCE_AUX)
					{
						DispChar(' ', 0);
						DispChar('A', 1);
						DispChar('A', 2);
						DispChar(' ', 3);
					}
					else if(gAlarmSource == RTC_ALARM_ONOFF)
					{
						DispChar(' ', 0);
						DispChar('O', 1);
						DispChar('F', 2);
						DispChar('F', 3);
					}
					DispIcon(ICON_COLON, LIGHT_OFF);	
					break;
		
				case RTC_SET_ALARM_VOLUME:					
					DispChar(' ', POS_COM_THOUSAND);
					DispChar('U', POS_COM_HUNDREDS);
					DispChar((gAlarmVolume / 10), POS_COM_TENS);
					DispChar((gAlarmVolume % 10), POS_COM_UNITS);
					DispIcon(ICON_COLON, LIGHT_OFF);	
					break;
#endif
					
				default:
					break;
			}	
		}
	}
#endif
}
Exemple #15
0
//该函数级别高主要处理设置
static BYTE DispSysTimOff(VOID)
{
	if((gSysTimeOffState.ProState > SYS_OFF_TIMEING_IDLE) && (gSysTimeOffState.ProState < SYS_OFF_TIMEING_WAIT_POWEROFF))
	{
		if(gDisplayMode == DISP_DEV_LED57)
		{
			DispIcon(ICON_PLAY, LIGHT_OFF);	
			DispIcon(ICON_PAUSE, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);
			DispIcon(ICON_MP3, LIGHT_OFF);				
		}
		else if(gDisplayMode == DISP_DEV_LED8888)
		{
			DispIcon(ICON_DP_FM_MHZ, LIGHT_OFF);
			DispIcon(ICON_COLON, LIGHT_OFF);		
		}
							
		if(gSysTimeOffState.EnState == TRUE)
		{			
			DispIcon(ICON_SLEEP, LIGHT_ON);	
			
			switch(gSysTimeOffState.SleepState)
			{
				case SLEEP_15:
					DispString("  15");
					break;

				case SLEEP_30:
					DispString("  30");
					break;

				case SLEEP_45:
					DispString("  45");
					break;
					
				case SLEEP_60:
					DispString("  60");
					break;

				case SLEEP_75:
					DispString("  75");
					break;
					
				case SLEEP_90:
					DispString("  90");
					break;

				case SLEEP_105:
					DispString(" 105");
					break;
					
				case SLEEP_120:
					DispString(" 120");
					break;	
					
				default:
					break;
			}	
		}
		else
		{
			DispString(" CLO");
			DispIcon(ICON_SLEEP, LIGHT_OFF);		
		}
		return TRUE;
	}
	else
	{
		return FALSE;
	}
}
Exemple #16
0
/*****************************************************************************
** Descriptions:	������
** Parameters:          void
** Returned value:	void
** Created By:		����2012.07.27
** Remarks:
*****************************************************************************/
s32 MainMenu(void) {
//    SDK_DISP_PIXEL pixel;

    u8 btName[68] = {"������: "};
    u8 tmpBtname[68] = {0};
    int retVal = 0;


    Trace("mpos", "go into MainMenu\r\n");
//    memset(&pixel, 0, sizeof(SDK_DISP_PIXEL));
    pgstTradeData->ucTradeId = TRADEID_MAINMENU;

    sdkUIClearItems();
    sdkUISetShowMode(SDK_UI_SHOW_MODE_1_ROW);

    Verify(sdkUIAddHideItem((s32) SDK_KEY_FUNCTION, OnSysSetting) >= 0);

#if 0
    Verify(sdkUIAddHideItem((s32)SDK_KEY_1, TestOnOpenMagCardDevice) >= 0);
    Verify(sdkUIAddHideItem((s32)SDK_KEY_2, TestOnCloseMagCardDevice) >= 0);
    Verify(sdkUIAddHideItem((s32)SDK_KEY_3, TestOnReadMagCard) >= 0);
    Verify(sdkUIAddHideItem((s32)SDK_KEY_4, TestOnReadMagCardEncrypt) >= 0);
    //Verify(sdkUIAddHideItem((s32)SDK_KEY_5, DrawText) >= 0);

    Verify(sdkUIAddHideItem((s32)SDK_KEY_6, TestOnDataEncrypt) >= 0);
    Verify(sdkUIAddHideItem((s32)SDK_KEY_7, TestOnMAC) >= 0);
    //Verify(sdkUIAddHideItem((s32)SDK_KEY_8, TestOnGetDateTime) >= 0);
    //Verify(sdkUIAddHideItem((s32)SDK_KEY_9, TestOnSetDateTime) >= 0);
#endif
//	sdkUIShowMenu();

    //-----------------------------------------------------
    sdkDispClearScreen();
#ifndef DEL_CODE_EXCESS                //ɾ���������: 20150304
    ShowBackground(BACKGROUNDBMP);

//    giAutoRetTimer = sdkTimerGetId();//Xiaox 15-1-12 ���ڽ��յ�ָ��ǰ
    if (ShowBackground(WELCOMBMP) != SDK_OK) ShowLogo(0, 0);
//    pixel = sdkDispGetScreenPixel();
//	sdkDispClearScreen();
#endif	//DEL_CODE_EXCESS	ɾ���������: 20150304

    //sdkDispFillRowRam(SDK_DISP_LINE2-ROW_OFFSET, 0, "���������", gDisplayMode == 0?SDK_DISP_DEFAULT: SDK_DISP_NOFDISP| SDK_DISP_CDISP|SDK_DISP_INCOL);//Xiaox 15-1-14 for test
    sdkDispFillRowRam(SDK_DISP_LINE2 - ROW_OFFSET, 0, "��ӭʹ��ȫ����POS",
                      gDisplayMode == 0 ? SDK_DISP_DEFAULT : SDK_DISP_NOFDISP | SDK_DISP_CDISP |
                                                             SDK_DISP_INCOL);//Xiaox 15-1-14 for test        //20150324 �����滻

    if (BLUETOOTH == gucCurCommMode) {
        retVal = sdkBtGetName(tmpBtname, sizeof(tmpBtname) - 1);

        if (retVal == SDK_OK)//2015-01-08
        {
            strcat(btName, tmpBtname);
            sdkDispFillRowRam(SDK_DISP_LINE3 - ROW_OFFSET, 0, btName,
                              gDisplayMode == 0 ? SDK_DISP_DEFAULT : SDK_DISP_NOFDISP |
                                                                     SDK_DISP_CDISP |
                                                                     SDK_DISP_INCOL);//Xiaox 15-1-14 for test
        }
        else {
            //Trace("Lai","sdkBtGetName error:%d\r\n",retVal);
        }
    }


#ifdef XGD_SDK_DEBUG
    sdkDispFillRowRam(SDK_DISP_LINE4-ROW_OFFSET, 0, "���԰汾,��������", gDisplayMode == 0?SDK_DISP_DEFAULT: SDK_DISP_NOFDISP| SDK_DISP_CDISP|SDK_DISP_INCOL);//Xiaox 15-1-14 for test
#else
    //20150402 ��ʾCSN�ͻ����к�, ���Է��ڰ汾��Ϣ��
    //sdkDispFillRowRam(SDK_DISP_LINE4-ROW_OFFSET, 0, MposDeviceId, gDisplayMode == 0?SDK_DISP_DEFAULT: SDK_DISP_NOFDISP| SDK_DISP_CDISP|SDK_DISP_INCOL);//Xiaox 15-1-14 for test
#endif
    DispIcon();
    DispSysRtc(SDK_DISP_LINE5 - ROW_OFFSET, false);
    sdkDispBrushScreen();
    return SDK_OK;
}