digbuf.inc

来自「PSOC 电动自行车代码 器件采用CYPRESS新电动自行车器件CY8C245」· INC 代码 · 共 61 行

INC
61
字号
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: DigBuf.inc
;;  Version: 1.3, Updated on 2006/05/15 at 14:58:43
;;  Generated by PSoC Designer ver 4.4  b1884 : 14 Jan, 2007
;;
;;  DESCRIPTION: Assembler declarations for the Counter8 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 DigBuf API's.
;--------------------------------------------------

DigBuf_CONTROL_REG_START_BIT:              equ 0x01    ; Control register start bit
DigBuf_INT_REG:                            equ 0x0e1
DigBuf_INT_MASK:                           equ 0x04


;--------------------------------------------------
; Register Address Constants for DigBuf
;--------------------------------------------------

DigBuf_DATA_0_REG:                     equ 0x28   ; DR0 register
DigBuf_DATA_1_REG:                     equ 0x29   ; DR1 register
DigBuf_DATA_2_REG:                     equ 0x2a   ; DR2 register
DigBuf_CONTROL_REG:                    equ 0x2b   ; Control register
DigBuf_FUNC_REG:                       equ 0x28   ; Function register
DigBuf_INPUT_REG:                      equ 0x29   ; Input register
DigBuf_OUTPUT_REG:                     equ 0x2a   ; Output register


;--------------------------------------------------
; DigBuf Macro 'Functions'
;--------------------------------------------------

   macro DigBuf_Start_M
   or    reg[DigBuf_CONTROL_REG],  DigBuf_CONTROL_REG_START_BIT
   endm

   macro DigBuf_Stop_M
   and   reg[DigBuf_CONTROL_REG], ~DigBuf_CONTROL_REG_START_BIT
   endm

   macro DigBuf_EnableInt_M
   M8C_EnableIntMask DigBuf_INT_REG, DigBuf_INT_MASK
   endm

   macro DigBuf_DisableInt_M
   M8C_DisableIntMask DigBuf_INT_REG, DigBuf_INT_MASK
   endm


; end of file DigBuf.inc

⌨️ 快捷键说明

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