diff options
Diffstat (limited to 'libhw/w5500.c')
-rw-r--r-- | libhw/w5500.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libhw/w5500.c b/libhw/w5500.c index e675ae9..7a5ba01 100644 --- a/libhw/w5500.c +++ b/libhw/w5500.c @@ -239,6 +239,7 @@ static COROUTINE w5500_irq_cr(void *_chip) { struct _w5500_socket *socket = &chip->sockets[socknum]; uint8_t sockintr = w5500ll_read_sock_reg(chip->spidev, socknum, interrupt); + debugf("w5500_irq_cr(): sockintr=%"PRIu8, sockintr); switch (socket->mode) { case W5500_MODE_NONE: @@ -363,15 +364,6 @@ void _w5500_init(struct w5500 *chip, }; } - /* Validate that SPI works correctly. */ - for (uint16_t a = 0; a < 0x100; a++) { - w5500ll_write_sock_reg(chip->spidev, 0, mode, a); - uint8_t b = w5500ll_read_sock_reg(chip->spidev, 0, mode); - if (b != a) - 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); - /* Initialize the hardware. */ gpio_set_irq_enabled_with_callback(pin_intr, GPIO_IRQ_EDGE_FALL, true, w5500_intrhandler); gpio_set_dir(chip->pin_reset, GPIO_OUT); |