📄 rtc.h
字号:
/**************************************************************************************
*
* Project Name : S3C6400 Validation
*
* Copyright 2006 by Samsung Electronics, Inc.
* All rights reserved.
*
* Project Description :
* This software is only for validating functions of the S3C6400.
* Anybody can use this software without our permission.
*
*--------------------------------------------------------------------------------------
*
* File Name : rtc.h
*
* File Description : This file implements the API functons for RTC(Real Time Clock).
*
* Author : Woojin.Kim
* Dept. : AP Development Team
* Created Date : 2007/01/06
* Version : 0.1
*
* History
* - Created(Woojin.Kim 2007/01/06)
*
**************************************************************************************/
#ifndef __RTC_H__
#define __RTC_H__
#include "def.h"
#include "sfr6400.h"
enum RTC_SFR
{
rINTP = RTC_BASE + 0x30,
rRTCCON = RTC_BASE + 0x40,
rTICCNT = RTC_BASE + 0x44,
rRTCALM = RTC_BASE + 0x50,
rALMSEC = RTC_BASE + 0x54,
rALMMIN = RTC_BASE + 0x58,
rALMHOUR = RTC_BASE + 0x5c,
rALMDATE = RTC_BASE + 0x60,
rALMMON = RTC_BASE + 0x64,
rALMYEAR = RTC_BASE + 0x68,
// RTCRST = RTC_BASE + 0x6c,
rBCDSEC = RTC_BASE + 0x70,
rBCDMIN = RTC_BASE + 0x74,
rBCDHOUR = RTC_BASE + 0x78,
rBCDDATE = RTC_BASE + 0x7c,
rBCDDAY = RTC_BASE + 0x80,
rBCDMON = RTC_BASE + 0x84,
rBCDYEAR = RTC_BASE + 0x88,
rCURTICCNT = RTC_BASE + 0x90,
rRTCLVD = RTC_BASE + 0x94
};
#define InitYEAR (99)
#define InitMONTH (12)
#define InitDATE (31)
#define InitDAY (02) //SUN:1 MON:2 TUE:3 WED:4 THU:5 FRI:6 SAT:7
#define InitHOUR (23)
#define InitMIN (59)
#define InitSEC (55)
#define AlmYear (00)
#define AlmMon (01)
#define AlmDate (01)
#define AlmHour (00)
#define AlmMin (00)
#define AlmSec (00)
void RTC_SetCON(u32 uEnTic, u32 uTicsel, u32 uRstCLK, u32 uSelCNT, u32 uSelCLK, u32 uEnRTC);
void RTC_SetTime(u32 uYear, u32 uMon, u32 uDate, u32 uDay, u32 uHour, u32 uMin, u32 uSec);
void RTC_Init(void);
void RTC_SetTickCNT(u32 uTickcnt);
void RTC_Print(void);
void RTC_PrintCURTICK(void);
void RTC_SetAlmTime(u32 uYear, u32 uMon, u32 uDate, u32 uHour, u32 uMin, u32 uSec);
void RTC_SetAlmEn(u32 enAlm, u32 enYear, u32 enMon, u32 enDate, u32 enHour,u32 enMin,u32 enSec);
void RTC_PrintAlm(void);
void RTC_SetLVD(u32 enLVD);
u32 RTC_PrintLVD(void);
void RTC_ClearIntP(u32 uSelectP);
void __irq Isr_RTC_Tick(void);
void __irq Isr_RTC_InspectTick(void);
void __irq Isr_RTC_Alm(void);
#endif // __RTC_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -