StuBS
rtc.cc File Reference
#include "machine/rtc.h"
#include "machine/cmos.h"
#include "debug/output.h"
Include dependency graph for rtc.cc:

Enumerations

enum  StatusA {
  RATE_SELECT = 0xf ,
  FREQ_DIVIDE = 0x70 ,
  IS_UPDATEING = 1 << 7
}
 
enum  StatusB {
  IS_DST = 1 << 0 ,
  IS_24HOUR = 1 << 1 ,
  IS_BINARY = 1 << 2 ,
  INT_UPDATE = 1 << 4 ,
  INT_ALARM = 1 << 5 ,
  INT_PERIODIC = 1 << 6 ,
  DO_UPDATE = 1 << 7
}
 
enum  StatusC {
  IS_INT_UPDATE = 1 << 4 ,
  IS_INT_ALARM = 1 << 5 ,
  IS_INT_PERIODIC = 1 << 6 ,
  IS_INT_REQUEST = 1 << 7
}
 

Functions

static uint8_t readRegister (enum CMOS::Register reg, bool is_binary)
 
DateTime readDateTime (bool is_binary, bool is_24_Hour)
 

Enumeration Type Documentation

◆ StatusA

enum StatusA
Enumerator
RATE_SELECT 

rate selection frequency

FREQ_DIVIDE 

frequency divider for periodic int

IS_UPDATEING 

currently updating

◆ StatusB

enum StatusB
Enumerator
IS_DST 

Daylight saving time if set.

IS_24HOUR 

24 or 12 Hour mode

IS_BINARY 

BCD or Binary.

INT_UPDATE 

Time Update Ended Interrupt.

INT_ALARM 

Alarm Interrupt.

INT_PERIODIC 

Periodic Timer Interrupt.

DO_UPDATE 

Periodically update Timer.

◆ StatusC

enum StatusC
Enumerator
IS_INT_UPDATE 

Time Update Ended Interrupt.

IS_INT_ALARM 

Alarm Interrupt.

IS_INT_PERIODIC 

Periodic Timer Interrupt.

IS_INT_REQUEST 

Interrupt request.

Function Documentation

◆ readRegister()

static uint8_t readRegister ( enum CMOS::Register  reg,
bool  is_binary 
)
static

◆ readDateTime()

DateTime readDateTime ( bool  is_binary,
bool  is_24_Hour 
)