📄 mass.s
字号:
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to T2_Cont
bra nz, DMA0Cont
mov _OSTCBCur, w0
mov w15, [w0]
DMA0Cont:
BCLR IFS0, #DMA0IF ; 4) Clear the interrupt source
call _Mass_DMA0ISRHandler ; 5) Call YOUR ISR Handler (May be a C function). In this case, the OSView Tx ISR Handler
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC1Interrupt
;
; Description : This function is the IC1 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC1Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC1_Cont
bra nz, IC1Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC1Cont:
BCLR IFS0, #IC1IF ; 4) Clear the interrupt source
call _Mass_TatakiPrdISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC2Interrupt
;
; Description : This function is the IC2 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC2Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC2_Cont
bra nz, IC2Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC2Cont:
BCLR IFS0, #IC2IF ; 4) Clear the interrupt source
call _Mass_IC2ISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC3Interrupt
;
; Description : This function is the IC3 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC3Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC3_Cont
bra nz, IC3Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC3Cont:
BCLR IFS2, #IC3IF ; 4) Clear the interrupt source
call _Mass_FrntBckPrdISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC4Interrupt
;
; Description : This function is the IC4 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC4Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC4_Cont
bra nz, IC4Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC4Cont:
BCLR IFS2, #IC4IF ; 4) Clear the interrupt source
call _Mass_UpDownPrdISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC5Interrupt
;
; Description : This function is the IC5 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC5Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC5_Cont
bra nz, IC5Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC5Cont:
BCLR IFS2, #IC5IF ; 4) Clear the interrupt source
call _Mass_IC5ISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC6Interrupt
;
; Description : This function is the IC6 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC6Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC6_Cont
bra nz, IC6Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC6Cont:
BCLR IFS2, #IC6IF ; 4) Clear the interrupt source
call _Mass_MomiPrdISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; IC7Interrupt
;
; Description : This function is the IC7 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC7Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC7_Cont
bra nz, IC7Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC7Cont:
BCLR IFS1, #IC7IF ; 4) Clear the interrupt source
call _Mass_IC7ISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;
;********************************************************************************************************
; IC8Interrupt
;
; Description : This function is the IC8 Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
;
__IC8Interrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to IC8_Cont
bra nz, IC8Cont
mov _OSTCBCur, w0
mov w15, [w0]
IC8Cont:
BCLR IFS1, #IC8IF ; 4) Clear the interrupt source
call _Mass_IC8ISRHandler ; 5) Call YOUR ISR Handler (May be a C function).
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie ; 8) Return from interrupt
;
;********************************************************************************************************
; CNInterrupt
;
; Description : This function is the CN Interrupt Service Routine
;
; Notes : All user interrupts should be defined as shown below.
;********************************************************************************************************
__CNInterrupt:
OS_REGS_SAVE ; 1) Save processor registers
inc.b _OSIntNesting ; 2) Call OSIntEnter() or increment OSIntNesting
dec.b _OSIntNesting, wreg ; 3) Check OSIntNesting. if OSIntNesting == 1, then save the stack pointer, otherwise jump to T2_Cont
bra nz, CNCont
mov _OSTCBCur, w0
mov w15, [w0]
CNCont:
BCLR IFS1, #CNIF ; 4) Clear the interrupt source
call _CN_ISR_Handler ; 5) Call YOUR ISR Handler (May be a C function). In this case, the OSView Rx ISR Handler
call _OSIntExit ; 6) Call OSIntExit() or decrement 1 from OSIntNesting
OS_REGS_RESTORE ; 7) Restore registers
retfie
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -