/*---------------------------------------------------------------------------* Project: MPDS library File: mpdsprivate.h Copyright 2007 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. $Log: mpdsprivate.h,v $ Revision 1.3 2007/10/22 09:41:25 seiki_masashi Moved the MPDSStatus enumerated type. Revision 1.2 2007/10/17 12:48:16 seiki_masashi Changed constants for debug output. Revision 1.1 2007/10/10 08:37:07 seiki_masashi Added the MPDS library. $NoKeywords: $ *---------------------------------------------------------------------------*/ #ifndef LIBRARIES_MPDS_MPPRIVATE_H__ #define LIBRARIES_MPDS_MPPRIVATE_H__ #ifdef __cplusplus extern "C" { #endif /*===========================================================================*/ #include ////////////////////////////////////////////////////////////////////////////// #ifndef NDEBUG #endif ////////////////////////////////////////////////////////////////////////////// // Data Sharing's internal state typedef enum MPDSState { MPDS_STATE_READY = 0, // Before MPDSSetupPortConfig MPDS_STATE_START, // After MPDSStep MPDS_STATE_PAUSING, // While transitioning to the pause state MPDS_STATE_PAUSED, // Immediately after MPDSSetupPortConfig or during pause MPDS_STATE_RETRY_SEND, // Resend required because of SEND_QUEUE_FULL MPDS_STATE_ERROR // Error generated } MPDSState; ////////////////////////////////////////////////////////////////////////////// extern u32 MPDSi_debugLevel; #define MPDSi_IS_DEBUG_LEVEL( level ) ((MPDSi_debugLevel & level) != 0) #define MPDSi_DEBUG_LEVEL_IMPORTANTS (MPDS_DEBUG_LEVEL_WARNING|MPDS_DEBUG_LEVEL_ERROR) ////////////////////////////////////////////////////////////////////////////// #ifdef NDEBUG #define MPDSiLog( level, ... ) ( (void)0 ) #define MPDSiError( ... ) ( (void)0 ) #define MPDSiWarning( ... ) ( (void)0 ) #define MPDSiReport( ... ) ( (void)0 ) #define MPDSiTrace( ... ) ( (void)0 ) #else // NDEBUG void MPDSiLogCore( u32 level, const char* levelString, const char* file, const char* func, int line, const char* fmt, ... ); void MPDSiVLogCore( u32 level, const char* levelString, const char* file, const char* func, int line, const char* fmt, va_list vlist ); #define MPDSiLog( level, ... ) MPDSiLogCore( MPDS_DEBUG_LEVEL_##level, #level, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__ ) #define MPDSiError( ... ) MPDSiLogCore( MPDS_DEBUG_LEVEL_ERROR, "Error", __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__ ) #define MPDSiWarning( ... ) MPDSiLogCore( MPDS_DEBUG_LEVEL_WARNING, "Warning", __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__ ) #define MPDSiReport( ... ) MPDSiLogCore( MPDS_DEBUG_LEVEL_REPORT, "Report", __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__ ) #define MPDSiTrace( ... ) MPDSiLogCore( MPDS_DEBUG_LEVEL_TRACE, "Trace", __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__ ) #endif // NDEBUG ////////////////////////////////////////////////////////////////////////////// /*===========================================================================*/ #ifdef __cplusplus } #endif #endif /* REVOLUTION_MPDS_MPPRIVATE_H__ */ /*---------------------------------------------------------------------------* End of file *---------------------------------------------------------------------------*/