rp2/boards/W5500_EVB_PICO: Add new board definition for W5500_EVB_PICO.
Signed-off-by: github@mymeterinfo.info
This commit is contained in:
parent
b6651a7a89
commit
6e51dbd95a
20
ports/rp2/boards/W5500_EVB_PICO/board.json
Normal file
20
ports/rp2/boards/W5500_EVB_PICO/board.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"deploy": [
|
||||
"../deploy.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"Breadboard Friendly",
|
||||
"Castellated Pads",
|
||||
"Ethernet",
|
||||
"Micro USB"
|
||||
],
|
||||
"images": [
|
||||
"W5500-EVB-Pico.jpg"
|
||||
],
|
||||
"mcu": "rp2040",
|
||||
"product": "Wiznet W5500-EVB-Pico",
|
||||
"thumbnail": "",
|
||||
"url": "https://www.wiznet.io/product-item/w5500-evb-pico/",
|
||||
"vendor": "Wiznet"
|
||||
}
|
4
ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake
Normal file
4
ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
# cmake file for Wiznet W5500-EVB-Pico.
|
||||
set(PICO_BOARD pico)
|
||||
set(MICROPY_PY_NETWORK_WIZNET5K W5500)
|
||||
set(MICROPY_PY_LWIP 1)
|
19
ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.h
Normal file
19
ports/rp2/boards/W5500_EVB_PICO/mpconfigboard.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Board config for Wiznet W5500-EVB-Pico.
|
||||
|
||||
// Board and hardware specific configuration
|
||||
#define MICROPY_HW_BOARD_NAME "W5500-EVB-Pico"
|
||||
#define MICROPY_HW_FLASH_STORAGE_BYTES (1408 * 1024)
|
||||
|
||||
// Enable networking.
|
||||
#define MICROPY_PY_NETWORK (1)
|
||||
|
||||
// Wiznet HW config.
|
||||
#define MICROPY_HW_WIZNET_SPI_ID (0)
|
||||
#define MICROPY_HW_WIZNET_SPI_BAUDRATE (20 * 1000 * 1000)
|
||||
#define MICROPY_HW_WIZNET_SPI_SCK (18)
|
||||
#define MICROPY_HW_WIZNET_SPI_MOSI (19)
|
||||
#define MICROPY_HW_WIZNET_SPI_MISO (16)
|
||||
#define MICROPY_HW_WIZNET_PIN_CS (17)
|
||||
#define MICROPY_HW_WIZNET_PIN_RST (20)
|
||||
// Connecting the INTN pin enables RECV interrupt handling of incoming data.
|
||||
#define MICROPY_HW_WIZNET_PIN_INTN (21)
|
18
ports/rp2/boards/W5500_EVB_PICO/readme.md
Normal file
18
ports/rp2/boards/W5500_EVB_PICO/readme.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Wiznet W5500-EVB-Pico
|
||||
|
||||
## Network Example
|
||||
|
||||
To use network / socket based code, connect ethernet port to network with DHCP running:
|
||||
|
||||
```
|
||||
>>> import network
|
||||
>>> nic = network.WIZNET5K()
|
||||
>>> nic.active(True)
|
||||
>>> nic.ifconfig()
|
||||
('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0')
|
||||
>>> nic.ifconfig("dhcp")
|
||||
('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1')
|
||||
>>> nic.isconnected()
|
||||
True
|
||||
```
|
||||
At this point standard network communications libraries should work.
|
Loading…
Reference in New Issue
Block a user