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

📄 carrier_timer.inc

📁 测量脉搏的源码 Cypress公司使用 CY27443 完成相关的功能
💻 INC
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: Carrier_Timer.inc
;;   Version: 2.2, Updated on 2003/11/10 at 16:40:54
;;  Generated by PSoC Designer ver 4.1 BETA b923 : 11 December, 2003
;;
;;  DESCRIPTION: Assembler declarations for the Timer8 user module interface
;;               for the 22/24/27/28xxx PSoC family of devices
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress MicroSystems 2000-2003. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"


;--------------------------------------------------
; Constants for Carrier_Timer API's.
;--------------------------------------------------

Carrier_Timer_CONTROL_REG_START_BIT:       equ 0x01    ; Control register start bit
Carrier_Timer_INT_REG:                     equ 0x0e1
Carrier_Timer_INT_MASK:                    equ 0x01


;--------------------------------------------------
; Constants for Carrier_Timer user defined values
;--------------------------------------------------

Carrier_Timer_PERIOD:                      equ 0x4f
Carrier_Timer_COMPARE_VALUE:               equ 0x28


;--------------------------------------------------
; Register Address Constants for Carrier_Timer
;--------------------------------------------------

Carrier_Timer_COUNTER_REG:             equ 0x20   ; DR0 Counter register
Carrier_Timer_PERIOD_REG:              equ 0x21   ; DR1 Period register
Carrier_Timer_COMPARE_REG:             equ 0x22   ; DR2 CompareValue register
Carrier_Timer_CONTROL_REG:             equ 0x23   ; Control register
Carrier_Timer_FUNC_REG:                equ 0x20   ; Function register
Carrier_Timer_INPUT_REG:               equ 0x21   ; Input register
Carrier_Timer_OUTPUT_REG:              equ 0x22   ; Output register


;--------------------------------------------------
; Carrier_Timer Macro 'Functions'
;--------------------------------------------------

   macro Carrier_Timer_Start_M
   or    reg[Carrier_Timer_CONTROL_REG],  Carrier_Timer_CONTROL_REG_START_BIT
   endm

   macro Carrier_Timer_Stop_M
   and   reg[Carrier_Timer_CONTROL_REG], ~Carrier_Timer_CONTROL_REG_START_BIT
   endm

   macro Carrier_Timer_EnableInt_M
   M8C_EnableIntMask Carrier_Timer_INT_REG, Carrier_Timer_INT_MASK
   endm

   macro Carrier_Timer_DisableInt_M
   M8C_DisableIntMask Carrier_Timer_INT_REG, Carrier_Timer_INT_MASK
   endm


; end of file Carrier_Timer.inc

⌨️ 快捷键说明

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