TwlIPL/build/libraries_sysmenu/sysmenu/ARM9/include/fs_wram.h
yoshida_teruhisa 8b5f5ecd76 WRAM経由ファイル操作関数の組み込み(ハッシュ計算およびAES領域復号のCallbackは未実装)
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1158 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-04-16 06:45:32 +00:00

79 lines
2.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*---------------------------------------------------------------------------*
Project: TwlSDK - include - fs
File: fs_wram.h
Copyright 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 TWL_FS_WRAM_H_
#define TWL_FS_WRAM_H_
#ifdef SDK_TWL
#include <twl.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
FSWramCallback
Read/Write中のWRAMにデータがある状態で呼び出されるAPI
改ざんした場合は、改ざん後のデータが有効となることに注意
addr データがあるアドレス
len 有効なデータサイズ
arg APIに渡した引数
*/
typedef void (*FSWramCallback)(const void* addr, u32 len, void* arg);
/*
FS_InitWramTransfer
一度だけ呼び出しておく必要がある
priority 立ち上げるスレッドの優先順位
*/
BOOL FS_InitWramTransfer( u32 priority );
/*
FS_ReadFileViaWram
FS/FATFSに対して同期Readを行う
完了するまで返ってこない点に注意
p_file FSでオープンしたファイル (シーク済み)
dst 読み出し先
len 読み出しサイズ
wram 供出するWRAM (B or C)
slot 供出する先頭スロット (だれも確保していないARM7/ARM9両方で確保可能であること)
size 供出するサイズ
callback Read中にWRAMにデータがある段階で随時呼び出されるコールバック
arg コールバックに渡される引数
*/
BOOL FS_ReadFileViaWram( FSFile *p_file, void *dst, s32 len, MIWramPos wram, s32 slot, MIWramSize size, FSWramCallback callback, void* arg );
/*
FS_WriteFileViaWram
FS/FATFSに対して同期Writeを行う
完了するまで返ってこない点に注意
p_file FSでオープンしたファイル (シーク済み)
src 書き込み元
len 書き込みサイズ
wram 供出するWRAM (B or C)
slot 供出する先頭スロット (だれも確保していないARM7/ARM9両方で確保可能であること)
size 供出するサイズ
callback Write中にWRAMにデータがある段階で随時呼び出されるコールバック
arg コールバックに渡される引数
*/
BOOL FS_WriteFileViaWram( FSFile *p_file, const void *src, s32 len, MIWramPos wram, s32 slot, MIWramSize size, FSWramCallback callback, void* arg );
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* TWL_FS_WRAM_H_ */