fix: 修改UART上传帧长, 修改节点配置主节点ID识别

This commit is contained in:
2025-06-24 10:02:07 +08:00
parent d3d45fbfb0
commit 6b9a2c8cc4
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -237,7 +237,7 @@ static int32_t SystemBus_SystemConfig(SYSBUS *instPtr, uint8_t *msg)
if (msg[WD_ID_CMD] >= 0 && msg[WD_ID_CMD] < linkConfig.netScale)
{
reconfig |= (msg[WD_ID_CMD] != linkConfig.myId);
linkConfig.myType = (msg[WD_ID_CMD] == 0) ? L2_NODE_HEAD : L2_NODE_MEMBER;
linkConfig.myType = (msg[WD_ID_CMD] == L2_HEAD_ID) ? L2_NODE_HEAD : L2_NODE_MEMBER;
linkConfig.myId = msg[WD_ID_CMD];
}
else
@@ -399,7 +399,7 @@ int32_t SystemBus_GenRecvRsp(SYSBUS *instPtr, SYSMON_SVC_PAYLOAD *payload)
ASSERT(instPtr != NULL);
ASSERT(payload != NULL);
SYSBUS_UART_FRAME *sysbusRsp = malloc(sizeof(SYSBUS_UART_FRAME));
SYSBUS_UART_FRAME *sysbusRsp = malloc(NORMALIZE_SIZE(sizeof(SYSBUS_UART_FRAME)));
if (sysbusRsp == NULL)
{
DBG_ERROR("Failed to allocate memory for Receive Response!\n");
+1 -1
View File
@@ -119,4 +119,4 @@ bool SysbusUart_IsTxBusy(SYSBUS_UART *instPtr);
/** @} SystemBus_UART*/
/** @} SystemBus*/
/** @} SystemBus*/