Struct ds1302::DS1302 [−][src]
pub struct DS1302<SPI, CS, CLK, const TIMER_HZ: u32> where
CLK: Delay<TIMER_HZ>, { /* fields omitted */ }
Expand description
DS1302 RTCC driver
Implementations
Creates new instance DS1302 RTC
Delete DS1302 RTC instance and return SPI interface and cs PIN
Return current information about seconds
Return current information about minutes
Return current information about hours
Return current information about date
Return current information about month
Return current information about year
Return current information about day of the week
Return current information about hours, minutes and seconds
Return current information about date, day of the week, month and year
Return current information date and time
Set seconds to defined value
Set minutes to defined value
Set day of the week to defined value
Set clock to defined values
Set calendar to defined values
pub fn set_clock_calendar(
&mut self,
clock: Clock,
calendar: Calendar
) -> Result<(), Ds1302Error>
pub fn set_clock_calendar(
&mut self,
clock: Clock,
calendar: Calendar
) -> Result<(), Ds1302Error>
Set clock and calendar to defined values
Switch between 12-hour (AM/PM) and 24-hour mode
Enable trickle-charge. Ds (diode drop voltage 0.7 or 1.4) Rs (2k or 4k or 8k) The maximum current = (Vcc - Ds) / Rs.
Disable trickle-charge.
Get the configuration of the trickle-charge register.
Whether to enable charging.
Read DS1302 internal RAM. The static RAM is 31 x 8 bytes, index 0..=30.
Write DS1302 internal RAM. The static RAM is 31 x 8 bytes, index 0..=31.
Read DS1302 internal RAM burst mode. Start at 0 index. The length is determined by the buf, but cannot exceed 31.
Write DS1302 internal RAM burst mode. Start at 0 index. The length is determined by the buf, but cannot exceed 31.