Closed dastels closed 3 years ago
There are two calls to bytearray.fromhex in adafruit_atecc.py but bytearray doesn't support/include a fromhex method in CircuitPython.
`CFG_TLS = bytes( bytearray.fromhex( "01 23 00 00 00 00 50 00 00 00 00 00 00 c0 71 00" "20 20 20 20 20 20 20 20 20 20 20 20 20 c0 00 55" "00 83 20 87 20 87 20 87 2f 87 2f 8f 8f 9f 8f af" "20 20 20 20 20 20 20 20 20 20 20 20 20 8f 00 00" "00 00 00 00 00 00 00 00 00 00 00 00 20 20 20 20" "20 20 20 20 20 20 20 20 20 af 8f ff ff ff ff 00" "00 00 00 ff ff ff ff 00 20 20 20 20 20 20 20 20" "20 20 20 20 20 00 00 00 ff ff ff ff ff ff ff ff" "ff ff ff ff 20 20 20 20 20 20 20 20 20 20 20 20" "20 ff ff ff ff 00 00 55 55 ff ff 00 00 00 00 00" "00 33 20 20 20 20 20 20 20 20 20 20 20 20 20 00" "33 00 33 00 33 00 33 00 1c 00 1c 00 1c 00 3c 00" "3c 00 3c 00 3c 20 20 20 20 20 20 20 20 20 20 20" "20 20 00 3c 00 3c 00 3c 00 1c 00" ) )
_CFG_BYTES_LIST = list(bytearray(CFG_TLS)) _CFG_BYTE_16 = bytes(bytearray.fromhex(hex(_I2C_ADDR << 1).replace("0x", "")))`
@dastels ok please submit a PR
This should be fixed with the latest commit.
There are two calls to bytearray.fromhex in adafruit_atecc.py but bytearray doesn't support/include a fromhex method in CircuitPython.
`CFG_TLS = bytes( bytearray.fromhex( "01 23 00 00 00 00 50 00 00 00 00 00 00 c0 71 00" "20 20 20 20 20 20 20 20 20 20 20 20 20 c0 00 55" "00 83 20 87 20 87 20 87 2f 87 2f 8f 8f 9f 8f af" "20 20 20 20 20 20 20 20 20 20 20 20 20 8f 00 00" "00 00 00 00 00 00 00 00 00 00 00 00 20 20 20 20" "20 20 20 20 20 20 20 20 20 af 8f ff ff ff ff 00" "00 00 00 ff ff ff ff 00 20 20 20 20 20 20 20 20" "20 20 20 20 20 00 00 00 ff ff ff ff ff ff ff ff" "ff ff ff ff 20 20 20 20 20 20 20 20 20 20 20 20" "20 ff ff ff ff 00 00 55 55 ff ff 00 00 00 00 00" "00 33 20 20 20 20 20 20 20 20 20 20 20 20 20 00" "33 00 33 00 33 00 33 00 1c 00 1c 00 1c 00 3c 00" "3c 00 3c 00 3c 20 20 20 20 20 20 20 20 20 20 20" "20 20 00 3c 00 3c 00 3c 00 1c 00" ) )
_CFG_BYTES_LIST = list(bytearray(CFG_TLS)) _CFG_BYTE_16 = bytes(bytearray.fromhex(hex(_I2C_ADDR << 1).replace("0x", "")))`