Better interface "ReadTime" instead of "Time" for DS1307

This commit is contained in:
Daniel Esteban
2020-12-21 16:40:56 +01:00
committed by Ron Evans
parent b6aa674b2a
commit c338348d2b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ func (d *Device) SetTime(t time.Time) error {
return err
}
// Time returns the time and date
func (d *Device) Time() (time.Time, error) {
// ReadTime returns the date and time
func (d *Device) ReadTime() (time.Time, error) {
data := make([]byte, 8)
err := d.bus.ReadRegister(d.Address, uint8(TimeDate), data)
if err != nil {