[riot-notifications] [RIOT-OS/RIOT] net/gnrc/rpl: use ztimer_msec if available (#16339)

Hauke Petersen notifications at github.com
Thu Apr 15 13:48:54 CEST 2021

### Contribution description
With this PR RPL will use `ztimer_msec` as timer whenever  `ztimer_msec` is included in the build. This is needed for `xtimer`-free GNRC builds for getting to lower power consumption.

One small quirk: when building with ztimer, the RPL shell commands does not show the remaining seconds until the trickle timer triggers next anymore. This is due to missing functionality in the `ztimer`, and IMO it would be overkill to add this functionality into ztimer (or any other workaround in the trickle timer) just to get this debug information...

### Testing procedure
The default builds (e.g. `examples/gnrc_networking`) should not change, as per default RPL will still use xtimer. But when building with `ztimer_msec` included in the build, RPL should switch to use `ztimer_msec`.

This can be tested e.g. with two samr21-xpro nodes by running the `examples/gnrc_networking` example while building it with `USEMODULE="ztimer_msec ztimer_periph_rtt" make ...`.

### Issues/PRs references
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * net/gnrc/rpl: use ztimer_msec if available
  * sys/shell/sc_gnrc_rpl: use xtimer only if available

-- File Changes --

    M sys/Makefile.dep (4)
    M sys/include/net/gnrc/rpl.h (1)
    M sys/net/gnrc/routing/rpl/gnrc_rpl.c (19)
    M sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c (9)
    M sys/shell/commands/sc_gnrc_rpl.c (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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210415/5f58ca37/attachment.htm>

More information about the notifications mailing list