36 lines
626 B
C
36 lines
626 B
C
|
/*
|
|||
|
* 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_
|
|||
|
|
|||
|
#include "UART.h"
|
|||
|
|
|||
|
/* <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_ */
|