zephyrproject-rtos / gsoc-2022-arduino-core

Arduino Core Zephyr Module (GSoC 2022 Project)
Apache License 2.0
43 stars 11 forks source link

zephyrCommon: Add Print::write(const uint8_t*, size_t) default implementation #57

Closed soburi closed 1 year ago

soburi commented 1 year ago

When compile with enabling CONFIG_DEBUG option, the Print::write virtual function failed to link.

This implementation is usually not used. Because the override implementation that implements by the subclass will be used.

Signed-off-by: TOKITA Hiroshi tokita.hiroshi@fujitsu.com

soburi commented 1 year ago

@DhruvaG2000

In my opinion this should go into cores/arduino/zephyrSerial.cpp.

The Print class is also used by (TCP) Client class, UDP class, and also user-defined classes via the Stream class. I think it should not be placed in zephyrSerial because it has no relation to the Serial class.

I rewrited it to splitting into the new file named 'zephyrPrint.cpp'. Please review it.

DhruvaG2000 commented 1 year ago

Seems like this file can in future have a similar structure to original Print.cpp Perhaps we can even consider migrating ZephyrSerial entirely to use this file itself. @szczys and @alvarowolfx I would love to hear your thoughts on this

DhruvaG2000 commented 1 year ago

Been too long since approved, I do not see any nacks, hence merging.