// Save the information into external storage device.
// If succeed return TRUE,otherwise return FALSE.
BOOL RadioWriteData(VOID)
{
#ifdef FUNC_BREAK_POINT_EN	
	BP_SaveInfo((BYTE*)&gBreakPointInfo.PowerMemory.RadioData2Store, sizeof(gBreakPointInfo.PowerMemory.RadioData2Store));
	return TRUE;
#else
	return FALSE;
#endif
}
// 设置系统音量并同时解除Mute状态
VOID SetVolumeWithMute(VOID)
{
#ifdef AU6210K_NR_D_8_CSRBT
	DBG((">>NPCA110X_DAC1_Set_Volume_and_Mute() %d\n",(WORD)gSys.Volume));
#if (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN))
	if(gSys.SystemMode == SYS_MODE_SD)
		SetVolume();
	else
#endif
	{
		NPCA110X_DAC1_Set_Volume_and_Mute(gSys.Volume);
#ifdef FUNC_BREAK_POINT_EN
		BP_SaveInfo(&gBreakPointInfo.PowerMemory.Volume,sizeof(gBreakPointInfo.PowerMemory.Volume));
#endif
		
	}
	DBG(("gSys.Volume = %x\n",gSys.Volume));	
DBG(("gBreakPointInfo.PowerMemory.Volume = %x\n",gBreakPointInfo.PowerMemory.Volume));	


#else
	SetVolume();
#endif

	if((gSys.Volume == 0) && (IsDacMute == FALSE))
	{
		gSys.MuteFg = FALSE;		
		MuteOn(FALSE, TRUE);		
	}
	if((IsDacMute == TRUE) && (gSys.Volume > 0))
	{
		gSys.MuteFg = TRUE;
	}
	if(gSys.MuteFg == TRUE)
	{
		gSys.MuteFg = FALSE;
		DBG1(("rrrrrr\n"));
		UnMute();	
	}

#ifdef FUNC_DISP_EN
#ifndef FUNC_SINGLE_LED_EN
	DispMute();	  //正确恢复Mute显示状态。避免从Mute状态下设置音量造成的显示错误。
#endif	
#endif
}
Beispiel #3
0
VOID RtcStateCtrl(VOID)
{
	MESSAGE Event = MessageGet(MSG_FIFO_RTC);

#ifdef FUNC_STANDBY_EN
	if(gSys.SystemMode == SYS_MODE_STANDBY)
#endif
	{
		RtcMsgPro(Event);
	}
	
#ifdef FUNC_ALARM_EN	
	if(RtcSubState == RTC_SET_NONE)
	{
		//Check alarm
		if(gCurAlarmNum = CheckRtcAlarmFlag())
		{
			DBG(("\nRTC ALARM COME!\n"));
			
#ifdef	AU6210K_CAR_MODEL_DEMO
			gAlarmOnFlag = TRUE;
#endif
#ifdef FUNC_BREAK_POINT_EN
			BP_SaveInfo((BYTE*)&gBreakPointInfo.PowerMemory.AlarmList2Store, sizeof(gBreakPointInfo.PowerMemory.AlarmList2Store));
#endif

#ifdef AU6210K_BOOMBOX_DEMO
			if(gCurAlarmNum == 1)
			{
				gAlarm1OnFlag = TRUE;
			}
			else
			{
				gAlarm2OnFlag = TRUE;
			}
#endif
		}
	}
#endif

	//Display time
	RtcDisplay();
}
//进入FM 后初始化函数
VOID RadioEnterInit(VOID)
{	
#ifdef FUNC_SPI_KEY_SOUND_EN
	RadioSetFreq();
	RadioMute(FALSE);
	RadioSetVolume(gSys.Volume);	
#endif

	gRadioCtrl.State = RADIO_IDLE;
	UnMute();	

#ifdef FUNC_POWER_AMPLIFIER_EN
	ABPowerAmplifierOff();	//在FM模式下选择D 类功放
#endif
	
#ifdef FUNC_BREAK_POINT_EN
	BP_SaveInfo(&gBreakPointInfo.PowerMemory.SystemMode,sizeof(gBreakPointInfo.PowerMemory.SystemMode));
#endif

#ifdef FUNC_RADIO_ESD_AUTO_RESUME
	RadioStateCheckCount = 0;
	TimeOutSet(&RadioStateCheckTimer, 250);
#endif
}
Beispiel #5
0
bool LineInControl(void)
{
	uint16_t Msg = 0;
	SW_TIMER LineInTimer;

	APP_DBG("Enter LineInControl...\n");

	if(!IsLineInLink())
	{
		APP_DBG("Exit LineInControl...\n");
		return TRUE;
	}

#ifndef FUNC_MIXER_SRC_EN
	AudioSampleRateSet(44100);
#endif	
	
	SoundRemind(SOUND_LINEIN); 
    
#ifdef FUNC_TREB_BASS_EN
	if(gSys.EqStatus == 0)
	{
		TrebBassSet(gSys.TrebVal, gSys.BassVal);
	}
#endif
	
	if(gSys.MicEnable)
	{
		MixerMute(MIXER_SOURCE_ANA_MONO);	
		MixerMute(MIXER_SOURCE_MIC);
	}
	else
	{
		MixerMute(MIXER_SOURCE_ANA_STERO);
	}
	WaitMs(20);
	
	AudioAnaSetChannel(gSys.MicEnable ? AUDIO_CH_MIC_LINEIN : AUDIO_CH_LINEIN);
	
	if(gSys.MicEnable)
	{
		MixerUnmute(MIXER_SOURCE_ANA_MONO);	
		MixerUnmute(MIXER_SOURCE_MIC);
	}
	else
	{
		MixerUnmute(MIXER_SOURCE_ANA_STERO);
	}
	
	// ÏûÏ¢×¢²á
    if(gSys.MuteFlag)
	{
    	gSys.MuteFlag = 0;
		AudioPlayerMute(gSys.MuteFlag);
	} 

	InitTimer(&LineInTimer, 250, LineInLedCb);
	StartTimer(&LineInTimer);
	AudioSysInfoSetBreakPoint();

	SetModeSwitchState(MODE_SWITCH_STATE_DONE);
	
	while(Msg != MSG_COMMON_CLOSE)
	{
		//led light timer
		CheckTimer(&LineInTimer);
		
		Msg = MsgRecv(5);

		switch(Msg)
		{			
			case MSG_MODE:        //working mode changing
				Msg = MSG_COMMON_CLOSE;
				break;
			
			case MSG_POWER:
				gSys.NextModuleID = MODULE_ID_STANDBY;
				Msg = MSG_COMMON_CLOSE;
				break;
			
#ifdef FUNC_RECORD_EN
			case MSG_REC:  //¼Òô
				gSys.ModuleIDBackUp = gSys.CurModuleID;
				gSys.NextModuleID = MODULE_ID_RECORDER;
				gSys.RecordState = RECORD_STATE_REC;
				gSys.RecordSource = RECORD_SOURCE_LINEIN;
				Msg = MSG_COMMON_CLOSE;
				break;
#endif
           
#ifdef FUNC_REC_PLAYBACK_EN
			case MSG_REC_PLAYBACK:
				EnterRecBackPlay(gSys.CurModuleID, IsUDiskLink() ? DEV_ID_USB : DEV_ID_SD, TRUE, 0, 0);
				break;
#endif

			default:
				CommonMsgProccess(Msg);
				break;

		}
	}
#if (defined(FUNC_BREAKPOINT_EN) && (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN)))
	{
		BP_SYS_INFO *pBpSysInfo;
		pBpSysInfo = (BP_SYS_INFO *)BP_GetInfo(BP_SYS_INFO_TYPE);
		BP_SET_ELEMENT(pBpSysInfo->Volume, gSys.Volume);
        BP_SET_ELEMENT(pBpSysInfo->Eq, gSys.Eq);
		BP_SaveInfo(BP_SAVE2NVM);
	}
#endif
	AudioAnaSetChannel(gSys.MicEnable ? AUDIO_CH_MIC : AUDIO_CH_NONE);	
	APP_DBG("leave LineInControl...\n");
	return TRUE;//OK
}
// 设置系统音量
VOID SetVolume(VOID)
{
	DBG((">>SetVolume() %d\n",(WORD)gSys.Volume));
	
	switch(gSys.SystemMode)
	{
#if (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN))
#ifdef FUNC_USB_EN
		case SYS_MODE_USB:
#endif
#ifdef FUNC_CARD_EN
		case SYS_MODE_SD:
#endif
#ifdef	FUNC_OTP_PLAY_EN
		case SYS_MODE_OTPDEV:
#endif
			PlayVol2Decd();
			break;
#endif

#ifdef FUNC_LINEIN_EN
		case SYS_MODE_LINEIN:
			SetLineInVolume(gSys.Volume);
			break;
#endif

#ifdef FUNC_BLUETOOTH_CSR_EN
		case SYS_MODE_BLUETOOTH:
			SetBluetoothVolume(gSys.Volume);
			break;
#endif

#if 0//def FUNC_BLUETOOTH_EN
		case SYS_MODE_BLUETOOTH:
			SetBluetoothVolume(gSys.Volume);
			break;
#endif


#ifdef FUNC_RADIO_EN
		case SYS_MODE_RADIO:
			RadioSetVolume(gSys.Volume);
			break;
#endif

#ifdef FUNC_AUDIO_EN
		case SYS_MODE_AUDIO:
			DeviceAudioSetVolume();
			break;
#endif

#ifdef FUNC_AUDIO_READER_EN
		case SYS_MODE_AUDIO_READER:
			DeviceAudioSetVolume();
			break;
#endif

		default:
			return;//break;
	}

#ifdef FUNC_BREAK_POINT_EN
	BP_SaveInfo(&gBreakPointInfo.PowerMemory.Volume,sizeof(gBreakPointInfo.PowerMemory.Volume));
#endif

}
Beispiel #7
0
//这2个函数可以放在lib中,...结束
VOID RtcCtrlInit(VOID)
{	
#ifdef	FUNC_UARTDBG_EN
	 BYTE i;
#endif

#ifdef FUNC_ALARM_EN		
	extern BYTE GetRtcCurAlarmNum(VOID);
	
	InitRtc(gAlarmList, sizeof(gAlarmList) / sizeof(AlARM_INFO));
	gCurAlarmNum = GetRtcCurAlarmNum(); //0表示没有闹钟 
	DBG(("gCurAlarmNum:%02BX\n", gCurAlarmNum));	
#else
	InitRtc(NULL, 0); // 该函数必须调用
#endif

	RtcState = RTC_STATE_IDLE;
	RtcSubState = RTC_SET_NONE;
	RtcUpdateDisplay = FALSE;
	RtcFlag = 1;
	RtcAutOutTimeCount = 0;
	TimeOutSet(&RtcReadTimer, 0);
	TimeOutSet(&RtcSetCntTimer, 0);

#ifdef FUNC_ALARM_EN
#ifdef FUNC_BREAK_POINT_EN
	BP_SaveInfo((BYTE *)&gBreakPointInfo.PowerMemory.AlarmList2Store, sizeof(gBreakPointInfo.PowerMemory.AlarmList2Store));
#endif	

#ifdef	FUNC_UARTDBG_EN
	for(i = 0; i < MAX_ALARM_NUM; i++)
	{
		 DBG(("gpAlarmList[%bu].AlarmMode:%bx,", i, gAlarmList[i].AlarmMode));
		 DBG(("gAlarmList[%bu].AlarmTimeAsSeconds:%lu,", i, gAlarmList[i].AlarmTimeAsSeconds));
		 DBG(("gAlarmList[%bu].AlarmStatus:%bx\n", i, gAlarmList[i].AlarmStatus));
	}
#endif

#ifdef	AU6210K_CAR_MODEL_DEMO
	DBG(("InitRtc2\n"));
	RtcSourceState = RTC_SOURCE_CLOCK;
	DBG(("RtcSourceState=%bu\n", RtcSourceState));
	if(GetAlarmStatus(RtcAlarmNum))
	{
		gAlarmState = ALARM_STATUS_OPEN;
		DBG(("gAlarmState= ALARM_STATUS_OPEN\n"));
	}
	else
	{
		gAlarmState = ALARM_STATUS_CLOSE;
		DBG(("gAlarmState= ALARM_STATUS_CLOSE\n"));
	}			
#endif

	
#ifdef AU6210K_BOOMBOX_DEMO
	if(GetAlarmStatus(1))
	{
		gAlarm1State = ALARM_STATUS_OPEN;
		DBG(("gAlarm1State= ALARM1_STATUS_OPEN\n"));
	}
	else
	{
		gAlarm1State = ALARM_STATUS_CLOSE;
		DBG(("gAlarm1State= ALARM1_STATUS_CLOSE\n"));
	}		

	if(GetAlarmStatus(2))
	{
		gAlarm2State = ALARM_STATUS_OPEN;
		DBG(("gAlarm2State= ALARM2_STATUS_OPEN\n"));
	}
	else
	{
		gAlarm2State = ALARM_STATUS_CLOSE;
		DBG(("gAlarm2State= ALARM2_STATUS_CLOSE\n"));
	}			
#endif
#endif

	
//	//测试用,客户根据实际情况设置。
//	gRtcTime.Year = 1980;
//	gRtcTime.Mon = 1;
//	gRtcTime.Date = 1;
//	gRtcTime.WDay = 1;	// 0:星期日
//	gRtcTime.Hour = 7;
//	gRtcTime.Min = 0; 
//	gRtcTime.Sec = 0;
//  SetRTCCurrTime(&gRtcTime);
//	gAlarmTime.Year = 1980; 
//	gAlarmTime.Mon = 1;
//	gAlarmTime.Date = 1;
//	gAlarmTime.WDay = 1;
//	gAlarmTime.Hour = 8;
//	gAlarmTime.Min = 0;
//	gAlarmTime.Sec = 0;
//  gAlarmMode = ALARM_MODE_ONCE_ONLY;
//  SetAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);

#ifdef AU6210K_BOOMBOX_DEMO	
	gRtcTime.Hour = 12;
	gRtcTime.Min = 0; 
	gRtcTime.Sec = 0;
	SetRTCCurrTime(&gRtcTime);
	
	gAlarmTime.Hour = 0;
	gAlarmTime.Min = 0;
	gAlarmTime.Sec = 0;
	gAlarmMode = ALARM_MODE_PER_DAY;
	SetAlarmTime(1, gAlarmMode, &gAlarmTime);
	SetAlarmTime(2, gAlarmMode, &gAlarmTime);
#endif
}
Beispiel #8
0
//如果有和此函数类似用法(嵌入到各个模式)的函数位于其后,此函数不要有default,防止拦截后者有用的消息
VOID RtcMsgPro(BYTE Msg)
{	
	if(RtcState == RTC_STATE_IDLE)
	{
#ifdef	AU6210K_CAR_MODEL_DEMO
		if((Msg != MSG_NONE) && (gAlarmOnFlag == TRUE))
		{
			gAlarmOnFlag = FALSE;
		}
#endif
		
		switch(Msg)
		{	
#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_REPEAT:
#endif
#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_CLOCK:
#endif
			case MSG_RTC_SET:
				DBG(("RTC_SET\n"));
				RtcFlag = 1;
				RtcUpdateDisplay = TRUE;
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
#ifdef AU6210K_BOOMBOX_DEMO
				RtcSubState = RTC_SET_HR;
				RtcState = RTC_STATE_SET_TIME;
				break;
#endif
				RtcState = RTC_STATE_SET_TIME;
				RtcSubState = RTC_SET_NONE;
				
#ifdef	AU6210K_CAR_MODEL_DEMO
				if(Msg == MSG_REPEAT)
#else
				if(Msg == MSG_RTC_SET)
#endif
				{
					gRtcRdWrFlag = SET_RTC_TIME_YEAR;
				}
				else 
				{
					gRtcRdWrFlag = READ_RTC_TIME;
				}
				RtcNextSubState();
				break;

#ifdef FUNC_ALARM_EN
#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_ALARM1_SET:
			case MSG_ALARM2_SET:
#endif
			case MSG_ALARM_SET:
#ifndef	AU6210K_CAR_MODEL_DEMO
				DBG(("ALARM_SET\n"));
				RtcFlag = 2;
				RtcUpdateDisplay = TRUE;
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
#ifdef AU6210K_BOOMBOX_DEMO
				if(Msg == MSG_ALARM1_SET)
				{
					RtcAlarmNum = 1;
				}
				else if(Msg == MSG_ALARM2_SET)
				{
					RtcAlarmNum = 2;
				}
#endif
	
				if((RtcAlarmNum > 0) && (RtcAlarmNum <= MAX_ALARM_NUM))
				{
					gAlarmMode = GetAlarmTime(RtcAlarmNum, &gAlarmTime);
					if((gAlarmMode < ALARM_MODE_ONCE_ONLY) || (gAlarmMode > ALARM_MODE_PER_WEEK))
					{
						gAlarmMode = ALARM_MODE_PER_DAY;	
					}
					CheckAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);									
				}
				else
				{
					DBG(("闹钟错误\n"));
				}
				
#ifdef AU6210K_BOOMBOX_DEMO
				RtcSubState = RTC_SET_HR;
				RtcState = RTC_STATE_SET_ALARM;
				break;
#endif
				RtcState = RTC_STATE_SET_ALARM;
				RtcSubState = RTC_SET_NONE;
				RtcNextSubState();
#endif
#endif
				break;
								
			default:
				break;
		}
	}
	else if(RtcState == RTC_STATE_SET_TIME)
	{
		switch(Msg)
		{
#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_PRE:
#endif
#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_PREV1:
#endif
			case MSG_RTC_DOWN:
				DBG(("RTC_DOWN\n"));
				RtcUpdateDisplay = TRUE;
				GetRTCCurrTime(&gRtcTime);
				RtcTimeDown(&gRtcTime);
				SetRTCCurrTime(&gRtcTime);
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_NEXT:
#endif
#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_NEXT1:
#endif
			case MSG_RTC_UP:
				DBG(("RTC_UP\n"));
				RtcUpdateDisplay = TRUE;
				GetRTCCurrTime(&gRtcTime);
				RtcTimeUp(&gRtcTime);
				SetRTCCurrTime(&gRtcTime);
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_PLAY_PAUSE:
#endif
#ifdef	AU6210K_BOOMBOX_DEMO
			case MSG_CLOCK:
#endif
			case MSG_RTC_SW:
				DBG(("RTC_SW\n"));
#ifdef AU6210K_BOOMBOX_DEMO
				if(RtcSubState == RTC_SET_MIN)
				{
					RtcState = RTC_STATE_IDLE;
					RtcSubState = RTC_SET_NONE;
					RtcAutOutTimeCount = 0;
					break;
				}
#endif
				RtcUpdateDisplay = TRUE;
				RtcNextSubState();
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

			default:
				break;
		}

		if(TRUE == RtcAlarmSetWaitTime())
		{		
			//这样设置时间是因为SetRtcRefcnt函数有延时如果此时在播放mp3按键有卡声音	
			if(gRtcRdWrFlag != READ_RTC_TIME)
			{
				SetRTCCurrTime(&gRtcTime);
			}
		}
	}
