[riot-notifications] [RIOT-OS/RIOT] drivers/periph/uart: add uart_write_byte() & uart_write_string() functions (#15499)
notifications at github.com
Mon Nov 23 19:13:25 CET 2020
### Contribution description
When implementing the serial bootloader feature, I added some UART convenience functions.
- `uart_write_byte()` to send a single byte over UART
- `uart_write_string()` to send a string of text. This is especially useful for debugging with no stdio
Both are implemented as common fallback functions in `drivers/periph_common` but can be implemented by the CPU.
An implementation for sam0 is provided for `uart_write_byte()`.
### Testing procedure
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
### Issues/PRs references
Examples: Fixes #1234. See also #5678. Depends on PR #9876.
Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* drivers/uart: add convenience functions (write_byte, write_string)
* cpu/sam0_common: uart: implement uart_write_byte()
* cpu/sam0_common: uart: drop TX pin check on every write()
-- File Changes --
M cpu/sam0_common/include/periph_cpu_common.h (7)
M cpu/sam0_common/periph/uart.c (45)
M drivers/include/periph/uart.h (25)
A drivers/periph_common/uart.c (55)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications