erpt: begin SubmitFsinfo (SubmitMmcDetailInfo)
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include <stratosphere/fs/fs_game_card.hpp>
|
||||
#include <stratosphere/fs/fs_host.hpp>
|
||||
#include <stratosphere/fs/fs_image_directory.hpp>
|
||||
#include <stratosphere/fs/fs_mmc.hpp>
|
||||
#include <stratosphere/fs/fs_save_data_types.hpp>
|
||||
#include <stratosphere/fs/fs_save_data_management.hpp>
|
||||
#include <stratosphere/fs/fs_save_data_transaction.hpp>
|
||||
|
||||
57
libraries/libstratosphere/include/stratosphere/fs/fs_mmc.hpp
Normal file
57
libraries/libstratosphere/include/stratosphere/fs/fs_mmc.hpp
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <stratosphere/fs/fs_common.hpp>
|
||||
|
||||
namespace ams::fs {
|
||||
|
||||
constexpr inline size_t MmcCidSize = 0x10;
|
||||
|
||||
constexpr inline size_t MmcExtendedCsdSize = 0x200;
|
||||
|
||||
constexpr inline int MmcExtendedCsdOffsetReEolInfo = 267;
|
||||
constexpr inline int MmcExtendedCsdOffsetDeviceLifeTimeEstTypA = 268;
|
||||
constexpr inline int MmcExtendedCsdOffsetDeviceLifeTimeEstTypB = 269;
|
||||
|
||||
enum MmcSpeedMode {
|
||||
MmcSpeedMode_Identification = 0,
|
||||
MmcSpeedMode_LegacySpeed = 1,
|
||||
MmcSpeedMode_HighSpeed = 2,
|
||||
MmcSpeedMode_Hs200 = 3,
|
||||
MmcSpeedMode_Hs400 = 4,
|
||||
MmcSpeedMode_Unknown = 5,
|
||||
};
|
||||
|
||||
enum class MmcPartition {
|
||||
UserData = 0,
|
||||
BootPartition1 = 1,
|
||||
BootPartition2 = 2,
|
||||
};
|
||||
|
||||
Result GetMmcCid(void *dst, size_t size);
|
||||
|
||||
inline void ClearMmcCidSerialNumber(u8 *cid) {
|
||||
/* Clear the serial number from the cid. */
|
||||
std::memset(cid + 1, 0, 4);
|
||||
}
|
||||
|
||||
Result GetMmcSpeedMode(MmcSpeedMode *out);
|
||||
|
||||
Result GetMmcPatrolCount(u32 *out);
|
||||
|
||||
Result GetMmcExtendedCsd(void *dst, size_t size);
|
||||
|
||||
}
|
||||
@@ -20,8 +20,12 @@
|
||||
/* TODO */
|
||||
/* ACCURATE_TO_VERSION: 13.4.0.0 */
|
||||
#define AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, IsSdCardInserted, (ams::sf::Out<bool> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 200, Result, IsGameCardInserted, (ams::sf::Out<bool> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 202, Result, GetGameCardHandle, (ams::sf::Out<u32> out), (out))
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, IsSdCardInserted, (ams::sf::Out<bool> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 100, Result, GetMmcCid, (ams::sf::OutBuffer out, s64 size), (out, size)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 101, Result, GetMmcSpeedMode, (ams::sf::Out<s64> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 112, Result, GetMmcPatrolCount, (ams::sf::Out<u32> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 114, Result, GetMmcExtendedCsd, (ams::sf::OutBuffer out, s64 size), (out, size)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 200, Result, IsGameCardInserted, (ams::sf::Out<bool> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 202, Result, GetGameCardHandle, (ams::sf::Out<u32> out), (out))
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(ams::fssrv::sf, IDeviceOperator, AMS_FSSRV_I_DEVICE_OPERATOR_INTERFACE_INFO, 0x1484E21C)
|
||||
|
||||
Reference in New Issue
Block a user