PatchworkOS
Loading...
Searching...
No Matches
rtc.c File Reference

Go to the source code of this file.

Functions

static uint8_t cmos_read (uint8_t reg)
 
static uint8_t bcd_to_bin (uint8_t bcd)
 
void rtc_read (struct tm *time)
 Reads the current time from the RTC.
 

Function Documentation

◆ bcd_to_bin()

static uint8_t bcd_to_bin ( uint8_t  bcd)
static

Definition at line 10 of file rtc.c.

Referenced by rtc_read().

◆ cmos_read()

static uint8_t cmos_read ( uint8_t  reg)
static

Definition at line 4 of file rtc.c.

References CMOS_ADDRESS, CMOS_DATA, port_inb(), and port_outb().

Referenced by rtc_read().