Lifted directly from https://github.com/rp-rs/rp-hal-boards/blob/HEAD/boards/rp-pico/examples/pico_usb_serial.rs.