mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 21:24:11 -04:00
fatal: restructure, skeleton disp
This commit is contained in:
parent
b96b162b0b
commit
a843cc0ee7
4 changed files with 89 additions and 20 deletions
|
@ -15,11 +15,26 @@
|
|||
*/
|
||||
#include <exosphere.hpp>
|
||||
#include "fatal_save_context.hpp"
|
||||
#include "fatal_sdmmc.hpp"
|
||||
#include "fs/fatal_fs_api.hpp"
|
||||
|
||||
namespace ams::secmon::fatal {
|
||||
|
||||
Result SaveFatalErrorContext(const ams::impl::FatalErrorContext *ctx) {
|
||||
/* Initialize the sdmmc driver. */
|
||||
R_TRY(InitializeSdCard());
|
||||
|
||||
/* Get the connection status. */
|
||||
#if defined(AMS_BUILD_FOR_DEBUGGING) || defined(AMS_BUILD_FOR_AUDITING)
|
||||
{
|
||||
sdmmc::SpeedMode speed_mode;
|
||||
sdmmc::BusWidth bus_width;
|
||||
R_TRY(CheckSdCardConnection(std::addressof(speed_mode), std::addressof(bus_width)));
|
||||
AMS_SECMON_LOG(" Speed Mode: %u\n", static_cast<u32>(speed_mode));
|
||||
AMS_SECMON_LOG(" Bus Width: %u\n", static_cast<u32>(bus_width));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Mount the SD card. */
|
||||
R_UNLESS(fs::MountSdCard(), fs::ResultPartitionNotFound());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue