2020-07-11 19:11:13 +00:00
|
|
|
#pragma once
|
|
|
|
#include "switchcontroller.hpp"
|
|
|
|
|
|
|
|
namespace ams::controller {
|
|
|
|
|
|
|
|
class FakeSwitchController : public SwitchController {
|
|
|
|
|
|
|
|
public:
|
2020-07-21 10:15:52 +00:00
|
|
|
FakeSwitchController(ControllerType type, const bluetooth::Address *address)
|
2020-07-30 20:07:26 +00:00
|
|
|
: SwitchController(type, address) { };
|
2020-07-11 19:11:13 +00:00
|
|
|
|
2020-07-27 17:42:40 +00:00
|
|
|
const bluetooth::HidReport * handleIncomingReport(const bluetooth::HidReport *report);
|
|
|
|
const bluetooth::HidReport * handleOutgoingReport(const bluetooth::HidReport *report);
|
2020-07-11 19:11:13 +00:00
|
|
|
|
2020-07-27 17:42:40 +00:00
|
|
|
protected:
|
|
|
|
virtual Result setVibration(void);
|
|
|
|
virtual Result setPlayerLed(u8 led_mask);
|
2020-07-11 19:11:13 +00:00
|
|
|
|
2020-07-27 17:42:40 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
bluetooth::HidReport m_inputReport;
|
|
|
|
bluetooth::HidReport m_outputReport;
|
2020-07-11 19:11:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|