优化slip和uart初始化代码
author孙春阳 <snickersun@163.com>
Thu, 11 Sep 2025 07:43:56 +0000 (15:43 +0800)
committer孙春阳 <snickersun@163.com>
Thu, 11 Sep 2025 07:43:56 +0000 (15:43 +0800)
code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c
code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c

index efda60d..be6daf1 100644 (file)
@@ -167,7 +167,7 @@ static uart_config_t g_uart_config[UART_BUS_MAX_NUMBER] = {
     /** UART_BUS_0, which is used to at cmd and debug print in wstp version,
      * and which is used to testustie and debug print in testsuite version
      */
-    #ifdef SUPPORT_CAT1_SERVICE
+    #if defined(SUPPORT_CAT1_SERVICE) || defined(SUPPORT_PPP_SERVICE)
     {
         {
             .tx_pin = PIN_NONE,
index eec78f5..6a7ade6 100644 (file)
@@ -16,7 +16,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdbool.h>
-
+#if defined(LWIP_SLIP) && LWIP_SLIP == 1
 /* SLIP test configuration */
 #define SLIP_TEST_IP_ADDR      "172.16.1.5"
 #define SLIP_TEST_NETMASK      "255.255.255.0"
@@ -123,4 +123,5 @@ void slip_test_main(void)
     }
     
     test_counter++;
-} 
\ No newline at end of file
+} 
+#endif
\ No newline at end of file