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

📄 jtag_operates.h

📁 系统通过JTAG接口烧结挂接在LXFXP2 上的s29gl256N的FLASH的代码,
💻 H
字号:
/***********************************************************************/   
/*                                                                     */   
/* Module Name   : TJAG OPERS                                          */   
/*                                                                     */   
/* Description   : Implementation of a flash module for the            */   
/*                 TJAG OPERS .                                        */   
/*                                                                     */   
/*                                                                     */   
/* Document Ref. : - Datasheets for the TJAG OPERS                     */   
/*                                                                     */   
/* Function List : Exported                                            */   
/* Note          :                                                     */   
/*                                                                     */   
/* modification history :                                              */   
/***********************************************************************/  
                
/***********************************************************************
* 头文件包含
***********************************************************************/
// define I/O functions
#ifdef  PLATFORM_WINNT
    #include    "dlportio.h"
    #define OUTB(x,y)   DlPortWritePortUchar(x,y)
    #define INB(x)      DlPortReadPortUchar(x)
#else
    #include    <conio.h>
    #define OUTB(x,y)   _outp(x,y)
    #define INB(x)      _inp(x)
#endif

/***********************************************************************
* 常见宏定义
***********************************************************************/
#define LPT1 				0x3bc	// hardware base address for parallel port
#define LPT2 				0x378	// the search order is LPT1 then 2 then 3
#define LPT3 				0x278	// first valid address found is used (re-order if needed for multiple ports)

#define READ        		0 		// Flags used to modify the S3C4510 JTAG chain data depending on
#define WRITE               1 		// the access mode of the Flash Memory
#define SETUP               2
#define HOLD                3
#define RS                  4
#define NONE                5
                            
#define IP                  0 // Flag used when accessing the parallel port
#define RP                  1 // RP = 'read port', IP = 'ignore port', using IP will speed access

/***********************************************************************
* 变量声明
***********************************************************************/
extern int lpt_address;

/***********************************************************************
* 函数声明
***********************************************************************/
void LPT_initialization();
void LPT_uninitialization();

WORD read_command(DWORD addr);
int write_command(DWORD addr, WORD command);
WORD access_bus(int rw, DWORD address, WORD data, int rp);

/***********************************************************************
* 测试函数声明
***********************************************************************/
unsigned short test_port(bool display);
int putp(int tdi, int tms, int rp);
void extest(void);

/***********************************************************************
* 文件结束
***********************************************************************/

⌨️ 快捷键说明

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