USB host support (#527)

This commit is contained in:
Shadowtrance
2026-06-04 07:10:37 +10:00
committed by GitHub
parent a59fbf4ed5
commit 3dcc95f6f3
46 changed files with 2409 additions and 121 deletions
@@ -0,0 +1,18 @@
#include <tactility/drivers/usb_host_msc.h>
#include <tactility/device.h>
#include <tactility/driver.h>
#define USB_MSC_API(driver) ((struct UsbMscApi*)(driver)->api)
extern "C" {
const struct DeviceType USB_HOST_MSC_TYPE = {
.name = "usb-host-msc",
};
bool usb_msc_eject(struct Device* device, const char* mount_path) {
auto* api = USB_MSC_API(device_get_driver(device));
return api->eject && api->eject(device, mount_path);
}
} // extern "C"