From 1761c262d0ea579530c15db80ece7309dda2107b Mon Sep 17 00:00:00 2001 From: shirait Date: Tue, 22 Jan 2008 10:36:48 +0000 Subject: [PATCH] =?UTF-8?q?FATFS=5FInit=E3=81=A7=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=83=89=E3=83=AD=E3=83=83=E3=82=AF=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@498 b08762b0-b915-fc4b-9d8c-17b2551a87ff --- build/components/hyena.TWL/src/main.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/components/hyena.TWL/src/main.c b/build/components/hyena.TWL/src/main.c index 06d8a5aa..a7c7e3c9 100644 --- a/build/components/hyena.TWL/src/main.c +++ b/build/components/hyena.TWL/src/main.c @@ -284,13 +284,22 @@ PrintDebugInfo(void) #include /*---------------------------------------------------------------------------* Name: InitializeFatfs - Description: FATFSライブラリを初期化する。 + Description: FATFSライブラリを初期化する。FATFS初期化関数内でスレッド休止 + する為、休止中動作するダミーのスレッドを立てる。 Arguments: None. Returns: None. *---------------------------------------------------------------------------*/ static void InitializeFatfs(void) { + OSThread thread; + u32 stack[18]; + + // ダミースレッド作成 + OS_CreateThread(&thread, DummyThread, NULL, + (void*)((u32)stack + (sizeof(u32) * 18)), sizeof(u32) * 18, OS_THREAD_PRIORITY_MAX); + OS_WakeupThreadDirect(&thread); + // FATFSライブラリの初期化 #ifndef SDK_NOCRYPTO #ifdef FATFS_AES_MOUNT_FOR_NAND @@ -304,6 +313,9 @@ InitializeFatfs(void) { // do nothing } + + // ダミースレッド破棄 + OS_KillThread(&thread, NULL); } #include @@ -380,7 +392,8 @@ InitializeCdc(void) /*---------------------------------------------------------------------------* Name: DummyThread - Description: CDCライブラリを初期化する際に立てるダミーのスレッド。 + Description: FATFSライブラリ、CDCライブラリを初期化する際に立てるダミーの + スレッド。 Arguments: arg - 使用しない。 Returns: None. *---------------------------------------------------------------------------*/