/************************************************************/
/*															*/
/*	Filename: uitask.c										*/
/*															*/
/*  Description:	This function is currently used to		*/
/*					debugging only. Used to trigger cmd		*/
/*		 			requests.								*/
/*															*/
/*	Ikanos Communications 01/2001							*/
/*															*/
/*
$Revision: 1.1 $
$Date: 2006/10/16 04:34:50 $
*/
/************************************************************/
/* #includes*/
#ifdef BUP_DIAGS
#include <stdio.h>
#include <string.h>
#include "appconfig.h"
#include "apitype.h"
#include "apistruct.h"
#include "host_ver.h"
#include "notchBnd.h"
#include "uiUtil.h"
#include "oampdb.h"
#include "password.h"
#include "apidef.h"
#include "portmap.h"
#include "pprofile.h"
#include "oampdef.h"
#include "autoStart.h"
#include "apposmacro.h"
#include "oampstruct.h"
//#include "iniapi.h"
#include "HostPtmfApi.h"
#include "consoleUtil.h"
#include "bmetl.h"
#include "oampproto.h"
#include "eocapp.h"
#include "bsp.h"
#include "linecrc.h"
#include "dapi.h"

#include "apposmacro.h"
#include "bup_version.h"



void bup_taskUi(void)
{                

    int             bmenum=1;
    char            hostVer[16];
    ipos_port_id    Pid;
#ifdef	BME_CPE_20
	static sysInfo sInfo;
#endif


#ifdef	BME_CPE_20
	ipos_emi_config	bmeMemCfg;				/* paramaters for configure bme external memory controller	*/
#endif

    strcpy (hostVer,VERSION_STR);



#ifndef	ALASKA
#ifdef	BME_CPE_20
/* save the version to the flash */
    saveImageVer(hostVer);

	getSysInfo( (char *) &sInfo);

	switch(sInfo.memInfo)
	{
	case	0: bmeMemCfg.memType=IPOS_BME_MEM_SRAM;
		break;
	case	1: bmeMemCfg.memType=IPOS_BME_MEM_SDRAM16;
		break;
	case	2:	bmeMemCfg.memType=IPOS_BME_MEM_SDRAM32;
		break;
	default:
		bmeMemCfg.memType=IPOS_BME_MEM_SDRAM16;
	}

	bmeMemCfg.memSize=	IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.clk	=	IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.casDelay=	IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.rcDelay=	IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.rPrecharge=IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.rActive=	IPOS_BME_MEM_DEFAULT;
	bmeMemCfg.rCycle	=	IPOS_BME_MEM_DEFAULT;


	if(iposBmeConfigMemBlk(1,&bmeMemCfg)!=IPOS_SUCCESS)
	{
		printf("\n failed to initilize BME memeory parameters \n");
		return;
	}

#endif
#endif

//    if (iposTaskSpawn("tRestartTask", RESTART_TASK_PRIORITY, RESTART_TASK_STACK_SIZE, (taskFunc)autoRestart,0, 0, 0) == OS_ERROR)
//        printf("Failed to start UI Task\n");


    printf ("\n**********************************************************");
    printf ("\n**               Copyright (C) 2000-2002                **");
    printf ("\n**          Ikanos Communication, Fremont, CA           **");
    printf ("\n**                All rights reserved.                  **");
    printf ("\n**                                                      **");
    printf ("\n**             Bring Up Diags %s              **", bup_version);
    printf ("\n**********************************************************\n\n");


    bup_diags ();


}
#endif
/* END_OF_FILE */
