📄 debug.h
字号:
//*************************************************************************
//* *
//* ***********************调试函数**************************** *
//* *
//*************************************************************************
#ifndef __DEBUG_H__
#define __DEBUG_H__
#define COMMAND_LENGTH 100 //命令字符串缓存数组长度
//<<<<<<<<<<<<<<<<<<<<<<<<<<命令字符串结构体>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
typedef struct command
{
unsigned char ucaCommand[COMMAND_LENGTH]; //命令字符串数组
unsigned char ucCommandLen; //命令字符串长度
}COMMAND;
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
extern COMMAND st_Command1,st_Command2; //命令缓冲区
extern COMMAND *pst_RunCommand; //指向当前可运行命令缓冲区
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
extern unsigned char uc_RunFlag; //运行命令标志,TURE时表示可以运行命令
//*************************************************************************
//* *************************IO口初始化************************ *
//*************************************************************************
void vIOPortInit(void);
//*************************************************************************
//* ***********************按键处理**************************** *
//*************************************************************************
void vKeyProcess(void);
//*************************************************************************
//* ***********************串口驱动程序************************ *
//*************************************************************************
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<串口初始化>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void vUARTInit(void);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<串口输出1个字节>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void vPutChar(unsigned char ucChar);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<串口输入1个字节>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
unsigned char ucGetChar(void);
//<<<<<<<<<<<<<<<<<<<<<<<<<<<串口格式化输出>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void printp( char * , ...);
//*************************************************************************
//* *********************显示提示信息********************** *
//*************************************************************************
void vSerialIntroduce(void);
//*************************************************************************
//* ***************************发送信息************************ *
//*************************************************************************
void vSendInfo(void);
//*************************************************************************
//* ***********************执行按键功能************************* *
//*************************************************************************
void vKeyFunction(unsigned char ucKeyCode);
//*************************************************************************
//* *********************获取命令字符串******************** *
//*************************************************************************
void vGetString(unsigned char ucChar);
//*************************************************************************
//* *********************执行串口命令************************** *
//*************************************************************************
void vRunCommand(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -