mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
interrupt_common.h削除。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@131 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
parent
310209847d
commit
85dd27858e
@ -17,7 +17,6 @@
|
|||||||
#ifndef BROM_OS_INTERRUPT_TYPES_H_
|
#ifndef BROM_OS_INTERRUPT_TYPES_H_
|
||||||
#define BROM_OS_INTERRUPT_TYPES_H_
|
#define BROM_OS_INTERRUPT_TYPES_H_
|
||||||
|
|
||||||
#include <brom/os/common/interrupt_common.h>
|
|
||||||
#include <ctr/arm_reg.h>
|
#include <ctr/arm_reg.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
#ifndef BROM_OS_INTERRUPT_TYPES_H_
|
#ifndef BROM_OS_INTERRUPT_TYPES_H_
|
||||||
#define BROM_OS_INTERRUPT_TYPES_H_
|
#define BROM_OS_INTERRUPT_TYPES_H_
|
||||||
|
|
||||||
#include <brom/os/common/interrupt_common.h>
|
|
||||||
#include <ctr/arm_reg.h>
|
#include <ctr/arm_reg.h>
|
||||||
#include <ctr/ioreg.h>
|
#include <ctr/ioreg.h>
|
||||||
|
|
||||||
|
|||||||
@ -17,22 +17,61 @@
|
|||||||
#ifndef BROM_OS_INTERRUPT_H_
|
#ifndef BROM_OS_INTERRUPT_H_
|
||||||
#define BROM_OS_INTERRUPT_H_
|
#define BROM_OS_INTERRUPT_H_
|
||||||
|
|
||||||
#include <brom/os/common/interrupt_common.h>
|
#include <brom/types.h>
|
||||||
|
#include <brom/memorymap.h>
|
||||||
|
#include <ctr/ioreg.h>
|
||||||
|
#ifdef SDK_ARM11
|
||||||
|
#include <brom/os/ARM11/interrupt_types.h>
|
||||||
|
#else // SDK_ARM9
|
||||||
|
#include <brom/os/ARM9/interrupt_types.h>
|
||||||
|
#endif // SDK_ARM9
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDK_ARM11
|
#ifdef SDK_ARM11
|
||||||
|
|
||||||
#define OS_IDR_CPU0_TARGET_ENABLE HW_IDR_CPU0_TARGET_ENABLE
|
|
||||||
#define OS_IDR_INTR_PRIO_DEFAULT 8 // Interrupt priority default (0-15)
|
#define OS_IDR_INTR_PRIO_DEFAULT 8 // Interrupt priority default (0-15)
|
||||||
|
|
||||||
OSIntrID i_osReadHighestPendingInterruptRegister( void );
|
|
||||||
OSIntrID i_osReadInterruptAcknowledgeRegister( void );
|
|
||||||
|
|
||||||
#endif // SDK_ARM11
|
#endif // SDK_ARM11
|
||||||
|
|
||||||
|
typedef u32 OSIntrMode;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
OS_IRQ_DISABLE = HW_PSR_IRQ_DISABLE,
|
||||||
|
OS_IRQ_ENABLE = 0
|
||||||
|
}
|
||||||
|
OSIrqMode;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
OS_FIQ_DISABLE = HW_PSR_FIQ_DISABLE,
|
||||||
|
OS_FIQ_ENABLE = 0
|
||||||
|
}
|
||||||
|
OSFiqMode;
|
||||||
|
|
||||||
|
|
||||||
|
//---- interrupt handler type
|
||||||
|
//typedef IRQ void (*OSIntrHandler) (void);
|
||||||
|
typedef void (*OSIntrHandler) (void);
|
||||||
|
typedef void (*OSIntrFunction) (void);
|
||||||
|
|
||||||
|
//IRQ void osInterruptHandler( void );
|
||||||
|
void osInterruptHandler( void );
|
||||||
|
void i_osInitInterruptTable( void );
|
||||||
|
|
||||||
|
OSIntrMode osEnableIrq( void );
|
||||||
|
OSIntrMode osDisableIrq( void );
|
||||||
|
OSIntrMode osRestoreIrq( OSIntrMode state );
|
||||||
|
|
||||||
|
OSIntrMode osEnableFiq( void );
|
||||||
|
OSIntrMode osDisableFiq( void );
|
||||||
|
OSIntrMode osRestoreFiq( OSIntrMode state );
|
||||||
|
|
||||||
|
OSIntrMode osEnableIrqAndFiq( void );
|
||||||
|
OSIntrMode osDisableIrqAndFiq( void );
|
||||||
|
OSIntrMode osRestoreIrqAndFiq( OSIntrMode state );
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: osInitInterrupts
|
Name: osInitInterrupts
|
||||||
@ -45,9 +84,54 @@ OSIntrID i_osReadInterruptAcknowledgeRegister( void );
|
|||||||
*---------------------------------------------------------------------------*/
|
*---------------------------------------------------------------------------*/
|
||||||
void osInitInterrupt( void );
|
void osInitInterrupt( void );
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: osSetInterruptHandler
|
||||||
|
|
||||||
|
Description: Set interrupt handler
|
||||||
|
|
||||||
|
Arguments: interrupt ID
|
||||||
|
interrupt handler
|
||||||
|
|
||||||
|
Returns: None
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
void osSetInterruptHandler( OSIntrID id, OSIntrFunction handler );
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
// INTERRUPT MASK
|
// INTERRUPT MASK
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: osEnableInterrupts
|
||||||
|
|
||||||
|
Description: Set CPSR to enable irq and fiq interrupts
|
||||||
|
|
||||||
|
Arguments: None.
|
||||||
|
|
||||||
|
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
OSIntrMode osEnableInterrupts( void );
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: osDisableInterrupts
|
||||||
|
|
||||||
|
Description: Set CPSR to disable irq and fiq interrupts
|
||||||
|
|
||||||
|
Arguments: None.
|
||||||
|
|
||||||
|
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
OSIntrMode osDisableInterrupts( void );
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Name: osRestoreInterrupts
|
||||||
|
|
||||||
|
Description: Restore CPSR irq and fiq interrupts
|
||||||
|
|
||||||
|
Arguments: state of irq interrupt bit
|
||||||
|
|
||||||
|
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
OSIntrMode osRestoreInterrupts( OSIntrMode state );
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
/*---------------------------------------------------------------------------*
|
||||||
Name: osEnableInterruptID
|
Name: osEnableInterruptID
|
||||||
|
|
||||||
|
|||||||
@ -1,170 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Project: CtrBrom - OS - include
|
|
||||||
File: interrupt_common.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_COMMON_H_
|
|
||||||
#define BROM_OS_INTERRUPT_COMMON_H_
|
|
||||||
|
|
||||||
#include <brom/types.h>
|
|
||||||
#include <brom/memorymap.h>
|
|
||||||
#include <ctr/ioreg.h>
|
|
||||||
#ifdef SDK_ARM11
|
|
||||||
#include <brom/os/ARM11/interrupt_types.h>
|
|
||||||
#else // SDK_ARM9
|
|
||||||
#include <brom/os/ARM9/interrupt_types.h>
|
|
||||||
#endif // SDK_ARM9
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef u32 OSIntrMode;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
OS_IRQ_DISABLE = HW_PSR_IRQ_DISABLE,
|
|
||||||
OS_IRQ_ENABLE = 0
|
|
||||||
}
|
|
||||||
OSIrqMode;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
OS_FIQ_DISABLE = HW_PSR_FIQ_DISABLE,
|
|
||||||
OS_FIQ_ENABLE = 0
|
|
||||||
}
|
|
||||||
OSFiqMode;
|
|
||||||
|
|
||||||
|
|
||||||
//---- interrupt handler type
|
|
||||||
//typedef IRQ void (*OSIntrHandler) (void);
|
|
||||||
typedef void (*OSIntrHandler) (void);
|
|
||||||
typedef void (*OSIntrFunction) (void);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//IRQ void osInterruptHandler( void );
|
|
||||||
void osInterruptHandler( void );
|
|
||||||
void i_osInitInterruptTable( void );
|
|
||||||
|
|
||||||
OSIntrMode osEnableIrq( void );
|
|
||||||
OSIntrMode osDisableIrq( void );
|
|
||||||
OSIntrMode osRestoreIrq( OSIntrMode state );
|
|
||||||
|
|
||||||
OSIntrMode osEnableFiq( void );
|
|
||||||
OSIntrMode osDisableFiq( void );
|
|
||||||
OSIntrMode osRestoreFiq( OSIntrMode state );
|
|
||||||
|
|
||||||
OSIntrMode osEnableIrqAndFiq( void );
|
|
||||||
OSIntrMode osDisableIrqAndFiq( void );
|
|
||||||
OSIntrMode osRestoreIrqAndFiq( OSIntrMode state );
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osInitInterrupt
|
|
||||||
|
|
||||||
Description: Initialize Interrupts
|
|
||||||
|
|
||||||
Arguments: None
|
|
||||||
|
|
||||||
Returns: None
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
void osInitInterrupt( void );
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osSetInterruptHandler
|
|
||||||
|
|
||||||
Description: Set interrupt handler
|
|
||||||
|
|
||||||
Arguments: interrupt ID
|
|
||||||
interrupt handler
|
|
||||||
|
|
||||||
Returns: None
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void osSetInterruptHandler( OSIntrID id, OSIntrFunction handler );
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osHalt
|
|
||||||
|
|
||||||
Description: Halt CPU Core until Interrupt
|
|
||||||
|
|
||||||
Arguments: None
|
|
||||||
|
|
||||||
Returns: None
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void osHalt( void );
|
|
||||||
|
|
||||||
#ifdef SDK_ARM9
|
|
||||||
#else // SDK_MPCORE
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osHaltUntilEvent
|
|
||||||
|
|
||||||
Description: Halt CPU Core until Event
|
|
||||||
|
|
||||||
Arguments: None
|
|
||||||
|
|
||||||
Returns: None
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void osHaltUntilEvent( void );
|
|
||||||
|
|
||||||
#endif // SDK_MPCORE
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osEnableInterrupts
|
|
||||||
|
|
||||||
Description: Set CPSR to enable irq and fiq interrupts
|
|
||||||
|
|
||||||
Arguments: None.
|
|
||||||
|
|
||||||
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
OSIntrMode osEnableInterrupts( void );
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osDisableInterrupts
|
|
||||||
|
|
||||||
Description: Set CPSR to disable irq and fiq interrupts
|
|
||||||
|
|
||||||
Arguments: None.
|
|
||||||
|
|
||||||
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
OSIntrMode osDisableInterrupts( void );
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*
|
|
||||||
Name: osRestoreInterrupts
|
|
||||||
|
|
||||||
Description: Restore CPSR irq and fiq interrupts
|
|
||||||
|
|
||||||
Arguments: state of irq interrupt bit
|
|
||||||
|
|
||||||
Returns: last state of HW_PSR_IRQ_DISABLE & HW_PSR_FIQ_DISABLE
|
|
||||||
*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
OSIntrMode osRestoreInterrupts( OSIntrMode state );
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} // extern "C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // BROM_OS_INTERRUPT_COMMON_H_
|
|
||||||
@ -25,8 +25,6 @@ extern "C" {
|
|||||||
#include <brom/types.h>
|
#include <brom/types.h>
|
||||||
#include <ctr/ioreg.h>
|
#include <ctr/ioreg.h>
|
||||||
|
|
||||||
#include <brom/os/common/interrupt_common.h>
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
#ifdef SDK_ARM11
|
#ifdef SDK_ARM11
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user