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

📄 board.h

📁 philips mcb2100平台
💻 H
字号:
#ifndef __BOARD_H
#define __BOARD_H

#include "def.h"

#ifdef __cplusplus
extern "C"
{
#endif

	//extern void __ENTRY( void );

	void DisableInt( void );
	void EnableInt( void );
	void EnterCritical( U32* );
	void ExitCritical( U32* );
	void outportb( U8 , U32 );
	void outportw( U16 , U32 );
	void outportl( U32 , U32 );
	U8 inportb( U32 );
	U16 inportw( U32 );
	U32 inportl( U32 );



#define min(x1,x2) ((x1<x2)? x1:x2)
#define max(x1,x2) ((x1>x2)? x1:x2)

	void PortInit( void );



	void SerialTxChar( char );
	void SerialTxString( char* );
	void SerialTxEmpty( void );
	int SerialRxReady( void );
	char SerialRxKey( void );
	char SerialRxChar( void );
	int SerialRxToBuf( char* );
	void SerialChgBaud( U32 mclk , U32 baud ) ;
	U16 SerialSwitch( U16 );

#define	kbhit	SerialRxReady
#define	getkey	SerialRxKey
#define	getch	SerialRxChar
#define	putch	SerialTxChar
#define	putchar	putch
#define	puts	SerialTxString

#define DebugOut	printf
#define	ERROR		printf

//void printf( char* f , ... );	
	//led,key,buzzer,etc...
	void Beep( U32 time );	
	void LedSet( U32 m );		
	void LedDisp( U32 m , U32 delay_time );				

	//Timer
	void Delay( U32 time );
	void Delay_uS( U32 us )	;		
	int WaitEventWithTimeout( int ( *event ) ( void ) , int cond , U32 ms );


	//extern void (*pNorFlashInit)(void);
	//extern void (*pNorFlashProg)(U32, U32, U32);
	void NorFlashInit( void );
	void NorFlashStatusRep( void );
	void NorFlashProg( U32 dst , U32 src , U32 size ) ;
#define	NorFlashRead(dst, src, size)	memcpy((char *)(dst), (char *)(src), (int)(size))
	

	//Show boot information
	void ShowBootInfo( void );

	//LCD YM12864
	void Lcd_YM12864_Init( void ) ;

	//Shell
	void ShellIn( void );

        void TargetResetInit( void );

        void LPC2294SystemInit(void);

#ifdef __cplusplus
}
#endif

#endif /*__BOARD_H*/

⌨️ 快捷键说明

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