#rtc #rp2040 #rp2350 #no-std #ds1302

no-std ds1302-drv

This Rust library provides an interface for interacting with ds1302 RTC using the rp2040-hal or rp235x-hal

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

Download history 291/week @ 2024-11-07

291 downloads per month

MIT/Apache

35KB
690 lines

ds1302-rs

crates.io badge docs.rs badge

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

DS1302 RTC Board

Crate features

  • rp2040 - use to enabled raspberry pico support
  • rp2350 - 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

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