Co-authored-by: Noumi <139501014+noumidev@users.noreply.github.com>
This commit is contained in:
wheremyfoodat 2024-12-10 18:52:53 +02:00 committed by GitHub
parent 4ce0768ba1
commit dc80828397
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 456 additions and 107 deletions

View file

@ -1,8 +1,10 @@
#include "services/gsp_lcd.hpp"
#include "ipc.hpp"
namespace LCDCommands {
enum : u32 {
SetLedForceOff = 0x00130040,
};
}
@ -11,6 +13,16 @@ void LCDService::reset() {}
void LCDService::handleSyncRequest(u32 messagePointer) {
const u32 command = mem.read32(messagePointer);
switch (command) {
case LCDCommands::SetLedForceOff: setLedForceOff(messagePointer); break;
default: Helpers::panic("LCD service requested. Command: %08X\n", command);
}
}
void LCDService::setLedForceOff(u32 messagePointer) {
const u8 state = mem.read8(messagePointer + 4);
log("LCD::SetLedForceOff (state = %X)\n", state);
mem.write32(messagePointer, IPC::responseHeader(0x13, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}