sdmmc: implement BaseDeviceAccessor
This commit is contained in:
@@ -40,6 +40,25 @@ namespace ams::sdmmc {
|
||||
R_DEFINE_ERROR_RESULT(AutoCommandResponseTimeoutError, 44);
|
||||
R_DEFINE_ERROR_RESULT(CommandCompleteSoftwareTimeout, 45);
|
||||
R_DEFINE_ERROR_RESULT(TransferCompleteSoftwareTimeout, 46);
|
||||
R_DEFINE_ERROR_RANGE(DeviceStatusHasError, 48, 70);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusAddressOutOfRange, 49);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusAddressMisaligned, 50);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusBlockLenError, 51);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusEraseSeqError, 52);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusEraseParam, 53);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusWpViolation, 54);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusLockUnlockFailed, 55);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusComCrcError, 56);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusIllegalCommand, 57);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusDeviceEccFailed, 58);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusCcError, 59);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusError, 60);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusCidCsdOverwrite, 61);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusWpEraseSkip, 62);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusEraseReset, 63);
|
||||
R_DEFINE_ERROR_RESULT(DeviceStatusSwitchError, 64);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedDeviceState, 72);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedDeviceCsdValue, 73);
|
||||
R_DEFINE_ERROR_RESULT(AbortTransactionSoftwareTimeout, 74);
|
||||
R_DEFINE_ERROR_RESULT(CommandInhibitCmdSoftwareTimeout, 75);
|
||||
R_DEFINE_ERROR_RESULT(CommandInhibitDatSoftwareTimeout, 76);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
//#define AMS_SDMMC_USE_DEVICE_VIRTUAL_ADDRESS
|
||||
//#define AMS_SDMMC_USE_PCV_CLOCK_RESET_CONTROL
|
||||
//#define AMS_SDMMC_USE_DEVICE_DETECTOR
|
||||
//#define AMS_SDMMC_USE_LOGGER
|
||||
//#define AMS_SDMMC_USE_OS_EVENTS
|
||||
//#define AMS_SDMMC_USE_OS_TIMER
|
||||
#define AMS_SDMMC_USE_UTIL_TIMER
|
||||
@@ -38,6 +39,7 @@
|
||||
//#define AMS_SDMMC_USE_DEVICE_VIRTUAL_ADDRESS
|
||||
//#define AMS_SDMMC_USE_PCV_CLOCK_RESET_CONTROL
|
||||
//#define AMS_SDMMC_USE_DEVICE_DETECTOR
|
||||
//#define AMS_SDMMC_USE_LOGGER
|
||||
//#define AMS_SDMMC_USE_OS_EVENTS
|
||||
//#define AMS_SDMMC_USE_OS_TIMER
|
||||
#define AMS_SDMMC_USE_UTIL_TIMER
|
||||
@@ -48,6 +50,7 @@
|
||||
#define AMS_SDMMC_USE_DEVICE_VIRTUAL_ADDRESS
|
||||
#define AMS_SDMMC_USE_PCV_CLOCK_RESET_CONTROL
|
||||
#define AMS_SDMMC_USE_DEVICE_DETECTOR
|
||||
#define AMS_SDMMC_USE_LOGGER
|
||||
#define AMS_SDMMC_USE_OS_EVENTS
|
||||
#define AMS_SDMMC_USE_OS_TIMER
|
||||
//#define AMS_SDMMC_USE_UTIL_TIMER
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace ams::sdmmc {
|
||||
|
||||
using DeviceDetectionEventCallback = void (*)(void *);
|
||||
|
||||
constexpr inline size_t SectorSize = 0x200;
|
||||
|
||||
constexpr inline size_t DeviceCidSize = 0x10;
|
||||
constexpr inline size_t DeviceCsdSize = 0x10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user