drivers/sx127x: Fix -Wformat llvm warning
Fixed warning
format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int')
This commit is contained in:
parent
ea06482b25
commit
6ba37a902d
@ -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;
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user