From 7fa62a437371b19f0fd89e277e75fa1ad28abe9a Mon Sep 17 00:00:00 2001 From: nakasima Date: Thu, 1 Nov 2007 10:48:45 +0000 Subject: [PATCH] add OS_IsARM9x2, OS_IsDSPOn and OS_IsDSPReset. git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/twl_wrapsdk/trunk@312 4ee2a332-4b2b-5046-8439-1ba90f034370 --- include/twl/os/common/system.h | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/include/twl/os/common/system.h b/include/twl/os/common/system.h index 494d7d9..5ec0aff 100644 --- a/include/twl/os/common/system.h +++ b/include/twl/os/common/system.h @@ -78,6 +78,48 @@ OSSpeedOfARM9; *---------------------------------------------------------------------------*/ void OS_ChangeSpeedOfARM9( OSSpeedOfARM9 clock, void* itcm ); +/*---------------------------------------------------------------------------* + Name: OS_IsARM9x2 + + Description: speed of arm9 + + Arguments: None + + Returns: None + *---------------------------------------------------------------------------*/ +inline BOOL OS_IsARM9x2( void ) +{ + return (reg_CFG_CLK & REG_CFG_CLK_ARM2X_MASK) >> REG_CFG_CLK_ARM2X_SHIFT; +} + +/*---------------------------------------------------------------------------* + Name: OS_IsDSPOn + + Description: + + Arguments: None + + Returns: None + *---------------------------------------------------------------------------*/ +inline BOOL OS_IsDSPOn( void ) +{ + return (reg_CFG_CLK & REG_CFG_CLK_DSP_MASK) >> REG_CFG_CLK_DSP_SHIFT; +} + +/*---------------------------------------------------------------------------* + Name: OS_IsDSPReset + + Description: + + Arguments: None + + Returns: None + *---------------------------------------------------------------------------*/ +inline BOOL OS_IsDSPReset( void ) +{ + return TRUE ^ ((reg_CFG_DSP_RST & REG_CFG_DSP_RST_OFF_MASK) >> REG_CFG_DSP_RST_OFF_SHIFT); +} + #else // SDK_ARM7 /*---------------------------------------------------------------------------*