Skip to content

Gadget Implementations

Noralf Trønnes edited this page Oct 5, 2024 · 4 revisions

GUD Gadget open source implementations.

Linux

Source: https://github.com/notro/gud/tree/master/buildroot/external/linux-patches/gud_gadget

Wiki: https://github.com/notro/gud/wiki/Linux-Gadget-Driver

Userspace Linux

It should be possible to implement GUD in userspace using USB FunctionFS. The problem is that this leads to a memcpy when the USB buffer crosses from the kernel into userspace. This will degrade performance, but since I haven't tried it I don't know how severe that is.

05.10.2024:
FunctionFS has DMA-BUF support now so that makes a userspace implementation interesting. I've started to write one in C but it's slow moving since I haven't got much time to work on this project nowadays.

Going from userspace into the DRM buffers is no problem since they can be mmap'ed.

Rust implementation (WIP): https://github.com/samcday/gud-gadget/

Raspberry Pi Pico

Source: https://github.com/notro/gud-pico

ESP32

https://github.com/affbotics/esp32-usb-monitor

Android

It would have been really cool to see old tablets and phones reused as GUD touch displays!

Implementations not updated to the final protocol