⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_cpu_a.s

📁 AVR megal128下的ucos_ii
💻 S
📖 第 1 页 / 共 3 页
字号:
                ST      Z+,R28
                ST      Z+,R29                      ; }

uart1_rx_isr_1:
                //CALL    _Uart1Rx_Handler          ; Handle the tick ISR

                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR

                POP_SP                              ; Restore the hardware stack pointer from task's stack
                POP_SREG                            ; Restore the SREG register
                POP_ALL                             ; Restore all registers

                RET                                 ; Note: RET instead of RETI
                
                
;/*$PAGE*/.
;********************************************************************************************************
;                                              Uart1  udre  ISR
;
; Description : This function is the ISR used to notify uC/OS-II that a system tick has occurred.
;
;               The following C-like pseudo-code describe the operation being performed in the code below.
;
;               Save all registers on the current task's stack:
;                      Use the PUSH_ALL macro
;                      Get the SREG, set Bit #7 and save onto the task's stack using -Y addressing
;                      Use the PUSH_SP macro to save the task's hardware stack pointer onto the current task's stack
;               OSIntNesting++;
;               if (OSIntNesting == 1) {
;                  OSTCBCur->OSTCBStkPtr = SP
;               }
;               Clear the interrupt;                  Not needed for the timer we used.
;                                          Notify uC/OS-II that a tick has occured
;                                          Notify uC/OS-II about end of ISR
;               Restore all registers that were save on the current task's stack:
;                      Use the POP_SP macro to restore the task's hardware stack pointer
;                      Use the POP_SREG macro to restore the SREG register
;                      Use the POP_ALL macro to restore the remaining registers
;               Return (DO NOT use a RETI instruction);
;********************************************************************************************************
/*
_uart1_udre_isr::
                PUSH_ALL                            ; Save all registers and status register
                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
                SBR     R16,BIT07                    
                ST      -Y,R16
                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack

                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
                INC     R16                         ;
                STS     _OSIntNesting,R16           ;

                CPI     R16,1                       ; if (OSIntNesting == 1) {
                BRNE    uart1_udre_isr_1

                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
                LDS     R31,_OSTCBCur+1
                ST      Z+,R28
                ST      Z+,R29                      ; }

uart1_udre_isr_1:
                //CALL    _Uart1Ud_Handler     ; Handle the tick ISR

                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR

                POP_SP                              ; Restore the hardware stack pointer from task's stack
                POP_SREG                            ; Restore the SREG register
                POP_ALL                             ; Restore all registers

                RET                                 ; Note: RET instead of RETI
*/
;/*$PAGE*/.
/*
;********************************************************************************************************
;                                              Uart1  udre  ISR
;
; Description : This function is the ISR used to notify uC/OS-II that a system tick has occurred.
;
;               The following C-like pseudo-code describe the operation being performed in the code below.
;
;               Save all registers on the current task's stack:
;                      Use the PUSH_ALL macro
;                      Get the SREG, set Bit #7 and save onto the task's stack using -Y addressing
;                      Use the PUSH_SP macro to save the task's hardware stack pointer onto the current task's stack
;               OSIntNesting++;
;               if (OSIntNesting == 1) {
;                  OSTCBCur->OSTCBStkPtr = SP
;               }
;               Clear the interrupt;                  Not needed for the timer we used.
;                                          Notify uC/OS-II that a tick has occured
;                                          Notify uC/OS-II about end of ISR
;               Restore all registers that were save on the current task's stack:
;                      Use the POP_SP macro to restore the task's hardware stack pointer
;                      Use the POP_SREG macro to restore the SREG register
;                      Use the POP_ALL macro to restore the remaining registers
;               Return (DO NOT use a RETI instruction);
;********************************************************************************************************

;_adc_isr::
;                PUSH_ALL                            ; Save all registers and status register
;                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
;                SBR     R16,BIT07                    
;                ST      -Y,R16
;                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack
;
;                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
;                INC     R16                         ;
;                STS     _OSIntNesting,R16           ;
;
;                CPI     R16,1                       ; if (OSIntNesting == 1) {
;                BRNE    adc_isr_1
;
;                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
;                LDS     R31,_OSTCBCur+1
;                ST      Z+,R28
;                ST      Z+,R29                      ; }
;
;adc_isr_1:
;                CALL    _Adc_isr_Handler           ; Handle the tick ISR
;
;                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR
;
;                POP_SP                              ; Restore the hardware stack pointer from task's stack
;                POP_SREG                            ; Restore the SREG register
;                POP_ALL                             ; Restore all registers
;
;                RET                                 ; Note: RET instead of RETI
 
/*
//============================================================================//
//  void int1_isr(void);
//============================================================================//
;
;_int1_isr::
                PUSH_ALL                            ; Save all registers and status register
*                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
*                SBR     R16,BIT07                    
*                ST      -Y,R16
*                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack
*
*                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
*                INC     R16                         ;
*                STS     _OSIntNesting,R16           ;
*
*                CPI     R16,1                       ; if (OSIntNesting == 1) {
*                BRNE    int1_isr_1
*
*                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
*                LDS     R31,_OSTCBCur+1
*                ST      Z+,R28
*                ST      Z+,R29                      ; 
*
*int1_isr_1:
//*                CALL    _int1_isr_Handler     ; Handle the tick ISR
*
*                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR
*
*                POP_SP                              ; Restore the hardware stack pointer from task's stack
*                POP_SREG                            ; Restore the SREG register
*                POP_ALL                             ; Restore all registers
*
*                RET                                 ; Note: RET instead of RETI
*/
//============================================================================//
//  void int4_isr(void);
//============================================================================//
/*
_int4_isr::
                PUSH_ALL                            ; Save all registers and status register
                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
                SBR     R16,BIT07                    
                ST      -Y,R16
                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack

                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
                INC     R16                         ;
                STS     _OSIntNesting,R16           ;

                CPI     R16,1                       ; if (OSIntNesting == 1) {
                BRNE    int4_isr_1

                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
                LDS     R31,_OSTCBCur+1
                ST      Z+,R28
                ST      Z+,R29                      ; }

int4_isr_1:
//                CALL    _int4_isr_Handler     ; Handle the tick ISR

                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR

                POP_SP                              ; Restore the hardware stack pointer from task's stack
                POP_SREG                            ; Restore the SREG register
                POP_ALL                             ; Restore all registers

                RET                                 ; Note: RET instead of RETI	
/*
//============================================================================//
//  void int6_isr(void);
//============================================================================//
;_int6_isr::
;                PUSH_ALL                            ; Save all registers and status register
;                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
;                SBR     R16,BIT07                    
;                ST      -Y,R16
;                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack
;
;                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
;                INC     R16                         ;
;                STS     _OSIntNesting,R16           ;
;
;               CPI     R16,1                       ; if (OSIntNesting == 1) {
;                BRNE    int6_isr_1
;
;                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
;                LDS     R31,_OSTCBCur+1
;                ST      Z+,R28
;                ST      Z+,R29                      ; }
;
;int6_isr_1:
;                CALL    _int6_isr_Handler     ; Handle the tick ISR
;
;                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR
;
;                POP_SP                              ; Restore the hardware stack pointer from task's stack
;                POP_SREG                            ; Restore the SREG register
;                POP_ALL                             ; Restore all registers
;
;                RET                                 ; Note: RET instead of RETI
//============================================================================//
//  void int7_isr(void);
//============================================================================//
;_int7_isr::
;                PUSH_ALL                            ; Save all registers and status register
;                IN      R16,SREG                    ; Save the SREG but with interrupts enabled
;                SBR     R16,BIT07                    
;                ST      -Y,R16
;                PUSH_SP                             ; Save the task's hardware stack pointer onto task's stack
;
;                LDS     R16,_OSIntNesting           ; Notify uC/OS-II of ISR
;                INC     R16                         ;
;                STS     _OSIntNesting,R16           ;
;
;                CPI     R16,1                       ; if (OSIntNesting == 1) {
;                BRNE    int7_isr_1
;
;                LDS     R30,_OSTCBCur               ;     OSTCBCur->OSTCBStkPtr = Y
;                LDS     R31,_OSTCBCur+1
;                ST      Z+,R28
;                ST      Z+,R29                      ; }
;
;int7_isr_1:
;                CALL    _int7_isr_Handler     ; Handle the tick ISR
;
;                CALL    _OSIntExit                  ; Notify uC/OS-II about end of ISR
;
;                POP_SP                              ; Restore the hardware stack pointer from task's stack
;                POP_SREG                            ; Restore the SREG register
;                POP_ALL                             ; Restore all registers
;
;                RET                                 ; Note: RET instead of RETI
;
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -