cmosconstants.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 89 行
JAVA
89 行
/*
* $Id: CMOSConstants.java,v 1.1 2003/11/25 11:41:59 epr Exp $
*/
package org.jnode.driver.cmos;
/**
* @author epr
*/
public interface CMOSConstants {
/** Port number for CMOS address register */
public static final int PRW8_ADDRESS = 0x70;
/** Port number for CMOS data register */
public static final int PRW8_DATA = 0x71;
public static final int CMOS_FIRST_PORT = PRW8_ADDRESS;
public static final int CMOS_LAST_PORT = PRW8_DATA;
// --------------------------------
// CMOS registers
public static final int CMOS_RTC_SECONDS = 0x00;
public static final int CMOS_RTC_SECONDS_ALARM = 0x01;
public static final int CMOS_RTC_MINUTES = 0x02;
public static final int CMOS_RTC_MINUTES_ALARM = 0x03;
public static final int CMOS_RTC_HOURS = 0x04;
public static final int CMOS_RTC_HOURS_ALARM = 0x05;
public static final int CMOS_RTC_DAY_OF_WEEK = 0x06;
public static final int CMOS_RTC_DAY_OF_MONTH = 0x07;
public static final int CMOS_RTC_MONTH = 0x08;
public static final int CMOS_RTC_YEAR = 0x09;
public static final int CMOS_FLOPPY_DRIVES = 0x10;
/* control registers - Moto names
*/
public static final int RTC_REG_A = 10;
public static final int RTC_REG_B = 11;
public static final int RTC_REG_C = 12;
public static final int RTC_REG_D = 13;
/**********************************************************************
* register details
**********************************************************************/
public static final int RTC_FREQ_SELECT = RTC_REG_A;
/* update-in-progress - set to "1" 244 microsecs before RTC goes off the bus,
* reset after update (may take 1.984ms @ 32768Hz RefClock) is complete,
* totalling to a max high interval of 2.228 ms.
*/
public static final int RTC_UIP = 0x80;
public static final int RTC_DIV_CTL = 0x70;
/* divider control: refclock values 4.194 / 1.049 MHz / 32.768 kHz */
public static final int RTC_REF_CLCK_4MHZ = 0x00;
public static final int RTC_REF_CLCK_1MHZ = 0x10;
public static final int RTC_REF_CLCK_32KHZ = 0x20;
/* 2 values for divider stage reset, others for "testing purposes only" */
public static final int RTC_DIV_RESET1 = 0x60;
public static final int RTC_DIV_RESET2 = 0x70;
/* Periodic intr. / Square wave rate select. 0=none, 1=32.8kHz,... 15=2Hz */
public static final int RTC_RATE_SELECT = 0x0F;
/**********************************************************************/
public static final int RTC_CONTROL = RTC_REG_B;
public static final int RTC_SET = 0x80; /* disable updates for clock setting */
public static final int RTC_PIE = 0x40; /* periodic interrupt enable */
public static final int RTC_AIE = 0x20; /* alarm interrupt enable */
public static final int RTC_UIE = 0x10; /* update-finished interrupt enable */
public static final int RTC_SQWE = 0x08; /* enable square-wave output */
public static final int RTC_DM_BINARY = 0x04; /* all time/date values are BCD if clear */
public static final int RTC_24H = 0x02; /* 24 hour mode - else hours bit 7 means pm */
public static final int RTC_DST_EN = 0x01; /* auto switch DST - works f. USA only */
/**********************************************************************/
public static final int RTC_INTR_FLAGS = RTC_REG_C;
/* caution - cleared by read */
public static final int RTC_IRQF = 0x80; /* any of the following 3 is active */
public static final int RTC_PF = 0x40;
public static final int RTC_AF = 0x20;
public static final int RTC_UF = 0x10;
/**********************************************************************/
public static final int RTC_VALID = RTC_REG_D;
public static final int RTC_VRT = 0x80; /* valid RAM and time */
/**********************************************************************/
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?