generated from hulk/gd32e23x_template
完成串行数据通信协议
This commit is contained in:
@@ -26,9 +26,16 @@
|
||||
|
||||
#define RX_BUFFER_SIZE 64
|
||||
|
||||
typedef enum {
|
||||
VALIDATION_SUCCESS = 0,
|
||||
VALIDATION_CRC_ERROR = 1
|
||||
} validation_result_t;
|
||||
|
||||
void rs485_config(void);
|
||||
void process_command(uint8_t *cmd, size_t length);
|
||||
uint8_t calculate_crc(uint8_t data[], size_t data_length);
|
||||
validation_result_t validate_package_header(uint8_t *data);
|
||||
validation_result_t validate_package_type(uint8_t *data);
|
||||
void eddy_current_value_report(void);
|
||||
void tempture_value_report(void);
|
||||
|
||||
|
Reference in New Issue
Block a user