embassy-rp 0.10.0

Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Shared datetime types for RTC and other time-keeping peripherals.
//!
//! This module provides DateTime and DayOfWeek types that can be used across
//! multiple peripherals in embassy-rp. The implementation can be backed by
//! the `chrono` crate (when the `chrono` feature is enabled) or use a
//! standalone no-dependencies implementation.

#[cfg_attr(feature = "chrono", path = "datetime_chrono.rs")]
#[cfg_attr(not(feature = "chrono"), path = "datetime_no_deps.rs")]
mod datetime;

pub(crate) mod epoch;

pub use self::datetime::{DateTime, DayOfWeek, Error};
#[cfg(all(feature = "chrono", feature = "_rp235x"))]
pub use self::datetime::{from_timestamp_millis, timestamp_millis};