Sun, 12 Mar 2023 14:56:04 +0100
MicroPython
- Added support for Ethernet enabled boards.
# -*- coding: utf-8 -*- # Copyright (c) 2023 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing WIZnet 5x00 related utility functions. """ def wiznetInit(): """ Function to get the WIZnet 5x00 initialization code. @return string containing the code to initialize the WIZnet 5x00 ethernet interface @rtype str """ return """ def w5x00_init(): global nic try: nic except NameError: nic = None if nic is None: import network from machine import Pin, SPI spi = SPI(0, 2_000_000, mosi=Pin(19), miso=Pin(16), sck=Pin(18)) nic = network.WIZNET5K(spi, Pin(17), Pin(20)) """