|
IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
|
RTC clock driver. More...
#include <arch/io.hpp>#include <drivers/clock/rtc.hpp>#include <klib/kFlags.hpp>#include <klib/kPrint.hpp>
Go to the source code of this file.
Namespaces | |
| namespace | igros |
| IgrOS kernel: common types and literals. | |
| namespace | igros::arch |
| Architecture-independent interface: drivers and aliases of current architecture types. | |
| namespace | igros::arch::anonymous_namespace{rtc.cpp} |
| Anonymous namespace. | |
Enumerations | |
| enum class | igros::arch::anonymous_namespace{rtc.cpp}::RTC_A : igros_byte_t { igros::arch::anonymous_namespace{rtc.cpp}::UPDATING = 0x80_u8 } |
| Register A bits. More... | |
| enum class | igros::arch::anonymous_namespace{rtc.cpp}::RTC_B : igros_byte_t { igros::arch::anonymous_namespace{rtc.cpp}::TIME_24 = 0x02_u8 , igros::arch::anonymous_namespace{rtc.cpp}::BINARY = 0x04_u8 } |
| Register B bits. More... | |
Functions | |
| auto | igros::arch::clockFromRTC (const rtcDateTime_t &rtcDateTime, const igros_dword_t century) noexcept -> clockDateTime_t |
| Clock from RTC conversion. | |
| auto | igros::arch::rtcRead (const igros_byte_t cmd) noexcept -> igros_byte_t |
| Read CMOS register. | |
| auto | igros::arch::rtcReadDate () noexcept -> rtcDate_t |
| Read CMOS date. | |
| auto | igros::arch::rtcReadTime () noexcept -> rtcTime_t |
| Read CMOS time. | |
| auto | igros::arch::rtcReadDateTime () noexcept -> rtcDateTime_t |
| Read CMOS date/time. | |
| auto | igros::arch::rtcFromBCD (const igros_byte_t bcd) noexcept -> igros_byte_t |
| Convert BCD to binary. | |
| void | igros::arch::rtcDateFromBCD (rtcDate_t &date) noexcept |
| Convert BCD date to binary. | |
| void | igros::arch::rtcTimeFromBCD (rtcTime_t &time) noexcept |
| Convert BCD time to binary. | |
| void | igros::arch::rtcDateTimeFromBCD (rtcDateTime_t &dateTime) noexcept |
| Convert BCD date/time to binary. | |
| auto | igros::arch::clockGetCurrentDateTime () noexcept -> clockDateTime_t |
| Get current date/time. | |
| auto | igros::arch::rtcSetup () noexcept -> bool |
| Setup RTC function. | |
Variables | |
| constexpr auto | igros::arch::CMOS_COMMAND {static_cast<port_t>(0x0070_u16)} |
| Register select port. | |
| constexpr auto | igros::arch::CMOS_DATA {static_cast<port_t>(CMOS_COMMAND + 1_u16)} |
| Data port. | |
| constexpr auto | igros::arch::RTC_YEAR {0x09_u8} |
| Year register. | |
| constexpr auto | igros::arch::RTC_MONTH {0x08_u8} |
| Month register. | |
| constexpr auto | igros::arch::RTC_DAY {0x07_u8} |
| Day of month register. | |
| constexpr auto | igros::arch::RTC_WEEKDAY {0x06_u8} |
| Day of week register. | |
| constexpr auto | igros::arch::RTC_HOUR {0x04_u8} |
| Hour register. | |
| constexpr auto | igros::arch::RTC_MINUTE {0x02_u8} |
| Minute register. | |
| constexpr auto | igros::arch::RTC_SECOND {0x00_u8} |
| Second register. | |
| constexpr auto | igros::arch::RTC_CENTURY {0x32_u8} |
| Century register (ACPI FADT default). | |
| constexpr auto | igros::arch::RTC_REGISTER_A {0x0A_u8} |
| Status register A. | |
| constexpr auto | igros::arch::RTC_REGISTER_B {0x0B_u8} |
| Status register B. | |
RTC clock driver.
Definition in file rtc.cpp.