[riot-notifications] [RIOT-OS/RIOT] netdev: add netdev_register_signal (#16922)
notifications at github.com
Thu Sep 30 16:36:39 CEST 2021
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
### Contribution description
This PR is an alternative to #16921 but more generic (as proposed by @benpicco ).
It adds a callback mechanism to indicate the upper layer that a netdev device finished its setup/registration procedure.
This function can be used as a post_setup hook to do clock configuration or trimming, without requiring to get the private descriptor through the network interface (without this PR the device descriptor is retrieved with gnrc_netif_get_by_type).
This PR is required to remove the GNRC<->netdev dependency, because it won't be guaranteed that the device descriptor of GNRC netif points to a netdev device.
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
### Testing procedure
Compile test should be enough.
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
Alternative to #16921
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 --
* <a href="https://github.com/RIOT-OS/RIOT/pull/16922/commits/296dbc5a60b475fa0bf9e4f848d90d9d79e098b1">netdev: add netdev_register_signal</a>
-- File Changes --
M drivers/include/net/netdev.h (27)
-- 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