diff --git a/cores/arduino/CMakeLists.txt b/cores/arduino/CMakeLists.txt index e113d8de..b3b1af15 100644 --- a/cores/arduino/CMakeLists.txt +++ b/cores/arduino/CMakeLists.txt @@ -4,6 +4,7 @@ zephyr_include_directories(../../variants) if(NOT DEFINED ARDUINO_BUILD_PATH) +zephyr_sources(zephyrPrint.cpp) zephyr_sources(zephyrSerial.cpp) zephyr_sources(zephyrCommon.cpp) zephyr_sources(main.cpp) diff --git a/cores/arduino/zephyrPrint.cpp b/cores/arduino/zephyrPrint.cpp new file mode 100644 index 00000000..979f5ce5 --- /dev/null +++ b/cores/arduino/zephyrPrint.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 TOKITA Hiroshi + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/* + * This is the default implementation. + * It will be overridden by subclassese. + */ +size_t arduino::Print::write(const uint8_t *buffer, size_t size) +{ + size_t i; + for (i=0; i