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

📄 timer8.asm

📁 此程序是用CYPRESS单片机编写
💻 ASM
📖 第 1 页 / 共 2 页
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: Timer8.asm
;;   Version: 2.4, Updated on 2005/10/05 at 10:27:18
;;  Generated by PSoC Designer ver 4.2  b1013 : 02 September, 2004
;;
;;  DESCRIPTION: Timer8 User Module software implementation file
;;               for the 22/24/27/29xxx PSoC family of devices
;;
;;  NOTE: User Module APIs conform to the fastcall16 convention for marshalling
;;        arguments and observe the associated "Registers are volatile" policy.
;;        This means it is the caller's responsibility to preserve any values
;;        in the X and A registers that are still needed after the API functions
;;        returns. For Large Memory Model devices it is also the caller's 
;;        responsibility to perserve any value in the CUR_PP, IDX_PP, MVR_PP and 
;;        MVW_PP registers. Even though some of these registers may not be modified
;;        now, there is no guarantee that will remain the case in future releases.
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"
include "memory.inc"
include "Timer8.inc"

;-----------------------------------------------
;  Global Symbols
;-----------------------------------------------
export  Timer8_EnableInt
export _Timer8_EnableInt
export  Timer8_DisableInt
export _Timer8_DisableInt
export  Timer8_Start
export _Timer8_Start
export  Timer8_Stop
export _Timer8_Stop
export  Timer8_WritePeriod
export _Timer8_WritePeriod
export  Timer8_WriteCompareValue
export _Timer8_WriteCompareValue
export  Timer8_bReadCompareValue
export _Timer8_bReadCompareValue
export  Timer8_bReadTimer
export _Timer8_bReadTimer
export  Timer8_bReadTimerSaveCV
export _Timer8_bReadTimerSaveCV

; The following functions are deprecated and subject to omission in future releases
;
export  bTimer8_ReadCompareValue  ; deprecated
export _bTimer8_ReadCompareValue  ; deprecated
export  bTimer8_ReadTimer         ; deprecated
export _bTimer8_ReadTimer         ; deprecated
export  bTimer8_ReadTimerSaveCV   ; deprecated
export _bTimer8_ReadTimerSaveCV   ; deprecated

export  bTimer8_ReadCounter       ; obsolete
export _bTimer8_ReadCounter       ; obsolete
export  bTimer8_CaptureCounter    ; obsolete
export _bTimer8_CaptureCounter    ; obsolete


AREA freq_occur_ad_to_pwm_RAM (RAM,REL)

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


;-----------------------------------------------
; Variable Allocation
;-----------------------------------------------


AREA UserModules (ROM, REL)

.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Timer8_EnableInt
;
;  DESCRIPTION:
;     Enables this timer's interrupt by setting the interrupt enable mask bit
;     associated with this User Module. This function has no effect until and
;     unless the global interrupts are enabled (for example by using the
;     macro M8C_EnableGInt).
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:    None.
;  RETURNS:      Nothing.
;  SIDE EFFECTS: 
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 Timer8_EnableInt:
_Timer8_EnableInt:
   RAM_PROLOGUE RAM_USE_CLASS_1
   Timer8_EnableInt_M
   RAM_EPILOGUE RAM_USE_CLASS_1
   ret

.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Timer8_DisableInt
;
;  DESCRIPTION:
;     Disables this timer's interrupt by clearing the interrupt enable
;     mask bit associated with this User Module.
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:    None
;  RETURNS:      Nothing
;  SIDE EFFECTS: 
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 Timer8_DisableInt:
_Timer8_DisableInt:
   RAM_PROLOGUE RAM_USE_CLASS_1
   Timer8_DisableInt_M
   RAM_EPILOGUE RAM_USE_CLASS_1
   ret

.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Timer8_Start
;
;  DESCRIPTION:
;     Sets the start bit in the Control register of this user module.  The
;     timer will begin counting on the next input clock.
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:    None
;  RETURNS:      Nothing
;  SIDE EFFECTS: 
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 Timer8_Start:
_Timer8_Start:
   RAM_PROLOGUE RAM_USE_CLASS_1
   Timer8_Start_M
   RAM_EPILOGUE RAM_USE_CLASS_1
   ret

.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Timer8_Stop
;
;  DESCRIPTION:
;     Disables timer operation by clearing the start bit in the Control
;     register.
;-----------------------------------------------------------------------------
;
;  ARGUMENTS:    None
;  RETURNS:      Nothing
;  SIDE EFFECTS: 
;    The A and X registers may be modified by this or future implementations
;    of this function.  The same is true for all RAM page pointer registers in
;    the Large Memory Model.  When necessary, it is the calling function's
;    responsibility to perserve their values across calls to fastcall16 
;    functions.
;
 Timer8_Stop:
_Timer8_Stop:
   RAM_PROLOGUE RAM_USE_CLASS_1
   Timer8_Stop_M
   RAM_EPILOGUE RAM_USE_CLASS_1
   ret

.ENDSECTION


.SECTION
;-----------------------------------------------------------------------------
;  FUNCTION NAME: Timer8_WritePeriod
;
;  DESCRIPTION:
;     Write the 8-bit period value into the Period register (DR1). If the
;     Timer user module is stopped, then this value will also be latched
;     into the Count register (DR0).
;-----------------------------------------------------------------------------

⌨️ 快捷键说明

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