1
0
mirror of https://github.com/cathery/sys-con.git synced 2024-11-16 23:11:25 +00:00
sys-con/source/ControllerSwitch/SwitchUSBDevice.h
2020-01-12 05:01:44 +03:00

26 lines
766 B
C++

#pragma once
#include "switch.h"
#include "IUSBDevice.h"
#include "SwitchUSBInterface.h"
#include <vector>
class SwitchUSBDevice : public IUSBDevice
{
public:
SwitchUSBDevice();
~SwitchUSBDevice();
//Initialize the class with the SetInterfaces call.
SwitchUSBDevice(UsbHsInterface *interfaces, int length);
//There are no devices to open on the switch, so instead this returns success if there are any interfaces
virtual Result Open() override;
//Closes all the interfaces associated with the class
virtual void Close() override;
// Resets the device
virtual void Reset() override;
//Create interfaces from the given array of specified element length
void SetInterfaces(UsbHsInterface *interfaces, int length);
};