3.27_433:实验并验证485发送数据透传至RF433模块,并在外部设备成功接收

- 新增协议识别器状态机,实现指令与透传数据的自动识别
This commit is contained in:
2026-03-27 19:58:20 +08:00
parent 268667e335
commit 0eea5c1424
71 changed files with 6051 additions and 2620 deletions

View File

@ -28,60 +28,101 @@ Project File Date: 03/27/2026
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'project'
assembling startup_stm32f103xb.s...
compiling systick.c...
compiling spi.c...
compiling rf433_rx_app.c...
..\Core\Src\rf433_rx_app.c(23): warning: #188-D: enumerated type mixed with another type
static rf433_rx_app_t g_rx_app = {0};
..\Core\Src\rf433_rx_app.c: 1 warning, 0 errors
compiling systick.c...
compiling usart.c...
compiling rf433_tx_app.c...
..\Core\Src\rf433_tx_app.c(28): warning: #188-D: enumerated type mixed with another type
static rf433_tx_app_t g_tx_app = {0};
..\Core\Src\rf433_tx_app.c: 1 warning, 0 errors
compiling spi.c...
compiling main.c...
compiling usart.c...
compiling gpio.c...
compiling main.c...
compiling cmd_parser.c...
compiling debug_log.c...
compiling relay_control.c...
compiling io_monitor.c...
compiling cmd_router.c...
..\Core\Src\cmd_router.c(115): warning: #188-D: enumerated type mixed with another type
../Core/Inc/uart3_protocol_discriminator.h(150): warning: #1-D: last line of file ends without a newline
#endif
../Core/Inc/uart3_passthrough.h(207): warning: #1-D: last line of file ends without a newline
#endif
../Core/Inc/uart3_smart_router_config.h(143): warning: #1-D: last line of file ends without a newline
#endif
..\Core\Src\cmd_router.c(284): warning: #188-D: enumerated type mixed with another type
for (port_id_t i = 0; i < PORT_COUNT; i++) {
..\Core\Src\cmd_router.c(139): warning: #188-D: enumerated type mixed with another type
..\Core\Src\cmd_router.c(440): warning: #188-D: enumerated type mixed with another type
for (port_id_t port_id = 0; port_id < PORT_COUNT; port_id++) {
..\Core\Src\cmd_router.c(150): warning: #188-D: enumerated type mixed with another type
for (port_id_t port_id = 0; port_id < PORT_COUNT; port_id++) {
..\Core\Src\cmd_router.c(206): warning: #188-D: enumerated type mixed with another type
..\Core\Src\cmd_router.c(531): warning: #188-D: enumerated type mixed with another type
for (port_id_t port = 0; port < PORT_COUNT; port++) {
..\Core\Src\cmd_router.c(56): warning: #550-D: variable "g_current_parsing_port" was set but never used
..\Core\Src\cmd_router.c(114): warning: #550-D: variable "g_current_parsing_port" was set but never used
static uint8_t g_current_parsing_port = PORT_UART2;
..\Core\Src\cmd_router.c: 5 warnings, 0 errors
..\Core\Src\cmd_router.c: 7 warnings, 0 errors
compiling stm32f1xx_it.c...
compiling multi_uart_router.c...
..\Core\Src\multi_uart_router.c(143): warning: #188-D: enumerated type mixed with another type
..\Core\Src\multi_uart_router.c(273): warning: #188-D: enumerated type mixed with another type
for (port_id_t i = 0; i < PORT_COUNT; i++) {
..\Core\Src\multi_uart_router.c(184): warning: #188-D: enumerated type mixed with another type
..\Core\Src\multi_uart_router.c(354): warning: #188-D: enumerated type mixed with another type
for (port_id_t i = 0; i < PORT_COUNT; i++) {
..\Core\Src\multi_uart_router.c(83): warning: #177-D: function "rx_ring_pop" was declared but never referenced
..\Core\Src\multi_uart_router.c(158): warning: #177-D: function "rx_ring_pop" was declared but never referenced
static uint16_t rx_ring_pop(uart_rx_ring_t *ring, uint8_t *byte)
..\Core\Src\multi_uart_router.c: 3 warnings, 0 errors
compiling stm32f1xx_hal_msp.c...
compiling uart3_protocol_discriminator.c...
../Core/Inc/uart3_protocol_discriminator.h(150): warning: #1-D: last line of file ends without a newline
#endif
../Core/Inc/uart3_smart_router_config.h(143): warning: #1-D: last line of file ends without a newline
#endif
..\Core\Src\uart3_protocol_discriminator.c(111): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("INIT <EFBFBD><EFBFBD>? CMD_MODE (got '$')");
..\Core\Src\uart3_protocol_discriminator.c(118): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("INIT <EFBFBD><EFBFBD>? SCAN (byte: 0x%02X)", byte);
..\Core\Src\uart3_protocol_discriminator.c(128): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("SCAN <EFBFBD><EFBFBD>? PASSTHROUGH (got '$', %d bytes)", ctx->scan_length);
..\Core\Src\uart3_protocol_discriminator.c(132): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("SCAN <20><>? CMD_MODE (empty scan, got '$')");
..\Core\Src\uart3_protocol_discriminator.c(137): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("SCAN <20><>? PASSTHROUGH (got '\\n', %d bytes)", ctx->scan_length);
..\Core\Src\uart3_protocol_discriminator.c(151): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("CMD_MODE <20><>? INIT (got \\n)");
..\Core\Src\uart3_protocol_discriminator.c(156): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("CMD_MODE <20><>? CMD (byte: 0x%02X)", byte);
..\Core\Src\uart3_protocol_discriminator.c(161): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("PASSTHROUGH <20><>? PTX (byte: 0x%02X)", byte);
..\Core\Src\uart3_protocol_discriminator.c(185): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("SCAN timeout <20><>? PASSTHROUGH (%d ms)", SCAN_TIMEOUT_MS);
..\Core\Src\uart3_protocol_discriminator.c(194): warning: #870-D: invalid multibyte character sequence
DEBUG_LOG("CMD_MODE timeout <20><>? INIT (%d ms)", CMD_COMPLETE_TIMEOUT_MS);
..\Core\Src\uart3_protocol_discriminator.c(252): warning: #1-D: last line of file ends without a newline
}
..\Core\Src\uart3_protocol_discriminator.c(58): warning: #177-D: function "check_scan_timeout" was declared but never referenced
static bool check_scan_timeout(uint32_t current_tick)
..\Core\Src\uart3_protocol_discriminator.c: 14 warnings, 0 errors
compiling relay_control.c...
compiling uart2_print.c...
compiling stm32f1xx_it.c...
compiling stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_gpio.c...
compiling uart3_passthrough.c...
../Core/Inc/uart3_passthrough.h(207): warning: #1-D: last line of file ends without a newline
#endif
../Core/Inc/uart3_smart_router_config.h(143): warning: #1-D: last line of file ends without a newline
#endif
..\Core\Src\uart3_passthrough.c(269): warning: #1-D: last line of file ends without a newline
}
..\Core\Src\uart3_passthrough.c: 3 warnings, 0 errors
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_spi.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_exti.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_dma.c...
compiling system_stm32f1xx.c...
compiling rf433.c...
..\Driver_RF433\Src\rf433.c(209): warning: #188-D: enumerated type mixed with another type
@ -94,11 +135,12 @@ compiling rf433.c...
static bool rf433_response_command_check(rf433_request_cmd_t cmd, uint8_t *buffer, uint8_t length)
..\Driver_RF433\Src\rf433.c: 4 warnings, 0 errors
compiling rf433_hal.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_uart.c...
linking...
Program Size: Code=21148 RO-data=572 RW-data=192 ZI-data=5808
Program Size: Code=23672 RO-data=572 RW-data=192 ZI-data=6520
FromELF: creating hex file...
"project\project.axf" - 0 Error(s), 14 Warning(s).
"project\project.axf" - 0 Error(s), 33 Warning(s).
<h2>Software Packages used:</h2>
@ -122,7 +164,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE@6.1.1
Include file: CMSIS/Core/Include/tz_context.h
Build Time Elapsed: 00:00:15
Build Time Elapsed: 00:00:17
</pre>
</body>
</html>