40 lines
449 B
C
40 lines
449 B
C
/*
|
|
* Protocol.h
|
|
*
|
|
* Created on: 2022年03月12日
|
|
* Author: User
|
|
*/
|
|
#include<Main.h>
|
|
|
|
|
|
#define Register_Read 0x01 //读寄存器
|
|
#define Register_Write 0x02 //写寄存器
|
|
#define Setting_Reg_Read 0x03 //读保存设置寄存器寄存器
|
|
#define Protocol_Len 0x0A //协议数据长度
|
|
|
|
|
|
typedef struct
|
|
{
|
|
void (*Analysis)(UART_t *);
|
|
void (*Send)(uint8_t);
|
|
|
|
}Protocol_t;
|
|
|
|
|
|
|
|
|
|
|
|
extern Protocol_t xdata Protocol;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|