From 32caa64b67b6f6a4c3c8a0b270a8b12b2f05389b Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 15 Oct 2024 21:03:18 -0600 Subject: wip --- cmd/sbc_harness/main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cmd/sbc_harness/main.c') diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c index 9f32037..1200608 100644 --- a/cmd/sbc_harness/main.c +++ b/cmd/sbc_harness/main.c @@ -12,6 +12,7 @@ #include #include "hw/rp2040_hwspi.h" +#include "hw/w5500.h" #include "usb_keyboard.h" COROUTINE hello_world_cr(void *_chan) { @@ -34,6 +35,19 @@ int main() { /* initialization */ stdio_uart_init(); + struct rp2040_hwspi dev_spi; + struct w5500 dev_w5500; + rp2040_hwspi_init(&dev_spi, "W5500", RP2040_HWSPI_0, + SPI_MODE_0, /* the W5500 supports mode 0 or mode 3 */ + 80*1000*1000, /* run at the W5500's max rate of 80MHz */ + 16, /* PIN_MISO */ + 19, /* PIN_MOSI */ + 18, /* PIN_CLK */ + 17); /* PIN_CS */ + w5500_init(&dev_w5500, "W5500", &dev_spi, + 21, /* PIN_INTR */ + 20); /* PIN_RESET */ + usb_common_earlyinit(); usb_keyboard_init(); usb_common_lateinit(); -- cgit v1.2.3-2-g168b