1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/devices/asus-dumo/usb_role_switch_task.rb
Samuel Dionne-Riel bd1217c993 asus-dumo: Add USB role switch task
This relies on one of the patches added to the build.
2021-01-30 22:53:19 -05:00

11 lines
274 B
Ruby

class Tasks::UsbRoleSwitchTask < SingletonTask
def initialize()
Tasks::SetupGadgetMode.instance.add_dependency(:Task, self)
add_dependency(:Mount, "/sys")
end
def run()
System.write("/sys/class/usb_role/fe800000.usb-role-switch/role", "device")
end
end