12 return (bcd >> 4) * 10 + (bcd & 0x0F);
35 .tm_year = year - 1900,
static uint8_t port_inb(uint16_t port)
static void port_outb(uint16_t port, uint8_t val)
#define CMOS_DATA
CMOS data port.
void rtc_read(struct tm *time)
Reads the current time from the RTC.
#define CMOS_ADDRESS
CMOS address port.
#define NULL
Pointer error value.
static uint8_t bcd_to_bin(uint8_t bcd)
static uint8_t cmos_read(uint8_t reg)
_PUBLIC time_t time(time_t *timer)