1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: fs_Types.h 4 5 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 26126 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_FS_CTR_FS_TYPES_H_ 17 #define NN_FS_CTR_FS_TYPES_H_ 18 19 #include <nn/types.h> 20 #include <nn/config.h> 21 22 namespace nn { 23 namespace fs { 24 25 typedef enum CardType 26 { 27 CARD_TYPE_CTR, // CTR カード 28 CARD_TYPE_DS_TWL, // DS/TWL カード 29 CARD_TYPE_UNKNOWN // 上記のいずれでもない 30 } CardType; 31 32 typedef struct ArchiveResource 33 { 34 u32 sectorSize; 35 u32 clusterSize; 36 u32 totalClusters; 37 u32 freeClusters; 38 } 39 ArchiveResource; 40 41 #define CID_SIZE (16) 42 43 typedef struct 44 { 45 bool bCardHighSpeed; 46 bool bSdifMaxSpeed; 47 u16 SdifClkCtrlValue; 48 } 49 SdmcSpeedInfo; 50 51 typedef SdmcSpeedInfo NandSpeedInfo; 52 53 typedef struct SdmcLog 54 { 55 u32 initErrorCount; 56 u32 initErrorCode; 57 u32 accessErrorCount; 58 u32 accessErrorCode; 59 u32 checkErrorCount; 60 u32 checkErrorCode; 61 u32 ErrCardStatus; 62 u16 ErrCmdPattern; 63 u16 ErrSts1; 64 u16 ErrSts2; 65 NN_PADDING2; 66 } 67 SdmcLog; 68 69 typedef SdmcLog NandLog; 70 71 enum CardSpiBaudRate { 72 CARDSPI_BAUDRATE_512KHZ = 0, 73 CARDSPI_BAUDRATE_1MHZ = 1, 74 CARDSPI_BAUDRATE_2MHZ = 2, 75 CARDSPI_BAUDRATE_4MHZ = 3, 76 CARDSPI_BAUDRATE_8MHZ = 4, 77 CARDSPI_BAUDRATE_16MHZ = 5 78 }; 79 80 enum CardSpiBusMode { 81 CARDSPI_BUSMODE_1BIT = 0, 82 CARDSPI_BUSMODE_4BIT = 1 83 }; 84 85 } 86 } 87 88 #endif /* NN_FS_CTR_FS_TYPES_H_ */ 89