ds1302-rs

crates.io badge docs.rs badge

DS1302 real time clock-calendar platform agnostic driver

# About

DS1302 is a real time clock/calendar chip, which communicates via SPI interface. The device provides seconds, minutes, hours, day, date, month, and year information. The driver is based on [embedded-hal] traits.

Datasheet: DS1302

DS1302 RTC Board - Waveshare

## Hardware requirements - Importand: SPI frame format with LSB transmitted first! - SPI speed less than 2 MHz - CPOL: CK to 0 when idle, CPHA: the first clock transition is the first data capture edge - Default 8-bit data frame format is selected for transmission/reception

Features:

TODO:

Examples

https://github.com/Nekspire/ds1302-rs/tree/master/examples

This crate uses probe-run to run the examples.

To build examples type:

cargo build --examples or cargo build --examples --release

To run examples type:

cargo run --example <example name> or cargo run --example <example name> --release

The output should be like this:

Running `probe-run --chip STM32F103C8 target/thumbv7m-none-eabi/debug/examples/bluepill_ssd1306` (HOST) INFO flashing program (36.32 KiB) (HOST) INFO success!

## License

Copyright © 2021 Nekspire

Dual licensed under your choice of either of:

Thanks for contribution!