diff --git a/drivers/sx127x/sx127x_getset.c b/drivers/sx127x/sx127x_getset.c index 5744aaf778..46a27bb67b 100644 --- a/drivers/sx127x/sx127x_getset.c +++ b/drivers/sx127x/sx127x_getset.c @@ -123,7 +123,7 @@ uint32_t sx127x_get_channel(const sx127x_t *dev) void sx127x_set_channel(sx127x_t *dev, uint32_t channel) { - DEBUG("[sx127x] Set channel: %lu\n", channel); + DEBUG("[sx127x] Set channel: %" PRIu32 "\n", channel); /* Save current operating mode */ dev->settings.channel = channel; @@ -814,14 +814,14 @@ void sx127x_set_preamble_length(sx127x_t *dev, uint16_t preamble) void sx127x_set_rx_timeout(sx127x_t *dev, uint32_t timeout) { - DEBUG("[sx127x] Set RX timeout: %lu\n", timeout); + DEBUG("[sx127x] Set RX timeout: %" PRIu32 "\n", timeout); dev->settings.lora.rx_timeout = timeout; } void sx127x_set_tx_timeout(sx127x_t *dev, uint32_t timeout) { - DEBUG("[sx127x] Set TX timeout: %lu\n", timeout); + DEBUG("[sx127x] Set TX timeout: %" PRIu32 "\n", timeout); dev->settings.lora.tx_timeout = timeout; } diff --git a/tests/driver_sx127x/main.c b/tests/driver_sx127x/main.c index b18d9965c5..ea293a017e 100644 --- a/tests/driver_sx127x/main.c +++ b/tests/driver_sx127x/main.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "thread.h" #include "xtimer.h" @@ -328,7 +329,7 @@ static void _event_cb(netdev_t *dev, netdev_event_t event) case NETDEV_EVENT_RX_COMPLETE: len = dev->driver->recv(dev, NULL, 0, 0); dev->driver->recv(dev, message, len, &packet_info); - printf("{Payload: \"%s\" (%d bytes), RSSI: %i, SNR: %i, TOA: %lu}\n", + printf("{Payload: \"%s\" (%d bytes), RSSI: %i, SNR: %i, TOA: %" PRIu32 "}\n", message, (int)len, packet_info.rssi, (int)packet_info.snr, sx127x_get_time_on_air((const sx127x_t*)dev, len));