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

📄 mstimerint.asm

📁 详细的无线键盘,鼠标,无线桥 开发文档.包含电路原理图,电路板光汇文件.FIREWALL, 驱动程序等.有此文档,就可以完全直接生产出来无线键盘,鼠标,无线桥.整个一套完整的解决方案.
💻 ASM
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: MSTIMERINT.asm
;;   Version: 1.0, Updated on 2006/06/08 at 07:36:28
;;  Generated by PSoC Designer ver 4.3  b1884 : 23 June, 2006
;;
;;  DESCRIPTION:
;;    Interrupt handler routine for MSTIMER user module instance: MSTIMER.
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress Semiconductor 2004. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************
include "m8c.inc"
include "memory.inc"
include "MSTIMER.inc"

;-----------------------------------------------
;  Global Symbols
;-----------------------------------------------
export  _MSTIMER_ISR

AREA InterruptRAM (RAM,REL,CON)

;@PSoC_UserCode_INIT@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom declarations below this banner
;---------------------------------------------------
export _MSCOUNTER_1
export MSCOUNTER_1
export _MSCOUNTER_2
export MSCOUNTER_2
export _MSCOUNTER_3
export MSCOUNTER_3
export _MSCOUNTER_4
export MSCOUNTER_4
export _MSCOUNTER_5
export MSCOUNTER_5
export _USB_ACTIVITY_TIMEOUT_COUNTER
export USB_ACTIVITY_TIMEOUT_COUNTER

;------------------------
; Includes
;------------------------
	
;------------------------
;  Constant Definitions
;------------------------

USB_ACTIVITY_TIMEOUT_VALUE: equ 3

;------------------------
; Variable Allocation
;------------------------
_MSCOUNTER_1:
MSCOUNTER_1:	BLK	1
_MSCOUNTER_2:
MSCOUNTER_2:	BLK	1
_MSCOUNTER_3:
MSCOUNTER_3:	BLK	1
_MSCOUNTER_4:
MSCOUNTER_4:	BLK	1
_MSCOUNTER_5:
MSCOUNTER_5:	BLK	1
_USB_ACTIVITY_TIMEOUT_COUNTER:
USB_ACTIVITY_TIMEOUT_COUNTER:	BLK	1


;---------------------------------------------------
; Insert your custom declarations above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)

AREA text (ROM, REL)
;-----------------------------------------------------------------------------
;  FUNCTION NAME: _MSTIMER_ISR
;
;  DESCRIPTION: MSTIMER Interrupt Service Routine
;
;-----------------------------------------------------------------------------
_MSTIMER_ISR:
   ;@PSoC_UserCode_BODY_1@ (Do not change this line.)
   ;---------------------------------------------------
   ; Insert your custom code below this banner
   ;---------------------------------------------------
   ;   NOTE: interrupt service routines must preserve
   ;   the values of the A and X CPU registers.

   push	A
   push X

   TST [MSCOUNTER_1], 0xFF
   JZ  _MSCOUNTER_1_END
   DEC [MSCOUNTER_1]
_MSCOUNTER_1_END:
   TST [MSCOUNTER_2], 0xFF
   JZ  _MSCOUNTER_2_END
   DEC [MSCOUNTER_2]
_MSCOUNTER_2_END:
   TST [MSCOUNTER_3], 0xFF
   JZ  _MSCOUNTER_3_END
   DEC [MSCOUNTER_3]
_MSCOUNTER_3_END:
   TST [MSCOUNTER_4], 0xFF
   JZ  _MSCOUNTER_4_END
   DEC [MSCOUNTER_4]
_MSCOUNTER_4_END:
   TST [MSCOUNTER_5], 0xFF
   JZ  _MSCOUNTER_5_END
   DEC [MSCOUNTER_5]
_MSCOUNTER_5_END:

;DEBUG
;   JMP _USB_ACTIVITY_DONE
;DEBUG
   ; Check for USB Activity
   LCALL USB_1_bCheckActivity
   cmp A, 0x00
   jnz _USB_ACTIVITY_DETECTED

   ; No USB Activity - Decrement timer
   TST [_USB_ACTIVITY_TIMEOUT_COUNTER], 0xFF
   JZ  _USB_ACTIVITY_TIMEOUT_COUNTER_END
   DEC [_USB_ACTIVITY_TIMEOUT_COUNTER]
_USB_ACTIVITY_TIMEOUT_COUNTER_END:
   jmp _USB_ACTIVITY_DONE

   ; USB Activity - Reset timer
_USB_ACTIVITY_DETECTED:
   mov A, USB_ACTIVITY_TIMEOUT_VALUE
   mov [_USB_ACTIVITY_TIMEOUT_COUNTER], A

_USB_ACTIVITY_DONE:
   pop X
   pop A

   ;---------------------------------------------------
   ; Insert your custom code above this banner
   ;---------------------------------------------------
   ;@PSoC_UserCode_END@ (Do not change this line.)
   RETI
; end of file MSTIMERINT.asm

⌨️ 快捷键说明

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