3.27_433:添加UART2调试打印、IO监控、指令解析和继电器控制模块。

能够接收UART2指令控制继电器开关,或向UART2发送四路IO输入状态,并使用轮询方式检测IO状态进行及时反馈。
This commit is contained in:
2026-03-27 10:09:13 +08:00
parent f548593c59
commit 71027ebc46
76 changed files with 6789 additions and 1803 deletions

View File

@ -28,7 +28,7 @@ extern "C" {
#define RF433_MODE_BOTH 3
#ifndef RF433_MODE
#define RF433_MODE RF433_MODE_RX
#define RF433_MODE RF433_MODE_TX
#endif
/* ============================================================================

View File

@ -9,6 +9,7 @@
#include "rf433.h"
#include "rf433_hal.h"
#include <string.h>
#include <stdio.h> // printf
#include "stm32f1xx_hal.h"
/* ============================================================================
@ -362,7 +363,7 @@ rf433_error_t rf433_transmit(uint8_t *buffer, uint16_t length)
{
return RF433_ERROR_TIMEOUT;
}
printf("Sent: %s", (char*)buffer); // DEBUG_LOG未定义使用printf替代
return RF433_OK;
}