#include "p_apps.h"
#include "v_task.h"

void _OnImpossibleKey()
{
	BootIndication(0);
	Cam_LedOff(0);
	Cam_LedOn(0);
	DebugCString((PCCHAR)"");
	DefaultSettings();
	DisplayCursor(TRUE);
	DisplayInitialize();
	DisplayStatus((PCCHAR)"", 0, 0);
	GetHardwareVersion();
	GetSoftwareVersion();
	GetVersionText();
	IsBroadcastIP((PXCHAR)0);
	IsFunctionMode();
	IsPassword((PXCHAR)0);
	KeypadBackspace();
	OnReboot();
	OnUpdateOptions();
	OutputPXCHAR((PXCHAR)1, 0);
	p_getKeyId(0);
	p_IsNewLine((PXCHAR)0);
	p_Mac2String((PXCHAR)0, (PXCHAR)0);
	p_String2IP((PXCHAR)0, (PXCHAR)0);
	p_String2Mac((PXCHAR)0, (PXCHAR)0);
	PPPoEDisconnect();
	ProxyGetLocalIP((PXCHAR)0);
	Run_46Mhz();
	SdramCopyData(0, (PXCHAR)0);
	SdramCopyData_0(0, (PXCHAR)0);
	SdramSaveData(0, (PXCHAR)0, 0);
	SdramUpdateFlagByte(0, 0);
	SoloFileGetSize();
	SoloFileIsRunning();
	SoloFileSetLimit(0);
	SoloFileWriteSdramCache((UCHAR)256);
	SysLoadOptions(0);
	SysStoreOptions(0);
	TaskWaitPacket();
	TcbAcked();
	TcbConnected(0);
	TcpOpen((PXCHAR)0, 0, 0);
	TcpSendClose(0);
	UdpSetTos(0, 0);
#ifdef _USE_FAKE_FXO
	DualModeStartup();
	DualModeHandleTimer();
	CheckDualModePrefix();
	CheckDualModeStatus();
	p_String2IP((PXCHAR)0, (PXCHAR)0);
#endif
}

void HandleNumberKeys()
{
}

void HandleFunctionKeys()
{
	switch(Key_iCurrentID)
	{
	case 'X':
		_OnImpossibleKey();
		break;
	}
}

void OnHandset()
{
}

void OnHookFlash()
{
}
