From 4739096ed9154727804716baabd3f45eab5e9909 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b871894f-2f95-9b40-918c-086798483c85> Date: Fri, 6 Feb 2009 08:09:34 +0000 Subject: [PATCH] =?UTF-8?q?(shirait)=20=E3=82=82=E3=81=86=E4=B8=80?= =?UTF-8?q?=E3=81=A4=E5=BF=98=E3=82=8C=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@259 b871894f-2f95-9b40-918c-086798483c85 --- .../libraries/fatfs/common/include/sdmc.h | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 trunk/firmware/build/libraries/fatfs/common/include/sdmc.h diff --git a/trunk/firmware/build/libraries/fatfs/common/include/sdmc.h b/trunk/firmware/build/libraries/fatfs/common/include/sdmc.h new file mode 100644 index 0000000..42614a7 --- /dev/null +++ b/trunk/firmware/build/libraries/fatfs/common/include/sdmc.h @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------* + Project: TWL - SD driver + File: sdmc.h + + Copyright 2006-2008 Nintendo. All rights reserved. + + These coded instructions, statements, and computer programs contain + proprietary information of Nintendo of America Inc. and/or Nintendo + Company Ltd., and are protected by Federal copyright law. They may + not be disclosed to third parties or copied or duplicated in any form, + in whole or in part, without the prior written consent of Nintendo. + + $Date:: #$ + $Rev$ + $Author$ + *---------------------------------------------------------------------------*/ + +#ifndef __SDMC_H__ +#define __SDMC_H__ + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/********************************************* + SDスペック構造体 +*********************************************/ +typedef struct { + u32 csd_ver2_flag; //CSDフォーマットバージョン(SDHCのときは1) + u32 memory_capacity; //data areaのサイズ(512Byte単位) + u32 protected_capacity; //protected areaのサイズ(512Byte単位) + u32 card_capacity; //カード全体のサイズ(512Byte単位) + + u32 adjusted_memory_capacity; //memory_capacityをシリンダ(heads*secptrack)の倍数に調整したサイズ(cylinders*heads*secptrackになる) + + u16 heads; + u16 secptrack; + u16 cylinders; + u16 SC; //sectors per cluster + u16 BU; + u16 RDE; //number of root dir entries(512 fix) + u32 SS; //sector size(512 fix) + u32 RSC; //reserved sector count(1 fix) +// u32 TS; //total sectors + u16 FATBITS; //16 or 32 + u16 SF; //sectors per FAT + u32 SSA; //sectors in system area + u32 NOM; //sectors in master boot record +} SdmcSpec; + + +/*FATパラメータ TODO:SdmcSpecを統合すること*/ +typedef struct { + u32 device_capacity; //デバイス全体のサイズ(512Byte単位) + u32 adjusted_device_capacity; + + u32 memory_capacity; //data areaのサイズ(512Byte単位) + u32 adjusted_memory_capacity; //memory_capacityをシリンダ(heads*secptrack)の倍数に調整したサイズ(cylinders*heads*secptrackになる) + + u16 volume_cylinders; + + u16 heads; + u16 secptrack; + u16 cylinders; + u16 SC; //sectors per cluster + u16 BU; + u16 RDE; //number of root dir entries(512 fix) + u16 padding; + u32 SS; //sector size(512 fix) + u32 RSC; //reserved sector count(1 fix) + u16 FATBITS; //16 or 32 + u16 SF; //sectors per FAT + u32 SSA; //sectors in system area + u32 NOM; //sectors in master boot record + + u32 begin_sect; +} FATSpec; + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /*__SDMC_H__*/