📄 debugchain.h
字号:
//////////////////////////////////////////////////////////////////////////////
// DebugChain.h //
//////////////////////////////////////////////////////////////////////////////
/*
Debug chain
*/
#ifndef _DEBUGCHAIN_H
#define _DEBUGCHAIN_H
//////////////////////////////////////////////////////////////////////////////
// Includes //
//////////////////////////////////////////////////////////////////////////////
#include "Chain.h"
//////////////////////////////////////////////////////////////////////////////
// DebugChain //
//////////////////////////////////////////////////////////////////////////////
#pragma pack(1)
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
static void Select() { JTAG::Command(JTAG::INTEST); JTAG::Chain(1); }
static int GetLength() { return 67; }
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, GetLength());
return this->data;
}
};
#pragma pack()
#endif // _DEBUGCHAIN_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -