/*---------------------------------------------------------------------------* Project: CtrBrom - OS - include File: interrupt.h Copyright 2008 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. $Date:: $ $Rev$ $Author$ *---------------------------------------------------------------------------*/ #ifndef BROM_OS_INTERRUPT_H_ #define BROM_OS_INTERRUPT_H_ #include #ifdef __cplusplus extern "C" { #endif #define OS_IDR_CPU0_TARGET_ENABLE HW_IDR_CPU0_TARGET_ENABLE #define OS_IDR_INTR_PRIO_DEFAULT 8 // Interrupt priority default (0-15) OSIntrID i_osReadHighestPendingInterruptRegister( void ); OSIntrID i_osReadInterruptAcknowledgeRegister( void ); /*---------------------------------------------------------------------------* Name: osInitInterrupts Description: Initialize Interrupts Arguments: None Returns: None *---------------------------------------------------------------------------*/ void osInitInterrupt( void ); /*---------------------------------------------------------------------------* Name: osEnableInterruptID Description: set Interrupt Set Enable Register Arguments: Interrupt Distributor ID Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ BOOL osEnableInterruptID( OSIntrID id ); /*---------------------------------------------------------------------------* Name: osDisableInterruptID Description: set Interrupt Clear Enable Register Arguments: Interrupt Distributor ID Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ BOOL osDisableInterruptID( OSIntrID id ); /*---------------------------------------------------------------------------* Name: osRestoreInterruptID Description: set Interrupt Clear Enable Register Arguments: id : Interrupt Distributor ID state : state whether interrupt is enabled Returns: TRUE if last state is enabled *---------------------------------------------------------------------------*/ BOOL osRestoreInterruptID( OSIntrID id, BOOL state ); /*---------------------------------------------------------------------------* Name: osSetInterruptPendingID Description: set Interrupt Set Pending Register Arguments: Interrupt Distributor ID Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ BOOL osSetInterruptPendingID( OSIntrID id ); /*---------------------------------------------------------------------------* Name: osClearInterruptPendingID Description: set Interrupt Clear Pending Register Arguments: Interrupt Distributor ID Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ BOOL osClearInterruptPendingID( OSIntrID id ); /*---------------------------------------------------------------------------* Name: osRestoreInterruptPendingID Description: restore Interrupt Pending Arguments: id : Interrupt Distributor ID state : state whether interrupt is enabled Returns: TRUE if last state is pending *---------------------------------------------------------------------------*/ BOOL osRestoreInterruptPendingID( OSIntrID id, BOOL state ); /*---------------------------------------------------------------------------* Name: osSetEndOfInterruptRegister Description: set ID to End of Interrupt Register change state to Inactive. Arguments: Interrupt Distributor ID Returns: None *---------------------------------------------------------------------------*/ void osSetEndOfInterruptRegister( OSIntrID id ); #ifdef __cplusplus } // extern "C" #endif #endif // BROM_OS_INTERRUPT_H_