?? interrupt.c
字號:
#ifndef OS_MASTER_FILE
#include "includes.h"
#endif
#pragma interrupt on
enum t_prio { T_L_A_PRIO = 2, T_L_B_PRIO, T_L_C_PRIO, T_L_D_PRIO, T_N_5_PRIO, T_N_6_PRIO };
void InterruptHandler(INT32U);
/*
*********************************************************************************************************
* INTERRUPT HANDLER
*
* Description: This function is called by the assembly file to handle the interrupt.
*
* Arguments : except Number: The number of the exception, as follows, in GPR3:
* 0x0100 System Reset
* 0x0200 Machine Check
* 0x0300 Data Storage
* 0x0400 Instruction Storage
* 0x0500 External Interrupt
* 0x0600 Alignment
* 0x0700 Program
* 0x0800 Floating Point Unavailable
* 0x0900 Decrementer Interrupt
* 0x0C00 System Call
* 0x0D00 Trace
* 0x0E00 FP Assist
* 0x0F00 PPC740 and PPC750: Performance Monitor
* 0x1000 MPC8xx and MPC505: Software Emulation
* PPC603e: Instruction TLB Miss
* 0x1100 MPC8xx: Instruction TLB Miss
* PPC603e: Data Load TLB Miss
* 0x1C00 MPC8xx and MPC505: Data breakpoint
* 0x1D00 MPC8xx and MPC505: Instruction breakpoint
* 0x1E00 MPC8xx and MPC505: Peripheral breakpoint
* 0x1F00 MPC8xx and MPC505: Non-maskable development port
*
* Returns : None
*
* Note(s) :
*********************************************************************************************************
*/
void InterruptHandler(INT32U exceptNumber)
{
OSIntNesting++;
switch(exceptNumber)
{
/* Note to user: insert additional interrupt cases HERE. */
case 0x900: /* Decrementer Interrupt */
OSTimeTick(); /* Call uC/OSII time tick handler */
SetDecrementer(); /* Re-load DEC counter */
default:
puts("\nException Interrupt");
break;
ExitCritical();
OSIntNesting--;
ReturnFromInterrupt();
}
}
#pragma interrupt off
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -