zephyrproject-rtos / gsoc-2022-arduino-core

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

zephyrSerial: Redesign to supporting hardware serial #64

Closed soburi closed 1 year ago

soburi commented 1 year ago

Add support for the hardware serial device. The implementation using the UART interrupt, enabling CONFIG_UART_INTERRUPT_DRIVEN.

Instantiate as 'Serial' with UART device defined in 'serials' array under zephyr,user node. If the 'serials' array is not defined, try to instantiate with a UART device labeled 'arduino_serial'. If even 'arduino_serial' does not define, it uses the stub implementation that redirects to printk().


As a result of this PR, changes Serial output goes to UART1(exporse in Arduino header) in nrf52840dk_nrf52840 case.

soburi commented 1 year ago

I feel like you also need to add overlay changes for nrf52840dk_nrf52840, rest you've covered.

It is no needed. Because nrf52840dk_nrf52840 defines arduino_serial, uses it. Use exists definition if possible to use. (It is rule for reduce our work.)

DhruvaG2000 commented 1 year ago

This is a major PR in serial, and it would be awesome to have @szczys review it as well.

DhruvaG2000 commented 1 year ago

do you have any remaining concerns with this PR?

None, Thanks alot @soburi for this PR and Mike for reviewing! Apologies for the delay in merging.