diff options
Diffstat (limited to 'libhw')
-rw-r--r-- | libhw/w5500.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libhw/w5500.c b/libhw/w5500.c index 79fc10e..d94a88d 100644 --- a/libhw/w5500.c +++ b/libhw/w5500.c @@ -67,8 +67,6 @@ * SPDX-License-Identifier: MIT */ -#include <stdio.h> - /* TODO: Write a <libhw/generic/gpio.h> to avoid w5500.c being * pico-sdk-specific. */ #include <hardware/gpio.h> /* pico-sdk:hardware_gpio */ @@ -78,6 +76,9 @@ #include <libhw/generic/alarmclock.h> /* for sleep_*() */ +#define LOG_NAME W5500 +#include <libmisc/log.h> /* for errorf() */ + #define IMPLEMENTATION_FOR_LIBHW_W5500_H YES #include <libhw/w5500.h> @@ -340,7 +341,7 @@ void _w5500_init(struct w5500 *chip, w5500ll_write_sock_reg(chip->spidev, 0, mode, a); uint8_t b = w5500ll_read_sock_reg(chip->spidev, 0, mode); if (b != a) - printf("SPI to W5500 does not appear to be functional: wrote:%d != read:%d\n", a, b); + errorf("SPI to W5500 does not appear to be functional: wrote:%d != read:%d", a, b); } w5500ll_write_sock_reg(chip->spidev, 0, mode, 0); |