3 unstable releases
new 0.4.1 | Nov 10, 2024 |
---|---|
0.4.0 | Nov 10, 2024 |
0.3.0 | Nov 10, 2024 |
#987 in Hardware support
291 downloads per month
35KB
690 lines
ds1302-rs
DS1302 real time clock-calendar platform agnostic driver
This Rust library provides an interface for interacting with ds1302 RTC using the rp2040-hal or rp235x-hal.
About
The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It
communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds,
minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for
months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or
12-hour format with an AM/PM indicator. The chip driver is based on embedded-hal
traits.
Datasheet: DS1302
DS1302 RTC Board
Crate features
rp2040
- use to enabled raspberry pico supportrp2350
- use to enabled raspberry pico2 support (default features)
Examples
https://github.com/sndnvaps/ds1302-drv/tree/main/examples/pico2-display-rtc https://github.com/sndnvaps/ds1302-drv/tree/main/examples/pico-display-rtc
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~0.7–4.5MB
~80K SLoC