From: 孙春阳 Date: Thu, 11 Sep 2025 07:43:56 +0000 (+0800) Subject: 优化slip和uart初始化代码 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~92^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1f65903ac54b40bf19929eefe3a6630daf918724;p=mirrors%2FFD230.git 优化slip和uart初始化代码 --- diff --git a/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c b/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c index efda60d74..be6daf1df 100644 --- a/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c +++ b/code/sdk/drivers/chips/brandy/porting/uart/uart_porting.c @@ -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, diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c index eec78f58c..6a7ade699 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c @@ -16,7 +16,7 @@ #include #include #include - +#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