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

📄 gfd_hw.h

📁 基于GE00 实验系统开发板的实验指导用途
💻 H
字号:
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for UCOS-II                                    *
*                                                                         *
*   MODULE      : FRMWRK.h                                                *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   PROCESSOR   : S3c2410x (32 bit ARM920T RISC core from Samsung)        *
*                                                                         *
*   IDE         : SDT 2.51 & ADS 1.2                                      *
*                                                                         *
*   DESCRIPTION :                                                         *
*   External interface & Module configuration header for FRMWRK           *
*   Infrastructure module.                                                *
*                                                                         *
**************************************************************************/


#ifndef __GFDHW_H__
#define __GFDHW_H__


#include "def.h"


#ifdef __cplusplus
extern "C" {
#endif

/* ********************************************************************* */
/* Global definitions */
#ifndef GFD_CONSOLE
extern	void init_timer(void);
#define CONSOL_Printf	printf
#else
extern void CONSOL_Printf(char *pcFmt,...);
#endif

/****************************************
	macros  for write and read registers
****************************************/
#define write_reg(reg, data) \
	*(RP)reg = data

#define read_reg(reg) \
	*(RP)reg                                              

/****************************************
	macros  for interrupt operation
****************************************/
#define set_plevel(plevel)		\
	*(RP)INTC_PLV =  plevel

#define set_int_force(intnum)		\
	*(RP)INTC_IFCE = (1 << intnum)
	
#define irq_enable(intnum)	\
	*(RP)INTC_IEN |= (1 << intnum)

#define irq_disable( intnum)	\
	*(RP)INTC_IEN &= ~(1<< intnum)
	
#define mask_irq(intnum)		\
	*(RP)INTC_IMSK |= (1 << intnum)
	
#define unmask_irq(intnum)	\
	*(RP)INTC_IMSK &= ~(1 << intnum)

#define mask_all_irq() 	\
	*(RP)INTC_IMSK = 0xFFFFFFFF

#define unmask_all_irq()		\
	*(RP)INTC_IMSK = 0x00000000

#define enable_all_irq()		\
	*(RP)INTC_IEN = 0XFFFFFFFF

#define disable_all_irq()	\
	*(RP)INTC_IEN = 0X00000000
	
/* definition of vector struct for interrrupt */
typedef struct int_vector{
	U8		IntNum;
	void	(*handler)(void);
}INT_VECTOR;

/*interrupt resources */                            
#define		INT_RTC					31		        
#define		INT_DMA					30	                
#define		INT_EMI					29              
#define		INT_GPT					28                  
#define		INT_USB					27                  
#define		INT_SPI					26              
#define 	INT_MMC					25              
#define		INT_UART0				24              
#define		INT_UART1				23              
#define		INT_PWM					22              
#define		INT_AC97				21              
#define		INT_LCD					20	                
#define		INT_EXT17				19	            
#define		INT_EXT16				18              
#define		INT_EXT15				17	            
#define		INT_NONE				16			    
#define		INT_EXT14				15              
#define		INT_EXT13				14				
#define		INT_EXT12				13              
#define		INT_EXT11				12              
#define		INT_EXT10				11              
#define		INT_EXT9 				10              
#define		INT_EXT8 				9               
#define		INT_EXT7 				8               
#define		INT_EXT6 				7               
#define		INT_EXT5 				6               
#define		INT_EXT4 				5               
#define		INT_EXT3 				4               
#define		INT_EXT2 				3               
#define		INT_EXT1 				2               
#define		INT_EXT0				1
#define		INT_NULL				0

/* declaration of function */
void int_vector_handler(void);	

/* Global function */	
void FirmInit(void);
void APP_vMain(void);


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

#ifdef __cplusplus
}
#endif

#endif /*__FRMWRK_H__*/

⌨️ 快捷键说明

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