TwlIPL/include/sysmenu/hotsw/common/hotsw.h
nakasima 85e08a7801 ROMエミュレーション情報がARM9へ反映されるように修正。
HOTSW_GetRomEmulationBuffer()をARM9とARM7で共通のコードに。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@1098 b08762b0-b915-fc4b-9d8c-17b2551a87ff
2008-04-10 07:40:51 +00:00

97 lines
2.5 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: TwlIPL
File: hotsw.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 __SYSMENU_HOTSW_COMMON_HOTSW_H__
#define __SYSMENU_HOTSW_COMMON_HOTSW_H__
#include <twl.h>
#ifdef __cplusplus
extern "C" {
#endif
#define SYSM_HOTSW_ENABLE_ROMEMU
// enum -------------------------------------------------------------------
// スレッドに送るメッセージのステート
typedef enum HotSwMessageType{
HOTSW_INSERT = 0,
HOTSW_PULLOUT,
HOTSW_CONTROL
} HotSwMessageType;
typedef enum ModeType{
HOTSW_MODE1,
HOTSW_MODE2
} ModeType;
// union -------------------------------------------------------------------
// PXI用メッセージ
typedef union HotSwPxiMessage{
struct {
u32 value :1;
u32 ctrl :1;
u32 :30;
} msg;
u32 data;
} HotSwPxiMessage;
// struct -------------------------------------------------------------------
// スレッド用メッセージ
typedef struct HotSwMessage{
u32 value;
BOOL ctrl;
HotSwMessageType type;
} HotSwMessage;
// Function prototype -------------------------------------------------------
// 活栓挿抜処理の初期化
void HOTSW_Init(u32 threadPrio);
// カードの存在判定
BOOL HOTSW_IsCardExist(void);
// カードにアクセスできる状態か判定
BOOL HOTSW_IsCardAccessible(void);
// Boot Segment バッファの指定
void HOTSW_SetBootSegmentBuffer(void* buf, u32 size);
// Secure Segment バッファの指定
void HOTSW_SetSecureSegmentBuffer(ModeType type ,void* buf, u32 size);
// Romエミュレーション情報を格納しているバッファのポインタを返す
SDK_INLINE void* HOTSW_GetRomEmulationBuffer(void)
{
return (void*)&SYSMi_GetWork()->romEmuInfo;
}
// ISデバッガ上で動作しているか
BOOL HOTSWi_IsRunOnDebugger(void);
// ROMをエミュレーションしているか
BOOL HOTSWi_IsRomEmulation(void);
// デバッガ通信用にカードスロットの電源をONにする。
void HOTSWi_TurnCardPowerOn(u32 slot);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // __SYSMENU_HOTSW_COMMON_HOTSW_H__