mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
cecd:u: stub GetCecInfoEventHandle, GetChangeStateEventHandle
This commit is contained in:
parent
644fbbeb13
commit
cb8e85a37d
5 changed files with 56 additions and 3 deletions
|
@ -46,6 +46,7 @@ namespace Log {
|
||||||
SUB(Service, NIM) \
|
SUB(Service, NIM) \
|
||||||
SUB(Service, NWM) \
|
SUB(Service, NWM) \
|
||||||
SUB(Service, CAM) \
|
SUB(Service, CAM) \
|
||||||
|
SUB(Service, CECD) \
|
||||||
SUB(Service, CFG) \
|
SUB(Service, CFG) \
|
||||||
SUB(Service, DSP) \
|
SUB(Service, DSP) \
|
||||||
SUB(Service, HID) \
|
SUB(Service, HID) \
|
||||||
|
|
|
@ -61,6 +61,7 @@ enum class Class : ClassType {
|
||||||
Service_NIM, ///< The NIM (Network interface manager) service
|
Service_NIM, ///< The NIM (Network interface manager) service
|
||||||
Service_NWM, ///< The NWM (Network wlan manager) service
|
Service_NWM, ///< The NWM (Network wlan manager) service
|
||||||
Service_CAM, ///< The CAM (Camera) service
|
Service_CAM, ///< The CAM (Camera) service
|
||||||
|
Service_CECD, ///< The CECD service
|
||||||
Service_CFG, ///< The CFG (Configuration) service
|
Service_CFG, ///< The CFG (Configuration) service
|
||||||
Service_DSP, ///< The DSP (DSP control) service
|
Service_DSP, ///< The DSP (DSP control) service
|
||||||
Service_HID, ///< The HID (Human interface device) service
|
Service_HID, ///< The HID (Human interface device) service
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
|
#include "core/hle/kernel/event.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#include "core/hle/service/cecd/cecd.h"
|
#include "core/hle/service/cecd/cecd.h"
|
||||||
#include "core/hle/service/cecd/cecd_s.h"
|
#include "core/hle/service/cecd/cecd_s.h"
|
||||||
|
@ -12,14 +13,38 @@
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
void Init() {
|
static Kernel::SharedPtr<Kernel::Event> cecinfo_event;
|
||||||
using namespace Kernel;
|
static Kernel::SharedPtr<Kernel::Event> change_state_event;
|
||||||
|
|
||||||
|
void GetCecInfoEventHandle(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||||
|
|
||||||
|
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||||
|
cmd_buff[3] = Kernel::g_handle_table.Create(cecinfo_event).MoveFrom(); // Event handle
|
||||||
|
|
||||||
|
LOG_WARNING(Service_CECD, "(STUBBED) called");
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetChangeStateEventHandle(Service::Interface* self) {
|
||||||
|
u32* cmd_buff = Kernel::GetCommandBuffer();
|
||||||
|
|
||||||
|
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
|
||||||
|
cmd_buff[3] = Kernel::g_handle_table.Create(change_state_event).MoveFrom(); // Event handle
|
||||||
|
|
||||||
|
LOG_WARNING(Service_CECD, "(STUBBED) called");
|
||||||
|
}
|
||||||
|
|
||||||
|
void Init() {
|
||||||
AddService(new CECD_S_Interface);
|
AddService(new CECD_S_Interface);
|
||||||
AddService(new CECD_U_Interface);
|
AddService(new CECD_U_Interface);
|
||||||
|
|
||||||
|
cecinfo_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::cecinfo_event");
|
||||||
|
change_state_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "CECD_U::change_state_event");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shutdown() {
|
void Shutdown() {
|
||||||
|
cecinfo_event = nullptr;
|
||||||
|
change_state_event = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace CECD
|
} // namespace CECD
|
||||||
|
|
|
@ -5,8 +5,31 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
|
|
||||||
|
class Interface;
|
||||||
|
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetCecInfoEventHandle service function
|
||||||
|
* Inputs:
|
||||||
|
* 0: 0x000F0000
|
||||||
|
* Outputs:
|
||||||
|
* 1: ResultCode
|
||||||
|
* 3: Event Handle
|
||||||
|
*/
|
||||||
|
void GetCecInfoEventHandle(Service::Interface* self);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetChangeStateEventHandle service function
|
||||||
|
* Inputs:
|
||||||
|
* 0: 0x00100000
|
||||||
|
* Outputs:
|
||||||
|
* 1: ResultCode
|
||||||
|
* 3: Event Handle
|
||||||
|
*/
|
||||||
|
void GetChangeStateEventHandle(Service::Interface* self);
|
||||||
|
|
||||||
/// Initialize CECD service(s)
|
/// Initialize CECD service(s)
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,15 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/service/cecd/cecd.h"
|
||||||
#include "core/hle/service/cecd/cecd_u.h"
|
#include "core/hle/service/cecd/cecd_u.h"
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace CECD {
|
namespace CECD {
|
||||||
|
|
||||||
static const Interface::FunctionInfo FunctionTable[] = {
|
static const Interface::FunctionInfo FunctionTable[] = {
|
||||||
|
{0x000F0000, GetCecInfoEventHandle, "GetCecInfoEventHandle"},
|
||||||
|
{0x00100000, GetChangeStateEventHandle, "GetChangeStateEventHandle"},
|
||||||
{0x00120104, nullptr, "ReadSavedData"},
|
{0x00120104, nullptr, "ReadSavedData"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue