counter8_uart.inc

来自「带触摸按键的高端电磁炉设计 该方案采用CYPRESS的新器件CY8C22545」· INC 代码 · 共 69 行

INC
69
字号
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: Counter8_UART.inc
;;   Version: 2.5, Updated on 2008/12/13 at 10:55:38
;;  Generated by PSoC Designer ???
;;
;;  DESCRIPTION: Assembler declarations for the Counter8 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 Counter8_UART API's.
;--------------------------------------------------

Counter8_UART_CONTROL_REG_START_BIT:       equ 0x01    ; Control register start bit
Counter8_UART_INT_REG:                     equ 0x0e1
Counter8_UART_INT_MASK:                    equ 0x20


;--------------------------------------------------
; Constants for Counter8_UART user defined values
;--------------------------------------------------

Counter8_UART_PERIOD:                      equ 0x09
Counter8_UART_COMPARE_VALUE:               equ 0x05


;--------------------------------------------------
; Register Address Constants for Counter8_UART
;--------------------------------------------------

Counter8_UART_COUNTER_REG:             equ 0x34   ; DR0 Counter register
Counter8_UART_PERIOD_REG:              equ 0x35   ; DR1 Period register
Counter8_UART_COMPARE_REG:             equ 0x36   ; DR2 CompareValue register
Counter8_UART_CONTROL_REG:             equ 0x37   ; Control register
Counter8_UART_FUNC_REG:                equ 0x34   ; Function register
Counter8_UART_INPUT_REG:               equ 0x35   ; Input register
Counter8_UART_OUTPUT_REG:              equ 0x36   ; Output register


;--------------------------------------------------
; Counter8_UART Macro 'Functions'
;--------------------------------------------------

   macro Counter8_UART_Start_M
   or    reg[Counter8_UART_CONTROL_REG],  Counter8_UART_CONTROL_REG_START_BIT
   endm

   macro Counter8_UART_Stop_M
   and   reg[Counter8_UART_CONTROL_REG], ~Counter8_UART_CONTROL_REG_START_BIT
   endm

   macro Counter8_UART_EnableInt_M
   M8C_EnableIntMask Counter8_UART_INT_REG, Counter8_UART_INT_MASK
   endm

   macro Counter8_UART_DisableInt_M
   M8C_DisableIntMask Counter8_UART_INT_REG, Counter8_UART_INT_MASK
   endm


; end of file Counter8_UART.inc

⌨️ 快捷键说明

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