osEepromProbe.c (605B)
1 #include "macros.h" 2 #include "libultra_internal.h" 3 4 extern u32 __osBbEepromSize; 5 6 s32 __osEepStatus(OSMesgQueue *, OSContStatus *); 7 s32 osEepromProbe(UNUSED OSMesgQueue *mq) { 8 s32 ret = 0; 9 #ifndef VERSION_CN 10 OSContStatus status; 11 #endif 12 13 __osSiGetAccess(); 14 #ifdef VERSION_CN 15 if (__osBbEepromSize == 0x200) { 16 ret = EEPROM_TYPE_4K; 17 } else if (__osBbEepromSize == 0x800) { 18 ret = EEPROM_TYPE_16K; 19 } 20 #else 21 ret = __osEepStatus(mq, &status); 22 ret = (ret == 0 && (status.type & CONT_EEPROM) != 0) ? EEPROM_TYPE_4K : 0; 23 #endif 24 __osSiRelAccess(); 25 return ret; 26 }