⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 platform.c

📁 pxa270触摸屏驱动程序
💻 C
字号:
/******************************************************************************
**
**  COPYRIGHT (C) 2000, 2001 Intel Corporation.
**
**  This software as well as the software described in it is furnished under 
**  license and may only be used or copied in accordance with the terms of the 
**  license. The information in this file is furnished for informational use 
**  only, is subject to change without notice, and should not be construed as 
**  a commitment by Intel Corporation. Intel Corporation assumes no 
**  responsibility or liability for any errors or inaccuracies that may appear 
**  in this document or any software that may be provided in association with 
**  this document. 
**  Except as permitted by such license, no part of this document may be 
**  reproduced, stored in a retrieval system, or transmitted in any form or by 
**  any means without the express written consent of Intel Corporation. 
**
**  FILENAME:       platform.c
**
**  PURPOSE:        This file contains the Platform Specific Stuff (PSS) for
**                  the Mainstone board.
**
**  LAST MODIFIED:  $Modtime: 8/01/03 4:55p $
******************************************************************************/

/*
*******************************************************************************
*   HEADER FILES
*******************************************************************************
*/

#include <stdarg.h>
#include <stdlib.h>
#include "systypes.h"
#include "TstROS.h"
#include "platform.h"
#include "post.h"
#include "DM_SerialInOut.h"
#include "menu.h"
#include "platformInit.h"
#include "boardControl.h"
#ifdef ADS_TOOLS
#include <locale.h>
#endif

/*
*******************************************************************************
*   EXTERNAL DEFINITIONS
*******************************************************************************
*/
extern BOOL DmRunInteractive;

/***********************************************************************
************************************************************************

  This function is the *MAIN ENTRY POINT* that executes all the software
  & hardware initializations for the platform, and then goes on to invoke
  the POST. It is the first C code to be executed, and is
  called from within 'main.s'

*************************************************************************
************************************************************************/
void PlatformMain(void * memTop)
{
    UINT status;

#ifdef ADS_TOOLS
    // Initialize the ARM compiler library environment.
    setlocale(LC_ALL, "C");
    srand(1234);
#endif

    // Progress indication
  //  WriteValueDiscreteLeds(0x01);

    // Initialize the device drivers used by the POST.
    // The discrete LEDs are used to indicate the errors in the initialization
    PlatformSWInit();

	//xlli_setBufImpedance(0x6);

    status = PlatformHWSetup();
    if (status)
    {
		// Progress indication
		WriteValueDiscreteLeds(0x02);
    }

    // Initialize the system UART used by the POST.
    if(POSTRunState() & VS_BT_AS_SYSIO)
	{
	    if((status=InitSystemUart(BTUartType)) == TRUE)
	    {
			// Progress indication
			WriteValueDiscreteLeds(0x03);
	    }
	}
	else
	{
	    if((status=InitSystemUart(FFUartType)) == TRUE)
	    {
			// Progress indication
			WriteValueDiscreteLeds(0x03);
	    }
	}

    // Start ROS if SW11 switch is set to NODOT position
    //if ((ReadUserSwitches() & DiscSwitch_S11))
    //    ROS_Test((PVOID)0, (PCHAR)0);

    PostRun();

    // Dispatch the tests.
   // do
    //{
     //   DM_DoMenu (&MainMenu, NULL);
    //}
    //while (1);

    // Go to the string mode
  //  DM_SerialInOut();

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -