mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
(shirait)
もう一つ忘れ物 git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@259 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
parent
f0406ca817
commit
4739096ed9
91
trunk/firmware/build/libraries/fatfs/common/include/sdmc.h
Normal file
91
trunk/firmware/build/libraries/fatfs/common/include/sdmc.h
Normal file
@ -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 <rtfs.h>
|
||||
|
||||
|
||||
#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__*/
|
||||
Loading…
Reference in New Issue
Block a user