pspmscm.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspmscm.h - Memory stick utility functions
00007  *
00008  * Copyright (c) 2006 Adrahil
00009  *
00010  * $Id: pspmscm.h 2005 2006-09-17 21:36:52Z tyranid $
00011  */
00012 #ifndef PSPMSCM_H
00013 #define PSPMSCM_H
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00024 static __inline__ int MScmIsMediumInserted(void)
00025 {
00026         int status, ret;
00027 
00028         ret = sceIoDevctl("mscmhc0:", 0x02025806, 0, 0, &status, sizeof(status));
00029         if(ret < 0) return ret;
00030         if(status != 1) return 0;
00031 
00032         return 1;
00033 }
00034 
00035 /* Event which has occurred in the memory stick ejection callback, passed in arg2 */
00036 #define MS_CB_EVENT_INSERTED 1
00037 #define MS_CB_EVENT_EJECTED  2
00038 
00046 static __inline__ int MScmRegisterMSInsertEjectCallback(SceUID cbid)
00047 {
00048         return sceIoDevctl("fatms0:", 0x02415821, &cbid, sizeof(cbid), 0, 0);
00049 }
00050 
00058 static __inline__ int MScmUnregisterMSInsertEjectCallback(SceUID cbid)
00059 {
00060         return sceIoDevctl("fatms0:", 0x02415822, &cbid, sizeof(cbid), 0, 0);
00061 }
00062 
00063 #ifdef __cplusplus
00064 }
00065 #endif
00066 
00067 #endif /* PSPMSCM_H */

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2