1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 10:12:45 +01:00

drivers: xbee: DEBUG fixes

This commit is contained in:
Kaspar Schleiser 2017-10-21 00:16:56 +02:00
parent 12d4254ae1
commit 51f16203fa

View File

@ -689,16 +689,16 @@ static int xbee_recv(netdev_t *dev, void *buf, size_t len, void *info)
size = (size_t)(xbee->rx_limit - 1);
if (buf == NULL) {
if (len > 0) {
DEBUG("[xbee] recv: reading size and dropping: %i\n", size);
DEBUG("[xbee] recv: reading size and dropping: %u\n", (unsigned)size);
xbee->rx_count = 0;
}
else {
DEBUG("[xbee] recv: reading size without dropping: %i\n", size);
DEBUG("[xbee] recv: reading size without dropping: %u\n", (unsigned)size);
}
}
else {
size = (size > len) ? len : size;
DEBUG("[xbee] recv: consuming packet: reading %i byte\n", size);
DEBUG("[xbee] recv: consuming packet: reading %u byte\n", (unsigned)size);
memcpy(buf, xbee->rx_buf, size);
xbee->rx_count = 0;
}