Documentation ¶
Overview ¶
Package pcf8523 implements a driver for the PCF8523 CMOS Real-Time Clock (RTC)
Datasheet: https://www.nxp.com/docs/en/data-sheet/PCF8523.pdf
Index ¶
Constants ¶
View Source
const DefaultAddress = 0x68
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Address uint8 // contains filtered or unexported fields }
func (*Device) Reset ¶
Reset resets the device according to the datasheet section 8.3 This does not wipe the time registers, but resets control registers.
func (*Device) SetPowerManagement ¶
func (d *Device) SetPowerManagement(b PowerManagement) error
SetPowerManagement configures how the device makes use of the backup battery, see datasheet section 8.5
type PowerManagement ¶
type PowerManagement byte
datasheet 8.5 Power management functions, table 11
const ( PowerManagement_SwitchOver_ModeStandard_LowDetection PowerManagement = 0b000 PowerManagement_SwitchOver_ModeDirect_LowDetection PowerManagement = 0b001 PowerManagement_VddOnly_LowDetection PowerManagement = 0b010 PowerManagement_SwitchOver_ModeStandard PowerManagement = 0b100 PowerManagement_SwitchOver_ModeDirect PowerManagement = 0b101 PowerManagement_VddOnly PowerManagement = 0b101 )
Click to show internal directories.
Click to hide internal directories.