[riot-notifications] [RIOT-OS/RIOT] drivers/periph/uart: add uart_set_rx_cb() to uart_reconfigure API (#15497)
notifications at github.com
Mon Nov 23 12:33:37 CET 2020
### Contribution description
I discovered that we have no way to re-configure the UART RX callback after `uart_init()` has been called as it is not guaranteed that we can call `uart_init()` again. (And that is pretty much overkill just to set a pointer)
So add a `uart_set_rx_cb()` function that does just that.
To not having to implement this for all architectures, I added it to the `periph_uart_reconfigure` API which is currently only implemented by sam0.
### 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/periph/uart: add uart_set_rx_cb() to uart_reconfigure API
* cpu/sam0_common: uart: implement uart_set_rx_cb()
-- File Changes --
M cpu/sam0_common/periph/uart.c (30)
M drivers/include/periph/uart.h (14)
-- 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