mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Add MCU::HWC
This commit is contained in:
parent
a13792996c
commit
c544dd1567
7 changed files with 75 additions and 28 deletions
|
@ -19,24 +19,25 @@ namespace KernelHandles {
|
|||
CECD, // More Streetpass stuff?
|
||||
CFG_U, // CFG service (Console & region info)
|
||||
CFG_I,
|
||||
DLP_SRVR, // Download Play: Server. Used for network play.
|
||||
DSP, // DSP service (Used for audio decoding and output)
|
||||
HID, // HID service (Handles input-related things including gyro. Does NOT handle New3DS controls or CirclePadPro)
|
||||
HTTP, // HTTP service (Handles HTTP requests)
|
||||
IR_USER, // One of 3 infrared communication services
|
||||
FRD, // Friend service (Miiverse friend service)
|
||||
FS, // Filesystem service
|
||||
GPU, // GPU service
|
||||
LCD, // LCD service (Used for configuring the displays)
|
||||
LDR_RO, // Loader service. Used for loading CROs.
|
||||
MIC, // MIC service (Controls the microphone)
|
||||
NFC, // NFC (Duh), used for Amiibo
|
||||
NIM, // Updates, DLC, etc
|
||||
NDM, // ?????
|
||||
PTM, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
||||
SOC, // Socket service
|
||||
SSL, // SSL service (Totally didn't expect that)
|
||||
Y2R, // Also does camera stuff
|
||||
DLP_SRVR, // Download Play: Server. Used for network play.
|
||||
DSP, // DSP service (Used for audio decoding and output)
|
||||
HID, // HID service (Handles input-related things including gyro. Does NOT handle New3DS controls or CirclePadPro)
|
||||
HTTP, // HTTP service (Handles HTTP requests)
|
||||
IR_USER, // One of 3 infrared communication services
|
||||
FRD, // Friend service (Miiverse friend service)
|
||||
FS, // Filesystem service
|
||||
GPU, // GPU service
|
||||
LCD, // LCD service (Used for configuring the displays)
|
||||
LDR_RO, // Loader service. Used for loading CROs.
|
||||
MCU_HWC, // Used for various MCU hardware-related things like battery control
|
||||
MIC, // MIC service (Controls the microphone)
|
||||
NFC, // NFC (Duh), used for Amiibo
|
||||
NIM, // Updates, DLC, etc
|
||||
NDM, // ?????
|
||||
PTM, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
||||
SOC, // Socket service
|
||||
SSL, // SSL service (Totally didn't expect that)
|
||||
Y2R, // Also does camera stuff
|
||||
|
||||
MinServiceHandle = AC,
|
||||
MaxServiceHandle = Y2R,
|
||||
|
@ -81,6 +82,7 @@ namespace KernelHandles {
|
|||
case GPU: return "GSP::GPU";
|
||||
case LCD: return "GSP::LCD";
|
||||
case LDR_RO: return "LDR:RO";
|
||||
case MCU_HWC: return "MCU::HWC";
|
||||
case MIC: return "MIC";
|
||||
case NDM: return "NDM";
|
||||
case NFC: return "NFC";
|
||||
|
|
|
@ -48,6 +48,7 @@ namespace Log {
|
|||
static Logger<false> gspGPULogger;
|
||||
static Logger<false> gspLCDLogger;
|
||||
static Logger<false> ldrLogger;
|
||||
static Logger<false> mcuLogger;
|
||||
static Logger<false> micLogger;
|
||||
static Logger<false> nfcLogger;
|
||||
static Logger<false> nimLogger;
|
||||
|
|
21
include/services/mcu/mcu_hwc.hpp
Normal file
21
include/services/mcu/mcu_hwc.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
namespace MCU {
|
||||
class HWCService {
|
||||
Handle handle = KernelHandles::MCU_HWC;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, mcuLogger)
|
||||
|
||||
// Service commands
|
||||
void getBatteryLevel(u32 messagePointer);
|
||||
|
||||
public:
|
||||
HWCService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
||||
} // namespace MCU
|
|
@ -24,6 +24,7 @@
|
|||
#include "services/http.hpp"
|
||||
#include "services/ir_user.hpp"
|
||||
#include "services/ldr_ro.hpp"
|
||||
#include "services/mcu/mcu_hwc.hpp"
|
||||
#include "services/mic.hpp"
|
||||
#include "services/ndm.hpp"
|
||||
#include "services/nfc.hpp"
|
||||
|
@ -73,6 +74,8 @@ class ServiceManager {
|
|||
SSLService ssl;
|
||||
Y2RService y2r;
|
||||
|
||||
MCU::HWCService mcu_hwc;
|
||||
|
||||
// "srv:" commands
|
||||
void enableNotification(u32 messagePointer);
|
||||
void getServiceHandle(u32 messagePointer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue