📄 diag.h
字号:
//
// Cypress Semiconductor
// Wireless Audio Example
//
#if !defined(DIAG_H)
#define DIAG_H
//#define USB_DIAG
//#if defined(REMOTE_END)
//#define IF_BUTTON_DOWN if(!(SW_BIND_Data_ADDR & SW_BIND_MASK))
//#else
//#define IF_BUTTON_DOWN SW1_Data_ADDR &= ~SW1_MASK; if((SW1_Data_ADDR & SW1_MASK))
//#endif
#if defined(USB_DIAG)
//
// Send a diagnostic byte with a carriage return on our diagnostic endpoint channel
//
//#pragma fastcall16 DiagSendByte
void DiagSendByte(char dataByte);
//
// Do a single byte send
//
void DiagSendByteLow(char dataByte);
//
// Send a diagnostic string
//
void DiagSendString(const char* pString);
// Send a single byte as hex to the diag stream
void DiagSendHexByte(BYTE hex);
//
// Dump some hex bytes
//
void DiagDumpHex(BYTE *pData, BYTE length);
//
// Polling function - call frequently
//
//
void DiagPoll(void);
#define ASSERT(cond) if(cond) {} else { DiagSendString("Assertion"); for(;;); }
#else
#define DiagSendByte(a)
#define DiagSendByteLow(a)
#define DiagSendString(a)
#define DiagSendHexByte(a)
#define DiagDumpHex(p,c)
#define DiagPoll()
#define ASSERT(cond)
#endif
#endif // !DIAG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -