📄 idchain.h
字号:
//////////////////////////////////////////////////////////////////////////////
// IDChain.h //
//////////////////////////////////////////////////////////////////////////////
/*
ID chain
*/
#ifndef _IDCHAIN_H
#define _IDCHAIN_H
//////////////////////////////////////////////////////////////////////////////
// Includes //
//////////////////////////////////////////////////////////////////////////////
#include "Chain.h"
//////////////////////////////////////////////////////////////////////////////
// IDChain //
//////////////////////////////////////////////////////////////////////////////
#pragma pack(1)
class IDChain : public Chain
{
public:
unsigned one:1; // 1
unsigned manufacturer:11; // 0x787
unsigned productCode:16; // 0x0920
unsigned specificationRev:1; // 1
static void Select() { JTAG::Command(JTAG::IDCODE); }
static int GetLength() { return 32; }
unsigned int Read()
{
Select();
JTAG::Read(this, GetLength());
/*printf("one: %X\n", one);
printf("manufacturer: %X\n", manufacturer);
printf("productCode: %X\n", productCode);
printf("specificationRev: %X\n", specificationRev);*/
return *(unsigned int *)this;
}
};
#pragma pack()
#endif // _IDCHAIN_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -