Skip to content
Snippets Groups Projects
Whinis's avatar
John Turner authored
Moved all usb console functions to cdc functions, started rework os usb->uart functions in uart handler.

This is a relatively major rewrite allowing for more fine grained controls where its needed and smaller buffers for uart and usb incoming where data is unlikely to sit for long.
be6c126c

SFP Uart Board

This firmware works for the SFP-UART board using a rp2040 as a usb->uart and i2c bridge. This works in tandem with the hardware to allow interfacing with various SFP modules that expose UART over non-standard pins. Due to limitations in drivers for both windows and linux in regards composite devices a different approach was taken for i2c. For I2C a hid interface was established that using a custom hid report, limitations in HID reports limits the size of the report preventing reading entire eeprom addresses at once. With limitation in mind an arbitrary 32 byte return was select.

A second CDC interface is provided as a debugging interface as required.

Large portions of this code were sourced from https://github.com/Nicolai-Electronics/rp2040-i2c-interface and https://github.com/Noltari/pico-uart-bridge

Disclaimer

This software is provided without warranty, according to the MIT License, and should therefore not be used where it may endanger life, financial stakes, or cause discomfort and inconvenience to others.

Raspberry Pi Pico Pinout

Raspberry Pi Pico GPIO Function
GPIO16 (Pin 21) I2C0 SDA
GPIO17 (Pin 22) I2C0 SCL
GPIO24 (Pin 36) UART1 Connected LED
GPIO25 (Pin 37) UART1 Rx Act LED
GPIO21 (Pin 32) UART1 TX
GPIO20 (Pin 31) UART1 RX