Add rp/usb-w

This commit is contained in:
cpq committed 2026-11-28 20:23:01 +00:00
1 parent c71c2d5f88
commit d275b0a460
8 files changed
+384 -8

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#pragma once
#define MG_ARCH MG_ARCH_PICOSDK
#define MG_TLS MG_TLS_BUILTIN
#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_DRIVER_USB_RP 1 // RP2040 / RP2350 USB controller
#define MG_ENABLE_USB_ETHERNET 1 // USB NCM Ethernet interface
#define MG_ENABLE_USB_SERIAL 1 // USB serial log console
#define MG_ENABLE_DRIVER_PICO_W 1 // WiFi on the CYW43 chip
// Two interfaces, each in its own manager: main.c starts them, not
// mg_mgr_init(). The WiFi one ignores the static address below, uses DHCP
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
// Static device address; the driver serves DHCP to the USB host. Remove
// these to get an address over DHCP instead, e.g. from Internet Sharing
#define MG_TCPIP_IP MG_IPV4(192, 168, 7, 1)
#define MG_TCPIP_MASK MG_IPV4(255, 255, 255, 0)
#define MG_SET_MAC_ADDRESS(mac) \
do { \
mac[0] = 2; \
mac[1] = 3; \
mac[2] = 4; \
mac[3] = 5; \
mac[4] = 6; \
mac[5] = 7; \
} while (0)