ctr_firmware/trunk/bootrom/include/brom/os/ARM11/interrupt.h
nakasima 83a1b88e57 osSetTick修正かつ非公開化。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@116 b871894f-2f95-9b40-918c-086798483c85
2008-12-17 10:33:52 +00:00

132 lines
4.4 KiB
C

/*---------------------------------------------------------------------------*
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 <brom/os/common/interrupt_common.h>
#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_