bq32002

Crates.iobq32002
lib.rsbq32002
version0.1.2
created_at2026-01-06 16:36:45.772711+00
updated_at2026-01-07 09:43:29.527815+00
descriptionA no_std driver for the BQ32002 Real-Time Clock (RTC)
homepage
repositoryhttps://github.com/kimbotto/bq32002-rs
max_upload_size
id2026254
size32,225
Mirko Bottarelli (kimbotto)

documentation

README

bq32002

A no_std driver for the BQ32002 Real-Time Clock (RTC) written in Rust.

The BQ32002 is an I2C real-time clock with:

  • Time and calendar (seconds, minutes, hours, day, date, month, year, century)
  • Automatic leap year compensation
  • Century flag
  • Trickle charge circuit for backup battery/capacitor
  • I2C address: 0x68

Usage

This driver uses embedded-hal and embedded-hal-async traits.

// Example with embassy
use bq32002::{BQ32002, DateTime};

// ... initialize I2C ...

let mut rtc = BQ32002::new(i2c, 0x68);
let dt = rtc.read_datetime().await.unwrap();
println!("Current time: {:?}", dt);

License

MIT license (http://opensource.org/licenses/MIT)

Commit count: 5

cargo fmt