Add soc:u

This commit is contained in:
wheremyfoodat 2023-08-10 17:44:42 +03:00
parent 01a7985324
commit 2bb751110b
7 changed files with 66 additions and 2 deletions

View file

@ -33,6 +33,7 @@ namespace KernelHandles {
NIM, // Updates, DLC, etc
NDM, // ?????
PTM, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
SOC, // Socket service
Y2R, // Also does camera stuff
MinServiceHandle = AC,
@ -82,6 +83,7 @@ namespace KernelHandles {
case NFC: return "NFC";
case NIM: return "NIM";
case PTM: return "PTM";
case SOC: return "SOC";
case Y2R: return "Y2R";
default: return "Unknown";
}

View file

@ -53,6 +53,7 @@ namespace Log {
static Logger<false> nimLogger;
static Logger<false> ndmLogger;
static Logger<false> ptmLogger;
static Logger<false> socLogger;
static Logger<false> y2rLogger;
static Logger<false> srvLogger;

View file

@ -29,6 +29,7 @@
#include "services/nfc.hpp"
#include "services/nim.hpp"
#include "services/ptm.hpp"
#include "services/soc.hpp"
#include "services/y2r.hpp"
// More circular dependencies!!
@ -66,6 +67,7 @@ class ServiceManager {
NIMService nim;
NDMService ndm;
PTMService ptm;
SOCService soc;
Y2RService y2r;
// "srv:" commands

21
include/services/soc.hpp Normal file
View file

@ -0,0 +1,21 @@
#pragma once
#include "helpers.hpp"
#include "kernel_types.hpp"
#include "logger.hpp"
#include "memory.hpp"
class SOCService {
Handle handle = KernelHandles::SOC;
Memory& mem;
MAKE_LOG_FUNCTION(log, socLogger)
bool initialized = false;
// Service commands
void initializeSockets(u32 messagePointer);
public:
SOCService(Memory& mem) : mem(mem) {}
void reset();
void handleSyncRequest(u32 messagePointer);
};