From 4997cac41860c0faf9df429fc1fc75e139512a4b Mon Sep 17 00:00:00 2001 From: lixianjing Date: Sat, 23 Sep 2023 10:21:36 +0800 Subject: [PATCH] move serial_helper to tkc --- docs/changes.md | 3 +++ src/ext_widgets/serial_widget/serial_widget.c | 2 +- src/streams/serial/iostream_serial.h | 2 +- src/streams/serial/istream_serial.c | 1 - src/streams/serial/istream_serial.h | 2 +- src/streams/serial/ostream_serial.c | 1 - src/streams/serial/ostream_serial.h | 2 +- src/streams/tools/serial_at.c | 2 +- src/streams/tools/serial_echo.c | 2 +- src/streams/tools/serial_send.c | 3 +-- src/{streams/serial => tkc}/serial_helper.c | 2 +- src/{streams/serial => tkc}/serial_helper.h | 0 tests/serial_helper_test.cc | 2 +- 13 files changed, 12 insertions(+), 12 deletions(-) rename src/{streams/serial => tkc}/serial_helper.c (99%) rename src/{streams/serial => tkc}/serial_helper.h (100%) diff --git a/docs/changes.md b/docs/changes.md index ab2c54b8b..856c4772a 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,5 +1,8 @@ # 最新动态 +2023/09/23 + * 将serial_helper.c/.h移动到tkc目录。 + 2023/09/21 * 修改scroll\_view在children\_layout中设置ym垂直间距时,底部没有间距的bug,并在demouiold添加演示(感谢颖健提供补丁) * 完善serial\_open的注释(感谢俊杰提供补丁) diff --git a/src/ext_widgets/serial_widget/serial_widget.c b/src/ext_widgets/serial_widget/serial_widget.c index 7098168e4..96794e319 100644 --- a/src/ext_widgets/serial_widget/serial_widget.c +++ b/src/ext_widgets/serial_widget/serial_widget.c @@ -26,7 +26,7 @@ #include "base/main_loop.h" #include "serial_widget.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" #include "streams/serial/iostream_serial.h" static ret_t serial_widget_apply_props(widget_t* widget); diff --git a/src/streams/serial/iostream_serial.h b/src/streams/serial/iostream_serial.h index 7e929dbff..f8a8f6afa 100644 --- a/src/streams/serial/iostream_serial.h +++ b/src/streams/serial/iostream_serial.h @@ -24,7 +24,7 @@ #include "tkc/fs.h" #include "tkc/iostream.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" BEGIN_C_DECLS diff --git a/src/streams/serial/istream_serial.c b/src/streams/serial/istream_serial.c index 3de5cfa1b..9fd4a4f12 100644 --- a/src/streams/serial/istream_serial.c +++ b/src/streams/serial/istream_serial.c @@ -20,7 +20,6 @@ */ #include "tkc/mem.h" -#include "streams/serial/serial_helper.h" #include "streams/serial/istream_serial.h" static int32_t tk_istream_serial_read(tk_istream_t* stream, uint8_t* buff, uint32_t max_size) { diff --git a/src/streams/serial/istream_serial.h b/src/streams/serial/istream_serial.h index a3491b01d..032671a4f 100644 --- a/src/streams/serial/istream_serial.h +++ b/src/streams/serial/istream_serial.h @@ -24,7 +24,7 @@ #include "tkc/fs.h" #include "tkc/istream.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" BEGIN_C_DECLS diff --git a/src/streams/serial/ostream_serial.c b/src/streams/serial/ostream_serial.c index d032b4db7..16d39a728 100644 --- a/src/streams/serial/ostream_serial.c +++ b/src/streams/serial/ostream_serial.c @@ -20,7 +20,6 @@ */ #include "tkc/mem.h" -#include "streams/serial/serial_helper.h" #include "streams/serial/ostream_serial.h" static int32_t tk_ostream_serial_write(tk_ostream_t* stream, const uint8_t* buff, diff --git a/src/streams/serial/ostream_serial.h b/src/streams/serial/ostream_serial.h index eabe489b0..bf3a52af0 100644 --- a/src/streams/serial/ostream_serial.h +++ b/src/streams/serial/ostream_serial.h @@ -24,7 +24,7 @@ #include "tkc/fs.h" #include "tkc/ostream.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" BEGIN_C_DECLS diff --git a/src/streams/tools/serial_at.c b/src/streams/tools/serial_at.c index 2a19efee9..abf7c8ea0 100644 --- a/src/streams/tools/serial_at.c +++ b/src/streams/tools/serial_at.c @@ -1,8 +1,8 @@ #include "tkc/utils.h" #include "tkc/platform.h" #include "tkc/socket_helper.h" +#include "tkc/serial_helper.h" #include "streams/serial/iostream_serial.h" -#include "streams/serial/serial_helper.h" #define TEST_READ_LEN 1 diff --git a/src/streams/tools/serial_echo.c b/src/streams/tools/serial_echo.c index c2e1e9a7a..1165b0565 100644 --- a/src/streams/tools/serial_echo.c +++ b/src/streams/tools/serial_echo.c @@ -6,7 +6,7 @@ #include "tkc/platform.h" #include "streams/serial/iostream_serial.h" #include "tkc/socket_helper.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" void do_echo(tk_iostream_t* iostream) { int32_t ret = 0; diff --git a/src/streams/tools/serial_send.c b/src/streams/tools/serial_send.c index ec0edaf68..e1a80e339 100644 --- a/src/streams/tools/serial_send.c +++ b/src/streams/tools/serial_send.c @@ -5,9 +5,8 @@ #include "tkc/fs.h" #include "tkc/mem.h" #include "tkc/platform.h" -#include "streams/serial/iostream_serial.h" #include "tkc/socket_helper.h" -#include "streams/serial/serial_helper.h" +#include "streams/serial/iostream_serial.h" void do_send(tk_iostream_t* iostream, const char* filename) { int32_t ret = 0; diff --git a/src/streams/serial/serial_helper.c b/src/tkc/serial_helper.c similarity index 99% rename from src/streams/serial/serial_helper.c rename to src/tkc/serial_helper.c index 5213bfce3..e6fe57ee3 100644 --- a/src/streams/serial/serial_helper.c +++ b/src/tkc/serial_helper.c @@ -37,7 +37,7 @@ #include "tkc/time_now.h" #include "tkc/socket_pair.h" #include "tkc/socket_helper.h" -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" #ifdef WIN32 #define prefix L"\\\\.\\" diff --git a/src/streams/serial/serial_helper.h b/src/tkc/serial_helper.h similarity index 100% rename from src/streams/serial/serial_helper.h rename to src/tkc/serial_helper.h diff --git a/tests/serial_helper_test.cc b/tests/serial_helper_test.cc index 3e549c6b8..f8c694c0a 100644 --- a/tests/serial_helper_test.cc +++ b/tests/serial_helper_test.cc @@ -1,4 +1,4 @@ -#include "streams/serial/serial_helper.h" +#include "tkc/serial_helper.h" #include "gtest/gtest.h" TEST(SerialHelper, stopbits) {