#ifdef FUNC_ALARM_EN
	else if(RtcState == RTC_STATE_SET_ALARM)
	{
		switch(Msg)
		{
#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_PRE:
#endif

#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_PREV1:
#endif
			case MSG_RTC_DOWN:
				DBG(("ALARM RTC_DOWN\n"));
				RtcUpdateDisplay = TRUE;      				
				RtcTimeDown(&gAlarmTime);
				CheckAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);
				SetAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
#ifdef FUNC_BREAK_POINT_EN
				BP_SaveInfo((BYTE*)&gBreakPointInfo.PowerMemory.AlarmList2Store, sizeof(gBreakPointInfo.PowerMemory.AlarmList2Store));
#endif
				break;

#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_NEXT:
#endif

#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_NEXT1:
#endif

			case MSG_RTC_UP:
				DBG(("ALARM RTC_UP\n"));
				RtcUpdateDisplay = TRUE;               				
				RtcTimeUp(&gAlarmTime);
				CheckAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);
				SetAlarmTime(RtcAlarmNum, gAlarmMode, &gAlarmTime);
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
#ifdef FUNC_BREAK_POINT_EN
				BP_SaveInfo((BYTE*)&gBreakPointInfo.PowerMemory.AlarmList2Store, sizeof(gBreakPointInfo.PowerMemory.AlarmList2Store));
