📄 at91rm9200_rtc.h
字号:
/* linux/include/asm-arm/arch-at91rm9200/at91rm9200_rtc.h
*
* Hardware definition for the rtc peripheral in the ATMEL at91rm9200 processor
*
* Generated 01/09/2006 (16:49:36) AT91 SW Application Group from RTC_1245D V1.3
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __AT91RM9200_RTC_H
#define __AT91RM9200_RTC_H
/* -------------------------------------------------------- */
/* RTC ID definitions for AT91RM9200 */
/* -------------------------------------------------------- */
#ifndef AT91C_ID_SYS
#define AT91C_ID_SYS 1 /**< System Peripheral id */
#endif /* AT91C_ID_SYS */
/* -------------------------------------------------------- */
/* RTC Base Address definitions for AT91RM9200 */
/* -------------------------------------------------------- */
#define AT91C_BASE_RTC 0xFFFFFE00 /**< RTC base address */
/* -------------------------------------------------------- */
/* PIO definition for RTC hardware peripheral */
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */
/* Register offset definition for RTC hardware peripheral */
/* -------------------------------------------------------- */
#define RTC_CR (0x0000) /**< Control Register */
#define RTC_MR (0x0004) /**< Mode Register */
#define RTC_TIMR (0x0008) /**< Time Register */
#define RTC_CALR (0x000C) /**< Calendar Register */
#define RTC_TIMALR (0x0010) /**< Time Alarm Register */
#define RTC_CALALR (0x0014) /**< Calendar Alarm Register */
#define RTC_SR (0x0018) /**< Status Register */
#define RTC_SCCR (0x001C) /**< Status Clear Command Register */
#define RTC_IER (0x0020) /**< Interrupt Enable Register */
#define RTC_IDR (0x0024) /**< Interrupt Disable Register */
#define RTC_IMR (0x0028) /**< Interrupt Mask Register */
#define RTC_VER (0x002C) /**< Valid Entry Register */
/* -------------------------------------------------------- */
/* Bitfields definition for RTC hardware peripheral */
/* -------------------------------------------------------- */
/* --- Register RTC_CR */
#define AT91C_RTC_UPDTIM (0x1 << 0 ) /**< (RTC) Update Request Time Register */
#define AT91C_RTC_UPDCAL (0x1 << 1 ) /**< (RTC) Update Request Calendar Register */
#define AT91C_RTC_TIMEVSEL (0x3 << 8 ) /**< (RTC) Time Event Selection */
#define AT91C_RTC_TIMEVSEL_MINUTE (0x0 << 8) /**< (RTC) Minute change. */
#define AT91C_RTC_TIMEVSEL_HOUR (0x1 << 8) /**< (RTC) Hour change. */
#define AT91C_RTC_TIMEVSEL_DAY24 (0x2 << 8) /**< (RTC) Every day at midnight. */
#define AT91C_RTC_TIMEVSEL_DAY12 (0x3 << 8) /**< (RTC) Every day at noon. */
#define AT91C_RTC_CALEVSEL (0x3 << 16) /**< (RTC) Calendar Event Selection */
#define AT91C_RTC_CALEVSEL_WEEK (0x0 << 16) /**< (RTC) Week change (every Monday at time 00:00:00). */
#define AT91C_RTC_CALEVSEL_MONTH (0x1 << 16) /**< (RTC) Month change (every 01 of each month at time 00:00:00). */
#define AT91C_RTC_CALEVSEL_YEAR (0x2 << 16) /**< (RTC) Year change (every January 1 at time 00:00:00). */
/* --- Register RTC_MR */
#define AT91C_RTC_HRMOD (0x1 << 0 ) /**< (RTC) 12-24 hour Mode */
/* --- Register RTC_TIMR */
#define AT91C_RTC_SEC (0x7F << 0 ) /**< (RTC) Current Second */
#define AT91C_RTC_MIN (0x7F << 8 ) /**< (RTC) Current Minute */
#define AT91C_RTC_HOUR (0x3F << 16) /**< (RTC) Current Hour */
#define AT91C_RTC_AMPM (0x1 << 22) /**< (RTC) Ante Meridiem, Post Meridiem Indicator */
/* --- Register RTC_CALR */
#define AT91C_RTC_CENT (0x3F << 0 ) /**< (RTC) Current Century */
#define AT91C_RTC_YEAR (0xFF << 8 ) /**< (RTC) Current Year */
#define AT91C_RTC_MONTH (0x1F << 16) /**< (RTC) Current Month */
#define AT91C_RTC_DAY (0x7 << 21) /**< (RTC) Current Day */
#define AT91C_RTC_DATE (0x3F << 24) /**< (RTC) Current Date */
/* --- Register RTC_TIMALR */
#define AT91C_RTC_SEC (0x7F << 0 ) /**< (RTC) Current Second */
#define AT91C_RTC_SECEN (0x1 << 7 ) /**< (RTC) Second Alarm Enable */
#define AT91C_RTC_MIN (0x7F << 8 ) /**< (RTC) Current Minute */
#define AT91C_RTC_MINEN (0x1 << 15) /**< (RTC) Minute Alarm */
#define AT91C_RTC_HOUR (0x3F << 16) /**< (RTC) Current Hour */
#define AT91C_RTC_AMPM (0x1 << 22) /**< (RTC) Ante Meridiem, Post Meridiem Indicator */
#define AT91C_RTC_HOUREN (0x1 << 23) /**< (RTC) Current Hour */
/* --- Register RTC_CALALR */
#define AT91C_RTC_MONTH (0x1F << 16) /**< (RTC) Current Month */
#define AT91C_RTC_MONTHEN (0x1 << 23) /**< (RTC) Month Alarm Enable */
#define AT91C_RTC_DATE (0x3F << 24) /**< (RTC) Current Date */
#define AT91C_RTC_DATEEN (0x1 << 31) /**< (RTC) Date Alarm Enable */
/* --- Register RTC_SR */
#define AT91C_RTC_ACKUPD (0x1 << 0 ) /**< (RTC) Acknowledge for Update */
#define AT91C_RTC_ALARM (0x1 << 1 ) /**< (RTC) Alarm Flag */
#define AT91C_RTC_SECEV (0x1 << 2 ) /**< (RTC) Second Event */
#define AT91C_RTC_TIMEV (0x1 << 3 ) /**< (RTC) Time Event */
#define AT91C_RTC_CALEV (0x1 << 4 ) /**< (RTC) Calendar event */
/* --- Register RTC_SCCR */
#define AT91C_RTC_ACKUPD (0x1 << 0 ) /**< (RTC) Acknowledge for Update */
#define AT91C_RTC_ALARM (0x1 << 1 ) /**< (RTC) Alarm Flag */
#define AT91C_RTC_SECEV (0x1 << 2 ) /**< (RTC) Second Event */
#define AT91C_RTC_TIMEV (0x1 << 3 ) /**< (RTC) Time Event */
#define AT91C_RTC_CALEV (0x1 << 4 ) /**< (RTC) Calendar event */
/* --- Register RTC_IER */
#define AT91C_RTC_ACKUPD (0x1 << 0 ) /**< (RTC) Acknowledge for Update */
#define AT91C_RTC_ALARM (0x1 << 1 ) /**< (RTC) Alarm Flag */
#define AT91C_RTC_SECEV (0x1 << 2 ) /**< (RTC) Second Event */
#define AT91C_RTC_TIMEV (0x1 << 3 ) /**< (RTC) Time Event */
#define AT91C_RTC_CALEV (0x1 << 4 ) /**< (RTC) Calendar event */
/* --- Register RTC_IDR */
#define AT91C_RTC_ACKUPD (0x1 << 0 ) /**< (RTC) Acknowledge for Update */
#define AT91C_RTC_ALARM (0x1 << 1 ) /**< (RTC) Alarm Flag */
#define AT91C_RTC_SECEV (0x1 << 2 ) /**< (RTC) Second Event */
#define AT91C_RTC_TIMEV (0x1 << 3 ) /**< (RTC) Time Event */
#define AT91C_RTC_CALEV (0x1 << 4 ) /**< (RTC) Calendar event */
/* --- Register RTC_IMR */
#define AT91C_RTC_ACKUPD (0x1 << 0 ) /**< (RTC) Acknowledge for Update */
#define AT91C_RTC_ALARM (0x1 << 1 ) /**< (RTC) Alarm Flag */
#define AT91C_RTC_SECEV (0x1 << 2 ) /**< (RTC) Second Event */
#define AT91C_RTC_TIMEV (0x1 << 3 ) /**< (RTC) Time Event */
#define AT91C_RTC_CALEV (0x1 << 4 ) /**< (RTC) Calendar event */
/* --- Register RTC_VER */
#define AT91C_RTC_NVTIM (0x1 << 0 ) /**< (RTC) Non valid Time */
#define AT91C_RTC_NVCAL (0x1 << 1 ) /**< (RTC) Non valid Calendar */
#define AT91C_RTC_NVTIMALR (0x1 << 2 ) /**< (RTC) Non valid time Alarm */
#define AT91C_RTC_NVCALALR (0x1 << 3 ) /**< (RTC) Nonvalid Calendar Alarm */
#endif /* __AT91RM9200_RTC_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -