Giter Site home page Giter Site logo

Comments (3)

negz avatar negz commented on May 13, 2024

https://github.com/tinygo-org/tinygo/blob/731532cd2/src/machine/usb.go#L261

I'm attempting to take a shot at this, using TinyGo's implementation as a reference. In part because it seems more minimal than alternatives like TinyUSB. I believe TinyGo have implemented just enough of CEC to be a serial device, not support for modems etc. I'm also trying to use TinyGo as a reference because I'm fluent in Go, but not Zig, or microcontrollers, or USB. 😄

from microzig.

rosshadden avatar rosshadden commented on May 13, 2024

Any luck with this? I read that picotool needs the firmware running on a microcontroller to implement USB-CDC in order for its load --force argument to work (letting you reboot picos outside of BOOTSEL mode). When using C you can set pico_enable_stdio_usb(<project-name> 1) in CMakeLists.txt to accomplish this.

Apparently this is because picotool uses PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE though I don't know enough of how this stuff works to provide any of my own insight.

from microzig.

negz avatar negz commented on May 13, 2024

Unfortunately I didn't get very far before my vacation ended.

I was finding it pretty hard to figure out how to cleanly extend the existing USB implementation. A lot of this is probably just because I don't know Zig, but I think it was exacerbated by the fact that the implementation isn't designed for extensibility.

My understanding based on ZigEmbeddedGroup/raspberrypi-rp2040#40 is that the USB implementation is a port of https://github.com/cbiffle/rp2040-usb-device-in-one-file/blob/4878f4/src/main.rs, which per its header comments is intended "for reference and study".

Here's what I ended up with. It's mostly just all the structs that I think are needed to make CDC work: 846e994e

from microzig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.