2024-07-13 02:22:47 +00:00
|
|
|
|
/*
|
|
|
|
|
* communication_protocol.h
|
|
|
|
|
*
|
|
|
|
|
* Created on: 2024<EFBFBD><EFBFBD>5<EFBFBD><EFBFBD>18<EFBFBD><EFBFBD>
|
|
|
|
|
* Author: 34509
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_
|
|
|
|
|
#define SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_
|
|
|
|
|
|
2024-07-13 03:43:10 +00:00
|
|
|
|
#include "inc/UART.h"
|
2024-07-13 02:22:47 +00:00
|
|
|
|
|
|
|
|
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
#define read_Register 0x30
|
|
|
|
|
#define write_Register 0x10
|
|
|
|
|
#define broadcast_Scan 0xA0
|
|
|
|
|
#define reg_Req 0xA1
|
|
|
|
|
|
|
|
|
|
/* <20><>ʼ<EFBFBD><CABC>־ */
|
|
|
|
|
#define StartFlag "SL"
|
|
|
|
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ */
|
|
|
|
|
#define EndFlag 0x16
|
|
|
|
|
|
|
|
|
|
/* <20>㲥ID */
|
|
|
|
|
#define broadcast_ID 0xFFFFFFFFFFFF
|
|
|
|
|
|
|
|
|
|
#define max_Len 32
|
|
|
|
|
|
|
|
|
|
extern uint8_t protocol[max_Len];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void broadcast_Scan_Fun(USART_TypeDef* pUSARTx);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* SOFTWARE_PROTOCOL_COMMUNICATION_PROTOCOL_H_ */
|