MissionControl/btdrv-mitm/source/controllers/emulatedswitchcontroller.hpp

40 lines
1.8 KiB
C++
Raw Normal View History

#pragma once
#include "switchcontroller.hpp"
namespace ams::controller {
class EmulatedSwitchController : public SwitchController {
public:
EmulatedSwitchController(ControllerType type, const bluetooth::Address *address)
: SwitchController(type, address) { };
const bluetooth::HidReport * handleIncomingReport(const bluetooth::HidReport *report);
const bluetooth::HidReport * handleOutgoingReport(const bluetooth::HidReport *report);
protected:
virtual Result setVibration(void);
virtual Result setPlayerLed(u8 led_mask);
Result handleSubCmdReport(const bluetooth::HidReport *report);
Result subCmdRequestDeviceInfo(const bluetooth::HidReport *report);
Result subCmdSpiFlashRead(const bluetooth::HidReport *report);
Result subCmdSpiFlashWrite(const bluetooth::HidReport *report);
Result subCmdSpiSectorErase(const bluetooth::HidReport *report);
Result subCmdSetInputReportMode(const bluetooth::HidReport *report);
Result subCmdTriggersElapsedTime(const bluetooth::HidReport *report);
Result subCmdSetShipPowerState(const bluetooth::HidReport *report);
Result subCmdSetMcuConfig(const bluetooth::HidReport *report);
Result subCmdSetMcuState(const bluetooth::HidReport *report);
Result subCmdSetPlayerLeds(const bluetooth::HidReport *report);
Result subCmdEnableImu(const bluetooth::HidReport *report);
Result subCmdEnableVibration(const bluetooth::HidReport *report);
Result fakeSubCmdResponse(const u8 response[], size_t size);
bluetooth::HidReport m_inputReport;
bluetooth::HidReport m_outputReport;
};
}