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

📄 rtc_def.h

📁 嵌入式系统
💻 H
字号:
/*-----------------------------------------------------------------------------
@@
@@ Copyright (c) 2001 Sharp Corporation All rights reserved.
@@
@@ (Summary)    : Real Time Clock (RTC) IP Level Definitions Header File
@@
@@ (Comment)    : Define Registers of RTC
@@
@@ (Author)     : Tan Wee Kah
@@
@@ (History)    : 24/11/2000    Tan Wee Kah Version 1.0
@@                24/05/2001    Tan Wee Kah Version 2.0 with LH79532 support
@@                30/08/2001    Teo LL      Version 3.0 with LH79533 support
@@
@@ (RCS ID)     :
@@
-----------------------------------------------------------------------------*/

#ifndef APD_RTC_DEF_H
#define APD_RTC_DEF_H

/* RTC Register Addresses */
#define APD_RTCSECOND       ((volatile APD_UCHAR  *)(APD_RTCBASE))          /* RTC Second Register */
#define APD_RTCMINUTE       ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x04))   /* RTC Minute Register */
#define APD_RTCHOUR         ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x08))   /* RTC Hour Register */
#define APD_RTCDAY_M        ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x0C))   /* RTC Day-of-month Register */
#define APD_RTCDAY_W        ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x10))   /* RTC Day-of-week Register */
#define APD_RTCMONTH        ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x14))   /* RTC Month Register */
#define APD_RTCYEAR         ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x18))   /* RTC Year Register (last 2 digits of year) */
#define APD_RTCCENTURY      ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x1C))   /* RTC Century Register (20th/21st century only)*/
#define APD_RTCMIND         ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x20))   /* RTC Alarm Minute Register */
#define APD_RTCHOURD        ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x24))   /* RTC Alarm Hour Register */
#define APD_RTCCHECK        ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x28))   /* RTC Check Register */
#define APD_RTCRCSR         ((volatile APD_UCHAR  *)(APD_RTCBASE + 0x2C))   /* RTC RSSR Register */

/* RTC Check Register Bit Definitions */
#define APD_RTCCHECK_CLKSEL     0x00000002  /* Clock Select bit */
#define APD_RTCCHECK_CLKEN      0x00000001  /* Clock Enable bit */

/* RTC RCSR Register Bit Definitions */
#define APD_RTCRCSR_EALM        0x00000080  /* Enable Alarm bit */
#define APD_RTCRCSR_ALM         0x00000020  /* Alarm bit (Read Only) */
#define APD_RTCRCSR_MOD         0x00000004  /* Modify mode bit*/
#define APD_RTCRCSR_CHLD        0x00000002  /* Hold mode bit */
#define APD_RTCRCSR_ADJ         0x00000001  /* Adjust mode bit (Reset = 1) */
#define APD_RTCRCSR_IRQFMASK    ~(0x00000018)   /* Mask for IRQF Output Frequency */

/* RTC BIT SETTING FOR CLOCK/ALARM FORMAT */
#define APD_RTCTIME_FORMAT_SEL  0x00000080  /* set to 1 for 24 hour format */
#define APD_RTCCLK_FORMAT_SET   0x00000020  /* set to 1 for PM setting */
#define APD_RTC12HOUR_MASK      0x1F        /* 12 hour format mask */
#define APD_RTC24HOUR_MASK      0x3F        /* 24 hour format mask */

#endif  /* APD_RTC_DEF */

⌨️ 快捷键说明

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