btdrv-mitm: add case for handling Set MCU State subcommand

This commit is contained in:
ndeadly 2020-07-09 21:19:02 +02:00
parent 990f704480
commit 26c3f971ed

View file

@ -232,6 +232,19 @@ namespace ams::mitm::btdrv {
} }
break; break;
case bluetooth::SubCmd_SetMcuState:
{
//BTDRV_LOG_DATA_MSG((void *)requestData, requestData->length+2, "Set MCU State");
s64 timer = os::ConvertToTimeSpan(os::GetSystemTick()).GetMilliSeconds();
u8 reportData[] = {0x31, 0x00, 0x21, timer & 0xff, 0x80, 0x00, 0x00, 0x00, 0x0b, 0xb8, 0x78, 0xd9, 0xd7, 0x81, 0x00,
0x80, subCmdId};
auto responseData = reinterpret_cast<bluetooth::HidData *>(reportData);
bluetooth::hid::report::WriteFakeHidData(&address, responseData);
}
break;
case bluetooth::SubCmd_SetPlayerLeds: case bluetooth::SubCmd_SetPlayerLeds:
{ {