jtagdef.h

来自「原创」· C头文件 代码 · 共 50 行

H
50
字号
/* use meterchen's jtag cable */
/* u can port to your own jtag cable by changing TMS/TCK/TDI easily */

#ifndef __JTAG_H__
#define __JTAG_H__

#include "ppt.h"

#define LOW 			 '0'               
#define HIGH			 '1'

// Pin Connections
//   TMS   :DATA[1]   
//   TCK   :DATA[2]   
//   TDI   :DATA[3]  
//   TDO   :STATUS[7]

//#define TDI_H		0x08 
//#define TCK_H		0x04	            
//#define TMS_H		0x02
#define TDI_H		0x40 
#define TCK_H		0x01	            
#define TMS_H		0x02

#define TCK_L		0x00
#define TDI_L		0x00              
#define TMS_L		0x00

#define JTAG_SET(value)	OutputPpt(value)
#define JTAG_GET_TDO()	( (InputPpt()&(1<<4)) ? HIGH:LOW )  //STATUS7 is read inverted. 

// JTAG Instruction Definition for S3C44b0
#define EXTEST		"0000"  //LSB...MSB
#define BYPASS		"1111"
#define IDCODE		"0111"
#define SAMPLE_PRELOAD	"1100"

extern int delayLoopCount;

void JTAG_ReadId(void);
void JTAG_RunTestldleState(void);
void JTAG_ShiftIRState(char *wrIR);
void JTAG_ShiftDRState(char *wrDR, char *rdDR);
void JTAG_ShiftDRStateNoTdo(char *wrDR);
void Delay(int count);
#endif //__JTAG_H__



⌨️ 快捷键说明

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