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

📄 lpcrtc.h

📁 FAT16 Filesystem on Philips LPC2000 series processors
💻 H
字号:
/******************************************************************************
 *
 * $RCSfile: $
 * $Revision: $
 *
 * Header file for Philips LPC ARM Processors.
 * Copyright 2004 R O SoftWare
 *
 * No guarantees, warrantees, or promises, implied or otherwise.
 * May be used for hobby or commercial purposes provided copyright
 * notice remains intact.
 *
 *****************************************************************************/
#ifndef INC_LPC_RTC_H
#define INC_LPC_RTC_H

#include <types.h>

typedef struct __attribute__ ((packed))
{
	uint	seconds:6;
	uint	reserved:2;
	uint	minutes:6;
	uint	reserved1:2;
	uint	hours:5;
	uint	reserved2:3;
	uint	dayOfWeek:3;
	uint	reserved3:5;
} rtcCTIME0_t;

typedef struct __attribute__ ((packed)) {
	uint	dayOfMonth:5;
	uint	reserved:3;
	uint	month:4;
	uint	reserved1:4;
	uint	year:12;
	uint	reserved2:4;
} rtcCTIME1_t;

typedef struct __attribute__ ((packed)) {
	uint	dayOfYear:12;
	uint	reserved:20;
} rtcCTIME2_t;


typedef struct
{
  REG_8 ilr;			// Interrupt Location Register
  REG_8 _pad0[3];
  REG16 ctc;			// Clock Tick Counter
  REG16 _pad1;
  REG_8 ccr;			// Clock Control Register
  REG_8 _pad2[3];
  REG_8 ciir;			// Counter Increment Interrupt Register
  REG_8 _pad3[3];
  REG_8 amr;			// Alarm Mask Register
  REG_8 _pad4[3];
  rtcCTIME0_t ctime0;			// Consolidated Time Register 0
  rtcCTIME1_t ctime1;			// Consolidated Time Register 1
  rtcCTIME2_t ctime2;			// Consolidated Time Register 2
  REG_8 sec;			// Seconds Register
  REG_8 _pad5[3];
  REG_8 min;			// Minutes Register
  REG_8 _pad6[3];
  REG_8 hour;			// Hours Register
  REG_8 _pad7[3];
  REG_8 dom;			// Day Of Month Register
  REG_8 _pad8[3];
  REG_8 dow;			// Day Of Week Register
  REG_8 _pad9[3];
  REG16 doy;			// Day Of Year Register
  REG16 _pad10;
  REG_8 month;			// Months Register
  REG_8 _pad11[3];
  REG16 year;			// Years Register
  REG32 _pad12[8];
  REG_8 alsec;			// Alarm Seconds Register
  REG_8 _pad13[3];
  REG_8 almin;			// Alarm Minutes Register
  REG_8 _pad14[3];
  REG_8 alhour;		// Alarm Hours Register
  REG_8 _pad15[3];
  REG_8 aldom;			// Alarm Day Of Month Register
  REG_8 _pad16[3];
  REG_8 aldow;			// Alarm Day Of Week Register
  REG_8 _pad17[3];
  REG16 aldoy;			// Alarm Day Of Year Register
  REG16 _pad18;
  REG_8 almon;			// Alarm Months Register
  REG_8 _pad19[3];
  REG16 alyear;		// Alarm Years Register
  REG16 _pad20;
  REG16 preint;		// Prescale Value Register (integer)
  REG16 _pad21;
  REG16 prefrac;		// Prescale Value Register (fraction)
  REG16 _pad22;
} rtcRegs_t;

typedef struct {
	REG32	seconds;
	REG32	minutes;
	REG32	hours;
	REG32	dayOfMonth;
	REG32	dayOfWeek;
	REG32	dayOfYear;
	REG32	month;
	REG32	year;
} rtcTCR_t;

#endif

⌨️ 快捷键说明

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