Skip to content

USB CDC as machine.CDC && network.LAN with W5500 support [https://trello.com/c/9XmZ8eiR]

Latest

Choose a tag to compare

@sergio-rudenko sergio-rudenko released this 21 Oct 12:51
· 282 commits to develop since this release
24ff056

Flash instructions:

esptool.py -p %%PORT%% -b 460800 --before default_reset --after no_reset --chip esp32s3 erase_flash
esptool.py -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode qio --flash_freq 80m --flash_size 16MB 0x0 firmware.bin

USB CDC as ~uart

Usage example:

import machine

RX_BUFFER_SIZE_IN_BYTES = 2048
cdc = machine.CDC(rxbuf=RX_BUFFER_SIZE_IN_BYTES) # 1024 bytes by default

buf = ''
for i in range(1000):
    buf += f'{i:06d}\r\n'

cdc.write(buf)

W5500 support fixed

Usage example:

import network
from machine import SPI, Pin

spi1 = SPI(1, sck=Pin(14), mosi=Pin(13), miso=Pin(12))
lan = network.LAN(phy_type=network.PHY_W5500, phy_addr=0, spi=spi1, int=Pin(4), cs=Pin(5))

lan.config(mac='\xDE\xAD\xBE\xEF\xCA\xFE')
lan.active(True)

lan.ifconfig(('192.168.123.100', '255.255.255.0', '192.168.123.1', '8.8.8.8'))