#include "devices/rtc.h"
#include <stdio.h>
#include "threads/io.h"
Go to the source code of this file.
Defines | |
#define | CMOS_REG_SET 0x70 |
#define | CMOS_REG_IO 0x71 |
#define | RTC_REG_SEC 0 |
#define | RTC_REG_MIN 2 |
#define | RTC_REG_HOUR 4 |
#define | RTC_REG_MDAY 7 |
#define | RTC_REG_MON 8 |
#define | RTC_REG_YEAR 9 |
#define | RTC_REG_A 0x0a |
#define | RTC_REG_B 0x0b |
#define | RTC_REG_C 0x0c |
#define | RTC_REG_D 0x0d |
#define | RTCSA_UIP 0x80 |
#define | RTCSB_SET 0x80 |
#define | RTCSB_DM 0x04 |
#define | RTCSB_24HR 0x02 |
Functions | |
static int | bcd_to_bin (uint8_t) |
static uint8_t | cmos_read (uint8_t index) |
time_t | rtc_get_time (void) |
#define CMOS_REG_IO 0x71 |
#define CMOS_REG_SET 0x70 |
#define RTC_REG_HOUR 4 |
#define RTC_REG_MDAY 7 |
#define RTC_REG_MIN 2 |
#define RTC_REG_MON 8 |
#define RTC_REG_SEC 0 |
#define RTC_REG_YEAR 9 |
static int bcd_to_bin | ( | uint8_t | x | ) | [static] |
Definition at line 109 of file rtc.c.
References CMOS_REG_IO, CMOS_REG_SET, inb(), and outb().
Referenced by rtc_get_time().
time_t rtc_get_time | ( | void | ) |
Definition at line 44 of file rtc.c.
References bcd_to_bin(), cmos_read(), RTC_REG_HOUR, RTC_REG_MDAY, RTC_REG_MIN, RTC_REG_MON, RTC_REG_SEC, and RTC_REG_YEAR.
Referenced by parse_options().