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

📄 rtc.inc

📁 带触摸按键的高端电磁炉设计 该方案采用CYPRESS的新器件CY8C22545,是一款专门针对中高端的家电触摸产品设计。除了集成触摸按键功能外
💻 INC
字号:
;;*****************************************************************************
;;*****************************************************************************
;;  FILENAME: RTC.inc
;;   Version: 1.0, Updated on 2008/12/13 at 11:0:49
;;  Generated by PSoC Designer ???
;;
;;  DESCRIPTION: Assembler declarations for the RTC user module interface
;;               for the 21x45/22x45 PSoC family of devices
;;-----------------------------------------------------------------------------
;;  Copyright (c) Cypress Semiconductor Corporation 2000-2008. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************

include "m8c.inc"


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

RTC_RTCCR_REG_START_BIT:                   equ 0x01    ; Control register start bit
RTC_INT_MASK:                              equ 0x20
RTC_INT_SEL_MASK:                          equ 0x0C

;--------------------------------------------------
; RTC interrupt selection definitions
;--------------------------------------------------

RTC_INT_SEC:                               equ (0x00)
RTC_INT_MIN:                               equ (0x04)
RTC_INT_HOUR:                              equ (0x08)
RTC_INT_DAY:                               equ (0x0C)

;--------------------------------------------------
; Register Address Constants for RTC
;--------------------------------------------------

RTC_RTCH_REG:                          equ 0xa4   ; RTC Hour register
RTC_RTCM_REG:                          equ 0xa5   ; RTC Minute register
RTC_RTCS_REG:                          equ 0xa6   ; RTC Second  register
RTC_RTCCR_REG:                         equ 0xa7  ; RTC Control register

;--------------------------------------------------
; RTC Macro 'Functions'
;--------------------------------------------------

   macro RTC_Start_M
   or    reg[RTC_RTCCR_REG],  RTC_RTCCR_REG_START_BIT
   endm

   macro RTC_Stop_M
   and   reg[RTC_RTCCR_REG], ~RTC_RTCCR_REG_START_BIT
   endm

   macro RTC_EnableInt_M
   M8C_SetBank1
   M8C_EnableIntMask RTC_RTCCR_REG, RTC_INT_MASK
   M8C_SetBank0
   M8C_EnableIntMask INT_MSK2, INT_MSK2_RTC
   endm

   macro RTC_DisableInt_M
   M8C_SetBank1
   M8C_DisableIntMask RTC_RTCCR_REG, RTC_INT_MASK
   M8C_SetBank0
   M8C_DisableIntMask INT_MSK2, INT_MSK2_RTC
   endm

; end of file RTC.inc

⌨️ 快捷键说明

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