#endif
				break;

#ifdef	AU6210K_CAR_MODEL_DEMO
			case MSG_PLAY_PAUSE:
#endif
#ifdef AU6210K_BOOMBOX_DEMO
			case MSG_ALARM1_SET:
			case MSG_ALARM2_SET:
#endif
			case MSG_RTC_SW:
				DBG(("ALARM SW\n"));
#ifdef AU6210K_BOOMBOX_DEMO
				if(((RtcAlarmNum == 1) && (Msg != MSG_ALARM1_SET)) || ((RtcAlarmNum == 2) && (Msg != MSG_ALARM2_SET)))			
				{
					break;
				}

				if(RtcSubState == RTC_SET_ALARM_VOLUME)
				{					
					RtcState = RTC_STATE_IDLE;
					RtcSubState = RTC_SET_NONE;
					RtcAutOutTimeCount = 0;
					break;
				}
#endif
				RtcUpdateDisplay = TRUE;
				RtcNextSubState();		
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

			default:
				break;
		}

		if(TRUE == RtcAlarmSetWaitTime())
		{
			DBG(("EXIT RTC_STATE_SET_TIME!\n"));		
			RtcState = RTC_STATE_IDLE;
			RtcSubState = RTC_SET_NONE;
			RtcFlag = 1;		
		}
	}
#endif
#ifdef	AU6210K_CAR_MODEL_DEMO
	else if(RtcState == RTC_STATE_SET_SOURCE)
	{
		switch(Msg)
		{
			case MSG_PRE:			
				DBG(("RTC SOURCE_DOWN\n"));
				RtcUpdateDisplay = TRUE;
				RtcSourceDown();
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

			case MSG_NEXT:
				DBG(("RTC SOURCE_UP\n"));
				RtcUpdateDisplay = TRUE;
				RtcSourceUp();
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;

			case MSG_REPEAT:
				DBG(("RTC SOURCE_Enter\n"));
				RtcUpdateDisplay = TRUE;
				RtcSourceEnter();
				RtcAutOutTimeCount = RTC_AUTO_OUT_TIME_COUNT;
				break;
				
			default:
				break;
		}

		if(TRUE == RtcAlarmSetWaitTime())
		{
			DBG(("EXIT RTC_STATE_SET_SOURCE!\n"));		
			RtcState = RTC_STATE_IDLE;
			RtcSubState = RTC_SET_NONE;
			RtcFlag = 1;		
		}	
	}
#endif
}