Skip to content

Commit

Permalink
drivers: Added PRIuSIZE print format specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
fzi-haxel committed Jan 12, 2024
1 parent 31da90e commit 381cae6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/atwinc15x0/atwinc15x0_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ static int _atwinc15x0_get(netdev_t *netdev, netopt_t opt, void *val,
assert(dev);
assert(dev == atwinc15x0);

DEBUG("%s dev=%p opt=%u val=%p max_len=%u\n", __func__,
DEBUG("%s dev=%p opt=%u val=%p max_len=%" PRIuSIZE "\n", __func__,
(void *)netdev, opt, val, max_len);

switch (opt) {
Expand Down Expand Up @@ -755,7 +755,7 @@ static int _atwinc15x0_set(netdev_t *netdev, netopt_t opt, const void *val,
{
atwinc15x0_t *dev = (atwinc15x0_t *)netdev;

DEBUG("%s dev=%p opt=%u val=%p max_len=%u\n", __func__,
DEBUG("%s dev=%p opt=%u val=%p max_len=%" PRIuSIZE "\n", __func__,
(void *)netdev, opt, val, max_len);

int ret;
Expand Down
4 changes: 2 additions & 2 deletions drivers/lcd/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ void lcd_ll_release(lcd_t *dev)
void lcd_ll_write_cmd(lcd_t *dev, uint8_t cmd, const uint8_t *data,
size_t len)
{
DEBUG("[%s] command 0x%02x (%u) ", __func__, cmd, len);
DEBUG("[%s] command 0x%02x (%" PRIuSIZE ") ", __func__, cmd, len);
if (IS_USED(ENABLE_DEBUG) && len) {
for (uint8_t i = 0; i < len; i++) {
DEBUG("0x%02x ", data[i]);
Expand All @@ -310,7 +310,7 @@ void lcd_ll_read_cmd(lcd_t *dev, uint8_t cmd, uint8_t *data, size_t len)
{
assert(len);

DEBUG("[%s] command 0x%02x (%u) ", __func__, cmd, len);
DEBUG("[%s] command 0x%02x (%" PRIuSIZE ") ", __func__, cmd, len);

lcd_ll_cmd_start(dev, cmd, true);
lcd_ll_read_bytes(dev, false, data, len);
Expand Down
2 changes: 1 addition & 1 deletion drivers/nrf24l01p_ng/nrf24l01p_ng_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static int _recv(netdev_t *netdev, void *buf, size_t len, void *info)
}
/* drop frame, content in buf becomes invalid and return -ENOBUFS */
if (len < frame_len) {
DEBUG("[nrf24l01p_ng] Buffer too small: %u < %u, dropping frame\n",
DEBUG("[nrf24l01p_ng] Buffer too small: %" PRIuSIZE " < %u, dropping frame\n",
len, frame_len);
uint8_t garbage[pl_width];
nrf24l01p_ng_read_rx_payload(dev, garbage, pl_width);
Expand Down
3 changes: 2 additions & 1 deletion drivers/sx126x/sx126x_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <string.h>
#include <errno.h>

#include "architecture.h"
#include "iolist.h"
#include "net/netopt.h"
#include "net/netdev.h"
Expand Down Expand Up @@ -78,7 +79,7 @@ static int _send(netdev_t *netdev, const iolist_t *iolist)
return 0;
}

DEBUG("[sx126x] netdev: sending packet now (size: %d).\n", pos);
DEBUG("[sx126x] netdev: sending packet now (size: %" PRIuSIZE ").\n", pos);
sx126x_set_lora_payload_length(dev, pos);

state = NETOPT_STATE_TX;
Expand Down
2 changes: 1 addition & 1 deletion drivers/sx1280/sx1280_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static int _send(netdev_t *netdev, const iolist_t *iolist)
return 0;
}

DEBUG("[sx1280] netdev: sending packet now (size: %d).\n", pos);
DEBUG("[sx1280] netdev: sending packet now (size: %" PRIuSIZE ").\n", pos);
sx1280_set_lora_payload_length(dev, pos);

state = NETOPT_STATE_TX;
Expand Down

0 comments on commit 381cae6

Please sign in to comment.