rtc

package
v0.0.0-...-328052d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DS3231

type DS3231 struct {
	// contains filtered or unexported fields
}

func NewDS3231

func NewDS3231(rw io.ReadWriter) *DS3231

func (*DS3231) Alarm1

func (rtc *DS3231) Alarm1() (*DS3231Alarm, error)

func (*DS3231) Alarm2

func (rtc *DS3231) Alarm2() (*DS3231Alarm, error)

func (*DS3231) Now

func (rtc *DS3231) Now() (time.Time, error)

func (*DS3231) SetAlarm1

func (rtc *DS3231) SetAlarm1(a DS3231Alarm) error

func (*DS3231) SetAlarm2

func (rtc *DS3231) SetAlarm2(a DS3231Alarm) error

func (*DS3231) SetTime

func (rtc *DS3231) SetTime(t time.Time, use12Hour bool) error

type DS3231Alarm

type DS3231Alarm struct {
	Seconds int
	Minutes int
	Hours   int
	IsPM    bool // Only valid if Use12Hour is true.
	Day     int

	// UseWeekday indicates Day matches the day of the week.
	UseWeekday bool

	// Use12Hour indicates the hour is in 12-hour format.
	Use12Hour bool

	IgnoreSeconds bool // A1M1
	IgnoreMinutes bool // A1M2,A2M2
	IgnoreHours   bool // A1M3,A2M3
	IgnoreDay     bool // A1M4,A2M4
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL