cmos 0.1.1

A utility to read, write CMOS and RTC data. Standard library not required.
cmos-0.1.1 doesn't have any documentation.

CMOS

A utility to read, write CMOS and RTC data. Standard library not required.

Linux build status Coverage Status crates.io

Requirements

Using the library (only tested on x86, nightly compiler required)

Add the crate to your project

# Cargo.toml
cmos = "0.1.1"

Examples

To read the RTC using the century register.

use cmos::{CMOS, CMOSCenturyHandler};
// Create a CMOS object (unsafe due to the use of port I/O)
let mut cmos = unsafe { CMOS::new() };
// Read the rtc date time using this year
let rtc = cmos.read_rtc(CMOSCenturyHandler::CenturyRegister(32));

To read the RTC using the current year.

use cmos::{CMOS, CMOSCenturyHandler};
// Create a CMOS object (unsafe due to the use of port I/O)
let mut cmos = unsafe { CMOS::new() };
// Read the rtc date time using this year
let rtc = cmos.read_rtc(CMOSCenturyHandler::CurrentYear(2018));

Check the docs for more information.

Contributing

Feel free to contribute what you want. Just send in a pull request!

License

MIT