debugchain.h

来自「ARM核的边界扫描(JTAG)的实现,此代码在s3c2400上测试通过」· C头文件 代码 · 共 27 行

H
27
字号
//////////////////////////////////////////////////////////////////////////////
// DebugChain                                                               //
//////////////////////////////////////////////////////////////////////////////
class DebugChain : public Chain
{
	public:
		unsigned data : 32;
		unsigned dden : 1;			// INTEST: capture dden status, EXTEST: 1=write, 0=read
		unsigned wptandbkpt : 1;	// in case of watchpoint, this bit returns 1 if also a breakpoint occurred
		unsigned sysspeed : 1;		// synchronize clock. returns cause of debug mode: 0=breakpoint, 1=watchpoint
		unsigned instruction : 32;	// reversed

		void Select() { JTAG::Command(INTEST); JTAG::Chain(DEBUG_CHAIN); }

		unsigned int Exec(unsigned int instruction, int systemspeed, int data = 0)
		{
			this->data = data;
			this->dden = 0;
			this->wptandbkpt = 0;
			this->sysspeed = systemspeed;
			this->instruction = Reverse(instruction);
			Select();
			JTAG::Transfer(this);
			return this->data;
		}
};

⌨️ 快捷键说明

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