mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
ソース整理。
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@168 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
3cb4a6dae3
commit
a57a562903
@ -77,8 +77,8 @@ BOOL SYSM_IsCardPulledOut(void)
|
|||||||
case CARD_DETECTING:
|
case CARD_DETECTING:
|
||||||
if (SYSMi_IsCardDataReady()) {
|
if (SYSMi_IsCardDataReady()) {
|
||||||
u32 cardID = *(vu32 *)REG_CARD_DATA;
|
u32 cardID = *(vu32 *)REG_CARD_DATA;
|
||||||
if (cardID != GetSYSMWork()->nCardID
|
if ( ( cardID != GetSYSMWork()->nCardID ) &&
|
||||||
&& SYSM_IsNITROCard())
|
SYSM_IsExistCard() )
|
||||||
{
|
{
|
||||||
cpw.detectPullOut = TRUE;
|
cpw.detectPullOut = TRUE;
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ BOOL SYSM_IsDetectingCardPulledOut(void)
|
|||||||
|
|
||||||
BOOL SYSMi_IsDetectableCardPulledOut(void)
|
BOOL SYSMi_IsDetectableCardPulledOut(void)
|
||||||
{
|
{
|
||||||
return (SYSM_GetBootFlag() & BFLG_LOAD_CARD_COMPLETED ) ? TRUE : FALSE;
|
return SYSM_IsExistCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -662,6 +662,10 @@ static void SYSMi_CheckRTC( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL SYSM_IsExistCard( void )
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
//======================================================================
|
//======================================================================
|
||||||
// デバッグ
|
// デバッグ
|
||||||
|
|||||||
@ -130,22 +130,13 @@ u32 SYSM_GetDayNum( u32 year, u32 month )
|
|||||||
return dayNum;
|
return dayNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
u32 SYSM_GetDayNum( u32 year, u32 month )
|
|
||||||
{
|
|
||||||
u8 date_tbl[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
|
||||||
|
|
||||||
if( ( month == 2 ) && SYSM_IsLeapYear100( year ) ) {
|
|
||||||
return 29;
|
|
||||||
}
|
|
||||||
return date_tbl[ month - 1 ]; // 1月から12月だから1引く
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// 簡易うるう年の判定 (うるう年:1、通常の年:0)※RTCのとりうる範2000~2100年に限定する。
|
// 簡易うるう年の判定 (うるう年:1、通常の年:0)※RTCのとりうる範2000~2100年に限定する。
|
||||||
BOOL SYSM_IsLeapYear100( u32 year )
|
BOOL SYSM_IsLeapYear100( u32 year )
|
||||||
{
|
{
|
||||||
|
if( ( year < 2000 ) || ( year >= 2100 ) ) {
|
||||||
|
OS_Panic( "year = %d : need 2000 - 2099\n", year );
|
||||||
|
}
|
||||||
if( ( year & 0x03 ) || ( year == 100 ) ) { // うるう年は、「4で割り切れ かつ 100で割り切れない年」または「400で割り切れる年」
|
if( ( year & 0x03 ) || ( year == 100 ) ) { // うるう年は、「4で割り切れ かつ 100で割り切れない年」または「400で割り切れる年」
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user