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

📄 timer8.inc

📁 此程序是用CYPRESS单片机编写
💻 INC
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: Timer8.inc
;;   Version: 2.4, Updated on 2005/10/05 at 10:27:18
;;  Generated by PSoC Designer ver 4.2  b1013 : 02 September, 2004
;;
;;  DESCRIPTION: Assembler declarations for the Timer8 user module interface
;;               for the 22/24/27/29xxx PSoC family of devices
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress MicroSystems 2000-2004. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"


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

Timer8_CONTROL_REG_START_BIT:              equ 0x01    ; Control register start bit
Timer8_INT_REG:                            equ 0x0e1
Timer8_INT_MASK:                           equ 0x01


;--------------------------------------------------
; Constants for Timer8 user defined values
;--------------------------------------------------

Timer8_PERIOD:                             equ 0xfa
Timer8_COMPARE_VALUE:                      equ 0x7d


;--------------------------------------------------
; Register Address Constants for Timer8
;--------------------------------------------------

Timer8_COUNTER_REG:                    equ 0x20   ; DR0 Counter register
Timer8_PERIOD_REG:                     equ 0x21   ; DR1 Period register
Timer8_COMPARE_REG:                    equ 0x22   ; DR2 CompareValue register
Timer8_CONTROL_REG:                    equ 0x23   ; Control register
Timer8_FUNC_REG:                       equ 0x20   ; Function register
Timer8_INPUT_REG:                      equ 0x21   ; Input register
Timer8_OUTPUT_REG:                     equ 0x22   ; Output register


;--------------------------------------------------
; Timer8 Macro 'Functions'
;--------------------------------------------------

   macro Timer8_Start_M
   or    reg[Timer8_CONTROL_REG],  Timer8_CONTROL_REG_START_BIT
   endm

   macro Timer8_Stop_M
   and   reg[Timer8_CONTROL_REG], ~Timer8_CONTROL_REG_START_BIT
   endm

   macro Timer8_EnableInt_M
   M8C_EnableIntMask Timer8_INT_REG, Timer8_INT_MASK
   endm

   macro Timer8_DisableInt_M
   M8C_DisableIntMask Timer8_INT_REG, Timer8_INT_MASK
   endm


; end of file Timer8.inc

⌨️ 快捷键说明

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