This is based on linux's gadget0 intel loopback tests, and also github pr: https://github.com/libopencm3/libopencm3/pull/592 Note that this captures the currently broken control loopback issues on dwc_otg devices. See https://github.com/libopencm3/libopencm3/issues/873 and all linked issues. Current status is passing on f3, f0, and failing on f4.