1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/openwsn: use coreclk() instead of CLOCK_CORECLOCK

This commit is contained in:
Alexandre Abadie 2021-12-05 11:56:04 +01:00
parent 91927c988b
commit 084e33d504
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -23,6 +23,7 @@
#include "leds.h"
#include "openwsn_leds.h"
#include "clk.h"
#include "board.h"
#include "periph/gpio.h"
@ -86,7 +87,8 @@ static void _blink_checked(gpio_t pin)
/* toggle for ~10s if ztimer is used */
for (uint8_t i = 0; i < 100; i++) {
_toggle_checked(pin);
for (uint32_t i = 0; i < (CLOCK_CORECLOCK / 50); i++) {
uint32_t runs = coreclk() / 50;
for (uint32_t i = 0; i < runs; i++) {
/* Make sure for loop is not optimized out */
__asm__ ("");
}