mirror of https://github.com/eldruin/ds323x-rs
Improve documentation of default state
parent
0f866f8145
commit
46aff07f81
|
@ -29,7 +29,7 @@ where
|
||||||
self.iface.i2c
|
self.iface.i2c
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable the 32kHz output when battery-powered.
|
/// Enable the 32kHz output when battery-powered. (enabled per default)
|
||||||
///
|
///
|
||||||
/// Additionally, the 32kHz output needs to be enabled. See
|
/// Additionally, the 32kHz output needs to be enabled. See
|
||||||
/// [`enable_32khz_output`](#method.enable_32khz_output).
|
/// [`enable_32khz_output`](#method.enable_32khz_output).
|
||||||
|
|
|
@ -30,7 +30,7 @@ where
|
||||||
(self.iface.spi, self.iface.cs)
|
(self.iface.spi, self.iface.cs)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable the 32kHz output when battery-powered.
|
/// Enable the 32kHz output when battery-powered. (enabled per default)
|
||||||
///
|
///
|
||||||
/// Additionally, the 32kHz output needs to be enabled. See
|
/// Additionally, the 32kHz output needs to be enabled. See
|
||||||
/// [`enable_32khz_output`](#method.enable_32khz_output).
|
/// [`enable_32khz_output`](#method.enable_32khz_output).
|
||||||
|
|
|
@ -8,7 +8,7 @@ impl<DI, IC, E> Ds323x<DI, IC>
|
||||||
where
|
where
|
||||||
DI: ReadData<Error = E> + WriteData<Error = E>
|
DI: ReadData<Error = E> + WriteData<Error = E>
|
||||||
{
|
{
|
||||||
/// Enable the oscillator (set the clock running).
|
/// Enable the oscillator (set the clock running) (default).
|
||||||
pub fn enable(&mut self) -> Result<(), Error<E>> {
|
pub fn enable(&mut self) -> Result<(), Error<E>> {
|
||||||
let control = self.control;
|
let control = self.control;
|
||||||
self.write_control(control & !BitFlags::EOSC)
|
self.write_control(control & !BitFlags::EOSC)
|
||||||
|
@ -32,7 +32,7 @@ where
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Enable the 32kHz output.
|
/// Enable the 32kHz output. (enabled per default)
|
||||||
pub fn enable_32khz_output(&mut self) -> Result<(), Error<E>> {
|
pub fn enable_32khz_output(&mut self) -> Result<(), Error<E>> {
|
||||||
let status = self.status | BitFlags::EN32KHZ;
|
let status = self.status | BitFlags::EN32KHZ;
|
||||||
self.write_status_without_clearing_alarm(status)
|
self.write_status_without_clearing_alarm(status)
|
||||||
|
@ -61,7 +61,7 @@ where
|
||||||
self.write_control(control | BitFlags::INTCN)
|
self.write_control(control | BitFlags::INTCN)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the interrupt/square-wave output to be used as square-wave output.
|
/// Set the interrupt/square-wave output to be used as square-wave output. (default)
|
||||||
pub fn use_int_sqw_output_as_square_wave(&mut self) -> Result<(), Error<E>> {
|
pub fn use_int_sqw_output_as_square_wave(&mut self) -> Result<(), Error<E>> {
|
||||||
let control = self.control;
|
let control = self.control;
|
||||||
self.write_control(control & !BitFlags::INTCN)
|
self.write_control(control & !BitFlags::INTCN)
|
||||||
|
|
|
@ -399,7 +399,7 @@ pub enum Error<E> {
|
||||||
/// Square-wave output frequency
|
/// Square-wave output frequency
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum SqWFreq {
|
pub enum SqWFreq {
|
||||||
/// 1 Hz
|
/// 1 Hz (default)
|
||||||
_1Hz,
|
_1Hz,
|
||||||
/// 1.024 Hz
|
/// 1.024 Hz
|
||||||
_1_024Hz,
|
_1_024Hz,
|
||||||
|
@ -414,7 +414,7 @@ pub enum SqWFreq {
|
||||||
/// This is only available on the DS3232 and DS3234 devices.
|
/// This is only available on the DS3232 and DS3234 devices.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum TempConvRate {
|
pub enum TempConvRate {
|
||||||
/// Once every 64 seconds
|
/// Once every 64 seconds (default)
|
||||||
_64s,
|
_64s,
|
||||||
/// Once every 128 seconds
|
/// Once every 128 seconds
|
||||||
_128s,
|
_128s,
|
||||||
|
|
Loading…
Reference in New Issue