3 ms·
> I had a first working version of the USB stack for the STM32F405 micro-controller about four years ago, but I couldn’t find the time to make this implementati
by amelius 5y ago
> I had a first working version of the USB stack for the STM32F405 micro-controller about four years ago, but I couldn’t find the time to make this implementation clean and micro-controller agnostic until last year.
How can you make the implementation micro-controller agnostic if the microcontroller itself implements the USB protocol as well to a great extent, and you don't want to waste that part of the silicon?
- synack 5y agoThe USB stack communicates with the device controller using a well defined interface. As long as a driver implements all of the methods in this interface, the USB stack doesn't need to know anything about the hardware. Interface: https://github.com/Fabien-Chouteau/usb_embedded/blob/main/src/usb-hal-device.ads https://github.com/Fabien-Chouteau/usb_embedded/blob/main/sr... Implementation: https://github.com/JeremyGrosser/rp2040_hal/blob/master/src/drivers/rp-usb_device.adb https://github.com/JeremyGrosser/rp2040_hal/blob/master/src/...