Răsfoiți Sursa

改回来了

xuxinyi 2 luni în urmă
părinte
comite
0862b12808
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  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接收