Skip to content

drivers/xbee: migrate to ztimer_msec#17114

Merged
fjmolinas merged 3 commits intoRIOT-OS:masterfrom
fjmolinas:pr_xbee_ztimer_msec
Nov 3, 2021
Merged

drivers/xbee: migrate to ztimer_msec#17114
fjmolinas merged 3 commits intoRIOT-OS:masterfrom
fjmolinas:pr_xbee_ztimer_msec

Conversation

@fjmolinas
Copy link
Copy Markdown
Contributor

Contribution description

This PR makes xbee use ztimer_msec instead of xtimer.

Testing procedure

I ran the release test spec between arduino_zero + xbee and samr21-xpro

  • master
2021-11-02 16:59:24,939 # 58 bytes from fe80::213:a200:40c2:d4c4%6: icmp_seq=999 ttl=64 rssi=-52 dBm time=171.931 ms
2021-11-02 16:59:25,759 #
2021-11-02 16:59:25,763 # --- fe80::213:a200:40c2:d4c4 PING statistics ---
2021-11-02 16:59:25,768 # 1000 packets transmitted, 963 packets received, 3% packet loss
2021-11-02 16:59:25,773 # round-trip min/avg/max = 170.971/172.520/213.558 ms
  • pr
2021-11-02 16:56:06,125 #
2021-11-02 16:56:06,129 # --- fe80::213:a200:40c2:d4c4 PING statistics ---
2021-11-02 16:56:06,135 # 1000 packets transmitted, 965 packets received, 3% packet loss
2021-11-02 16:56:06,140 # round-trip min/avg/max = 170.971/172.525/210.119 ms

Issues/PRs references

Ticks items off #17111 and #13667

@fjmolinas fjmolinas requested a review from aabadie November 2, 2021 16:00
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 2, 2021
@github-actions github-actions bot added Area: drivers Area: Device drivers Area: tests Area: tests and testing framework labels Nov 2, 2021
@maribu
Copy link
Copy Markdown
Member

maribu commented Nov 2, 2021

The CI failure can be fixed with this:

diff --git a/drivers/include/xbee.h b/drivers/include/xbee.h
index 15551163eb..50b9d59392 100644
--- a/drivers/include/xbee.h
+++ b/drivers/include/xbee.h
@@ -26,7 +26,6 @@
 #include <stdint.h>
 
 #include "mutex.h"
-#include "xtimer.h"
 #include "periph/uart.h"
 #include "periph/gpio.h"
 #include "net/netdev.h"
diff --git a/drivers/xbee/xbee.c b/drivers/xbee/xbee.c
index 6ef0aaa517..930b670057 100644
--- a/drivers/xbee/xbee.c
+++ b/drivers/xbee/xbee.c
@@ -23,12 +23,13 @@
 #include <string.h>
 #include <errno.h>
 
-#include "xbee.h"
 #include "assert.h"
-#include "ztimer.h"
 #include "net/eui64.h"
-#include "net/netdev.h"
 #include "net/ieee802154.h"
+#include "net/netdev.h"
+#include "timex.h"
+#include "xbee.h"
+#include "ztimer.h"
 #ifdef MODULE_GNRC
 #include "net/gnrc.h"
 #endif

(I couldn't help myself but to sort the headers alphabetically. Actually, only the xtimer included needs to be dropped and the timex.h include (which was previously included indirectly from xtimer.h) needs to be added.)

@fjmolinas fjmolinas force-pushed the pr_xbee_ztimer_msec branch from 42bb5f1 to 3dd0829 Compare November 2, 2021 20:46
Copy link
Copy Markdown
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I code-reviewed the commit doing the actual migration, as I trust that uncrustify doesn't change the code. Testing output was given in the PR description.

@fjmolinas
Copy link
Copy Markdown
Contributor Author

Go!

@fjmolinas fjmolinas merged commit f6012e1 into RIOT-OS:master Nov 3, 2021
@fjmolinas fjmolinas deleted the pr_xbee_ztimer_msec branch November 3, 2021 08:05
@fjmolinas fjmolinas added this to the Release 2022.01 milestone Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants