#ifndef BOARD_CONFIG_H #define BOARD_CONFIG_H /* W5500 on SPI1; eight WS2812 strips (portal UDP protocol) */ #define PIN_LED_STATUS 25 #define SPI_PORT spi1 #define SPI_CLK_MHZ 15 /* This adapter board: CS=13, RST=9 (some portal PCBs use CS=9 / RST=13) */ #define PIN_CS 13 #define PIN_SCK 10 #define PIN_MOSI 11 #define PIN_MISO 12 #define PIN_RST 9 /* Strip 0 / 1 overridable; remaining pins fixed in DEFAULT_STRIP_PINS */ #ifndef PIN_WS2812 #define PIN_WS2812 18 #endif #ifndef PIN_WS2812_1 #define PIN_WS2812_1 19 #endif /* Strip / buffer capacity. Pixel count comes from each UDP frame length. */ #ifndef MAX_LEDS #define MAX_LEDS 512 #endif #define LED_RGB_BYTES (MAX_LEDS * 3) /* Eight WS2812 outputs (one PIO SM each on RP2040). */ #ifndef MAX_STRIPS #define MAX_STRIPS 8 #endif #define DEFAULT_STRIP_PINS \ { PIN_WS2812, PIN_WS2812_1, 20, 21, 22, 26, 27, 28 } /* W5500 socket assignments */ #define SOCKET_DHCP 0 #define SOCKET_UDP 1 /* UDP port (same as CircuitPython adapter / portal) */ #define UDP_PORT 50007 /* Compile-time panel index for filtered frames (0–4). 255 = accept all. */ #ifndef PANEL_ID #define PANEL_ID 255 #endif #ifndef USE_DHCP #define USE_DHCP 0 #endif #ifndef STATIC_IP #define STATIC_IP_OCT4 ((PANEL_ID) == 255 ? 19u : (10u + (unsigned)(PANEL_ID))) #define STATIC_IP {10, 1, 1, (uint8_t)STATIC_IP_OCT4} #endif #ifndef STATIC_SN #define STATIC_SN {255, 255, 255, 0} #endif #ifndef STATIC_GW #define STATIC_GW {10, 1, 1, 1} #endif #ifndef STATIC_DNS #define STATIC_DNS {10, 1, 1, 1} #endif /* Locally administered; last byte = PANEL_ID (unique per panel 0–4). */ #define MAC_ADDR {0x02, 0x50, 0x52, 0x54, 0x4C, (uint8_t)PANEL_ID} #endif