// SendFWKey(key) sends the key (*unmapped* RKEY_XXX) to the firmware direct (bypassing buffer) // e.g. SendFWKey(RKEY_Mute) [toggles mute] // SendFWKey(RKEY_AudioTrk) [on the TF5800 this is the way to send the "Exit" key, on other models use RKEY_Exit] // returns 0 if unsuccessful (cannot find firmware function) int SendFWKey(dword key) { static dword processEvt = 0; if(processEvt == 0) { dword *codeSeg = (dword*)FindInstructionSequence( "34a50022 241e000a 3c150001 36b50013 3404e300 0c054af0 02a02825 27deffff 17c0fffc 3404e300", "FFFFFFFF FFFFFFFF FFF0FFFF FF00FFF0 FFFFFFFF FC000000 FF0FFFFF FFFFFFFF FFFFFFFF FFFFFFFF", 0x80100000, 0x80180000, 0, FALSE); if(codeSeg == NULL) { InitTAPex(); TAP_Print("SendFWKey.c: unsupported firmware (fw: %d:%x)\n",SysID,ApplID); return 0; } processEvt = ABS_ADDR(codeSeg[4]); } CallFirmwareA(processEvt, 0xE300, key); return 1; }