Skip to content

Commit

Permalink
Merge pull request #20 from caternuson/iss15
Browse files Browse the repository at this point in the history
Remove verification check
  • Loading branch information
caternuson authored Nov 15, 2019
2 parents ed71b40 + 65c458d commit 1bf2707
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions adafruit_ds3231.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,6 @@ class DS3231:
def __init__(self, i2c):
self.i2c_device = I2CDevice(i2c, 0x68)

# Try and verify this is the RTC we expect by checking the rate select
# control bits which are 1 on reset and shouldn't ever be changed.
buf = bytearray(2)
buf[0] = 0x0e
with self.i2c_device as i2c_device:
i2c_device.write_then_readinto(buf, buf, out_end=1, in_start=1)

if (buf[1] & 0b00011000) != 0b00011000:
raise ValueError("Unable to find DS3231 at i2c address 0x68.")

@property
def datetime(self):
"""Gets the current date and time or sets the current date and time
Expand Down

0 comments on commit 1bf2707

Please sign in to comment.