////////////////////////////////////////////////////////////////////////////// // Project: PPC shim for Input Manager RM // File: im_shim.c // Description: IM thread and RM interface // // Copyright (C) 2012 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. ////////////////////////////////////////////////////////////////////////////// #ifndef __IM_H__ #define __IM_H__ #ifdef __cplusplus extern "C" { #endif ////////////////////////////////////////////////////////////////////////////// #define IM_DISABLE 0 #define IM_ENABLE 1 ////////////////////////////////////////////////////////////////////////////// // IM error codes ////////////////////////////////////////////////////////////////////////////// #define IM_ERROR_CODE int #define IM_ERROR_NONE 0 ////////////////////////////////////////////////////////////////////////////// // function prototypes // // WARNING: the im only carries one transaction buffer for public APIs, these // blocking functions should be called from same thread ////////////////////////////////////////////////////////////////////////////// typedef struct { u32 inactive_seconds; u32 dim_enable; u32 dim_seconds; u32 apd_enable; u32 apd_seconds; } IMParameters; IM_ERROR_CODE IM_GetParameters (IMParameters *p_params); // For Dimming IM_ERROR_CODE IMDisableDim (void); IM_ERROR_CODE IMEnableDim (void); IM_ERROR_CODE IMGetDimPeriod (u32 *second); IM_ERROR_CODE IMIsDimEnabled (u32 *enabled); IM_ERROR_CODE IMGetTimeBeforeDimming(u32 *second); IM_ERROR_CODE IMGetTimeBeforeAPD (u32 *second); IM_ERROR_CODE IMGetAPDPeriod (u32 *second); IM_ERROR_CODE IMIsAPDEnabledBySysSettings (u32 *enabled); IM_ERROR_CODE IMSetDimEnableTV (u32 enable); IM_ERROR_CODE IMSetDimEnableDRC (u32 enable); IM_ERROR_CODE IMGetDimEnableTV (u32 *enabled); IM_ERROR_CODE IMGetDimEnableDRC (u32 *enabled); ////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus } #endif #endif//__IM_H__