From 5efade0b727bc66957ab09695dc233b3a1c0b1cf Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Mon, 2 Sep 2024 09:05:00 +0800 Subject: [PATCH] TC_SerialPorts only support linux/mac --- util/include/util/tc_serialport.h | 4 ++++ util/src/tc_serialport.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/util/include/util/tc_serialport.h b/util/include/util/tc_serialport.h index 65e53873..a1ad7386 100644 --- a/util/include/util/tc_serialport.h +++ b/util/include/util/tc_serialport.h @@ -10,10 +10,13 @@ #include #include #include +#include "util/tc_platform.h" #include "util/tc_ex.h" #include "util/tc_epoller.h" #include "util/tc_network_buffer.h" +#if TARGET_PLATFORM_LINUX || TARGET_PLATFORM_IOS + namespace tars { @@ -315,3 +318,4 @@ class TC_SerialPortGroup } +#endif diff --git a/util/src/tc_serialport.cpp b/util/src/tc_serialport.cpp index 71125cea..4f3a4481 100644 --- a/util/src/tc_serialport.cpp +++ b/util/src/tc_serialport.cpp @@ -4,6 +4,8 @@ #include "util/tc_serialport.h" +#if TARGET_PLATFORM_LINUX || TARGET_PLATFORM_IOS + namespace tars { @@ -423,3 +425,5 @@ int TC_SerialPort::recv(void *buf, uint32_t len) } } + +#endif