generated from hulk/gd32e23x_template
	format code
This commit is contained in:
		
							
								
								
									
										16
									
								
								inc/rs485.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								inc/rs485.h
									
									
									
									
									
								
							| @@ -16,11 +16,11 @@ | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
| #define RX_BUFFER_SIZE           32 | ||||
| #define RX_BUFFER_SIZE            32 | ||||
|  | ||||
| #define LDC1612_PACKAGE_HEADER   0xD5 | ||||
| #define LDC1612_BOARD_TYPE       0x03 | ||||
| #define LDC1612_PACKAGE_LENGTH   0x02 | ||||
| #define PROTOCOL_PACKAGE_HEADER   0xD5 | ||||
| #define PROTOCOL_BOARD_TYPE       0x03 | ||||
| #define PROTOCOL_PACKAGE_LENGTH   0x02 | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
| @@ -36,13 +36,21 @@ typedef enum | ||||
| /******************************************************************************/ | ||||
|  | ||||
| void rs485_config(void); | ||||
|  | ||||
| void process_command(uint8_t* cmd, size_t length); | ||||
|  | ||||
| uint8_t calculate_crc(uint8_t data[], uint8_t data_length); | ||||
|  | ||||
| validation_result_t validate_package_crc(uint8_t* data, uint8_t data_length); | ||||
|  | ||||
| validation_result_t validate_package_header(uint8_t* data); | ||||
|  | ||||
| validation_result_t validate_package_type(uint8_t* data); | ||||
|  | ||||
| validation_result_t validate_data_length(uint8_t* data); | ||||
|  | ||||
| void eddy_current_value_report(void); | ||||
|  | ||||
| void tempture_value_report(void); | ||||
|  | ||||
| #endif //RS485_H | ||||
|   | ||||
		Reference in New Issue
	
	Block a user