📄 timer16.inc
字号:
;;*****************************************************************************
;;*****************************************************************************
;; FILENAME: Timer16.inc
;; Version: 2.4, Updated on 2005/10/05 at 10:25:01
;; Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
;;
;; DESCRIPTION: Assembler declarations for the Timer16 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 Timer16 API's.
;--------------------------------------------------
Timer16_CONTROL_REG_START_BIT: equ 0x01 ; Control register start bit
Timer16_INT_REG: equ 0x0e1
Timer16_INT_MASK: equ 0x04
;--------------------------------------------------
; Constants for Timer16 user defined values
;--------------------------------------------------
Timer16_PERIOD: equ 0x5
Timer16_COMPARE_VALUE: equ 0x0
;--------------------------------------------------
; Register Address Constants for Timer16
;--------------------------------------------------
Timer16_COUNTER_LSB_REG: equ 0x24 ; DR0 Counter register
Timer16_COUNTER_MSB_REG: equ 0x28
Timer16_PERIOD_LSB_REG: equ 0x25 ; DR1 Period register
Timer16_PERIOD_MSB_REG: equ 0x29
Timer16_COMPARE_LSB_REG: equ 0x26 ; DR2 CompareValue register
Timer16_COMPARE_MSB_REG: equ 0x2a
Timer16_CONTROL_LSB_REG: equ 0x27 ; Control register
Timer16_CONTROL_MSB_REG: equ 0x2b
Timer16_FUNC_LSB_REG: equ 0x24 ; Function register
Timer16_FUNC_MSB_REG: equ 0x28
Timer16_INPUT_LSB_REG: equ 0x25 ; Input register
Timer16_INPUT_MSB_REG: equ 0x29
Timer16_OUTPUT_LSB_REG: equ 0x26 ; Output register
Timer16_OUTPUT_MSB_REG: equ 0x2a
;--------------------------------------------------
; Timer16 Macro 'Functions'
;--------------------------------------------------
macro Timer16_Start_M
or reg[Timer16_CONTROL_LSB_REG], Timer16_CONTROL_REG_START_BIT
endm
macro Timer16_Stop_M
and reg[Timer16_CONTROL_LSB_REG], ~Timer16_CONTROL_REG_START_BIT
endm
macro Timer16_EnableInt_M
M8C_EnableIntMask Timer16_INT_REG, Timer16_INT_MASK
endm
macro Timer16_DisableInt_M
M8C_DisableIntMask Timer16_INT_REG, Timer16_INT_MASK
endm
; end of file Timer16.inc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -