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

📄 target.h

📁 This zip describes a benchmark software provided by IXXAT. It shows how to use the DBGU and timer pe
💻 H
字号:
/*************************************************************************
**    IXXAT Automation GmbH
**************************************************************************
**
**       File: target.h
**    Summary: Definition of target relevant things
**    Version: 1.0
**       Date: 22.01.2003
**     Author: J. Stolberg
**
**************************************************************************
**************************************************************************
**
**  Functions: printf
**
**   Compiler: - Grenn Hill 3.6.1
**    Remarks: -
** ext. Units: -
**
**    History: Creation By JPP 05/JUN/2003
**        
**************************************************************************
**    all rights reserved
*************************************************************************/

/*************************************************************************
**    constants and macros
*************************************************************************/

// parameter to adapt the benchmark execution time to the CPU performance,
// so that the execution needs some seconds

//* Atmel Modification
#define printf(text,arg) print(text,arg)
#define getchar()	AT91F_DBGU_Printk("\n\rEND Measure\n\r");

// Used to check that 1 ms fot timer
#define LED_MASK	AT91C_PIO_PB2

//#define DEBUG
//#define TRACE

//* Atmel Modification
#ifdef  DEBUG
#define EXE_CNT1        10000
#else
#define EXE_CNT1        100000
#endif

#ifdef __C166__
  #define EXE_CNT1      100000
#endif
#ifdef __BORLANDC__
  #define EXE_CNT1      100000000UL
#endif

#define EXE_CNT2        (EXE_CNT1*5)

/*************************************************************************
**    data types
*************************************************************************/
#define UINT8  unsigned char
#define UINT16 unsigned short
#define UINT32 unsigned int

#define ACS8(val,ofs)   ((UINT8 *) &(val))[ofs]

/*************************************************************************
**    global variables
*************************************************************************/
extern volatile UINT32 ISRCounter;

/*************************************************************************
**    function prototypes
*************************************************************************/

/*************************************************************************
**
** Function   : InitCPU
** Description: Initialize CPU and hardware. In Cstarup file
** Parameters : -
** Returnvalue: -
**
*************************************************************************/
void InitCPU(void);

/*************************************************************************
**
** Function   : InitRS232
** Description: Initialize The RS232 interface/stdout for outputs
**              via printf.
** Parameters : - Allreday initialized INIT file 
** Returnvalue: -
**
*************************************************************************/
void InitRS232(void);

/*************************************************************************
**
** Function   : StartTimer
** Description: Start a on-board timer with a resulution of 1 msec.
** Parameters : -
** Returnvalue: -
**
*************************************************************************/
void StartTimer(void);

/*************************************************************************
**
** Function   : GetTime
** Description: Returns a 32 bit timer value with a resolution of 1 msec.
** Parameters : -
** Returnvalue: timer value
**
*************************************************************************/
UINT32 GetTime(void);

/*************************************************************************
**
** Function   : GenerateInt
** Description: Generate an interrupt request
** Parameters : -
** Returnvalue: -
**
*************************************************************************/
void GenerateInt(void);



⌨️ 快捷键说明

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