mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-08-14 21:42:06 -07:00
PTM: Changed the way the ptm services are handled to be like the
IR, HID, and APT services.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/result.h"
|
||||
|
||||
namespace Service {
|
||||
@@ -35,25 +36,48 @@ struct GameCoin {
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns whether the battery is charging or not.
|
||||
* It is unknown if GetAdapterState is the same as GetBatteryChargeState,
|
||||
* it is likely to just be a duplicate function of GetBatteryChargeState
|
||||
* that controls another part of the HW.
|
||||
* @returns 1 if the battery is charging, and 0 otherwise.
|
||||
* PTM::GetAdapterState service function
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Output of function, 0 = not charging, 1 = charging.
|
||||
*/
|
||||
u32 GetAdapterState();
|
||||
void GetAdapterState(Interface* self);
|
||||
|
||||
/**
|
||||
* Returns whether the 3DS's physical shell casing is open or closed
|
||||
* @returns 1 if the shell is open, and 0 if otherwise
|
||||
* PTM::GetShellState service function.
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Whether the 3DS's physical shell casing is open (1) or closed (0)
|
||||
*/
|
||||
u32 GetShellState();
|
||||
void GetShellState(Interface* self);
|
||||
|
||||
/**
|
||||
* Get the current battery's charge level.
|
||||
* @returns The battery's charge level.
|
||||
* PTM::GetBatteryLevel service function
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Battery level, 5 = completely full battery, 4 = mostly full battery,
|
||||
* 3 = half full battery, 2 = low battery, 1 = critical battery.
|
||||
*/
|
||||
ChargeLevels GetBatteryLevel();
|
||||
void GetBatteryLevel(Interface* self);
|
||||
|
||||
/**
|
||||
* PTM::GetBatteryChargeState service function
|
||||
* Outputs:
|
||||
* 1 : Result of function, 0 on success, otherwise error code
|
||||
* 2 : Output of function, 0 = not charging, 1 = charging.
|
||||
*/
|
||||
void GetBatteryChargeState(Interface* self);
|
||||
|
||||
/**
|
||||
* PTM::IsLegacyPowerOff service function
|
||||
* Outputs:
|
||||
* 1: Result code, 0 on success, otherwise error code
|
||||
* 2: Whether the system is going through a power off
|
||||
*/
|
||||
void IsLegacyPowerOff(Interface* self);
|
||||
|
||||
/// Initialize the PTM service
|
||||
void Init();
|
||||
|
Reference in New Issue
Block a user