xuxinyi 2 ماه پیش
والد
کامیت
0862b12808
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Core/Src/stm32f1xx_it.c

+ 2 - 2
Core/Src/stm32f1xx_it.c

@@ -308,8 +308,8 @@ void USART2_IRQHandler(void)
         long addr = strtol(hexStr, NULL, 16);
 
         // 拆分为两个字节:高8位和低8位
-        deviceInfo.loraDeviceAddress_L = (addr >> 8) & 0xFF;  // 0xe1
-        deviceInfo.loraDeviceAddress_H = addr & 0xFF;         // 0x16
+        deviceInfo.loraDeviceAddress_H = (addr >> 8) & 0xFF;  // 0xe1
+        deviceInfo.loraDeviceAddress_L = addr & 0xFF;         // 0x16
       }
       memset(rx_buf_uart2, 0, sizeof(rx_buf_uart2));
       // // 清空缓冲区并重新开启DMA接收