-
Notifications
You must be signed in to change notification settings - Fork 33
zephyrSerial: Redesign to supporting hardware serial #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3a07220
to
c3a0e5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR,
I feel like you also need to add overlay changes for nrf52840dk_nrf52840
, rest you've covered.
```sh | ||
$> west build -p -b arduino_nano_33_ble sample/serial_event/ | ||
|
||
$> west flash --bossac=/home/$USER/.arduino15/packages/arduino/tools/bossac/1.9.1-arduino2/bossac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close code ticks after this .. ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it.
c3a0e5d
to
f9898d9
Compare
It is no needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built locally, yet to test on HW, but code LGTM
This is a major PR in serial, and it would be awesome to have @szczys review it as well. |
Add implementations for adruino::Print functions.
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().
Add a sample to demonstrate how to use Serial APIs
Add a description for `serials`
572a6a6
to
95d9627
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through the commit and this LGTM. I didn't have the chance to do a deep dive into everything, @DhruvaG2000 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. |
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.