Skip to content

Commit a9c3ea3

Browse files
committed
Code cleanup. Removed TODOs.
1 parent 5eacdce commit a9c3ea3

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

adafruit_atecc/adafruit_atecc.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
6262
_I2C_ADDR = 0x60
6363
_REG_ATECC_ADDR = _convert_i2c_addr_to_atecc_addr(i2c_addr=_I2C_ADDR)
6464

65-
# TODO: Verify that _REG_ATECC_ADDR is still 0xC0
66-
# TODO: Remove assertion test afterwards
67-
assert _REG_ATECC_ADDR == 0xC0
68-
6965
_REG_ATECC_DEVICE_ADDR = _REG_ATECC_ADDR >> 1
7066

7167
# Version Registers
@@ -100,15 +96,6 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
10096
OP_WRITE: const(26),
10197
}
10298

103-
CFG_TLS = b"\x01#\x00\x00\x00\x00P\x00\x00\x00\x00\x00\x00\xc0q\x00 \
104-
\xc0\x00U\x00\x83 \x87 \x87 \x87/\x87/\x8f\x8f\x9f\x8f\xaf \
105-
\x8f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \
106-
\xaf\x8f\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00 \
107-
\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \
108-
\xff\xff\xff\xff\x00\x00UU\xff\xff\x00\x00\x00\x00\x00\x003 \
109-
\x003\x003\x003\x003\x00\x1c\x00\x1c\x00\x1c\x00<\x00<\x00<\x00< \
110-
\x00<\x00<\x00<\x00\x1c\x00"
111-
11299
"""
113100
Configuration Zone Bytes
114101
@@ -151,12 +138,6 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
151138
)
152139
)
153140

154-
# TODO: Verify that both representations are identical
155-
# TODO: Decide whether to use alternate representation of config bytes
156-
# TODO: Remove assertion tests
157-
assert CFG_TLS == CFG_TLS_HEX
158-
assert bytearray(CFG_TLS)[16] == 0x20
159-
160141
# Convert I2C address to config byte 16 and update CFG_TLS
161142
_CFG_BYTES = bytearray(CFG_TLS)
162143
_CFG_BYTE_16 = hex(_I2C_ADDR << 1)

0 commit comments

Comments
 (0)