Skip to content

Commit

Permalink
fixing docs API section and resolve sphinx errors to get docs rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed May 1, 2023
1 parent 7697a02 commit e1a6a65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
26 changes: 18 additions & 8 deletions adafruit_atecc/adafruit_atecc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
* Adafruit CircuitPython firmware for the supported boards:
https://github.com/adafruit/circuitpython/releases
* Adafruit Bus Device library:
* Adafruit Bus Device library:
https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit binascii library:
* Adafruit binascii library:
https://github.com/adafruit/Adafruit_CircuitPython_binascii
"""

import time
from struct import pack

Expand Down Expand Up @@ -106,6 +107,7 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
OP_WRITE: const(26),
}

# pylint: disable=line-too-long
"""
Configuration Zone Bytes
Expand All @@ -122,13 +124,21 @@ def _convert_i2c_addr_to_atecc_addr(i2c_addr=0x60):
I2C Config
HEX DEC BIN Description
Byte 14: C0 192 1100 0000
^xxx xxxx Bit 0 (MSB): 0:Single Wire, 1:I2C; Bit 1-7: Set by Microchip
Byte 16: C0 192 1100 0000 Default 7 bit I2C Address: 0xC0>>1: 0x60 ATECC608A-MAHDA
Byte 16: 6A 106 0110 1010 Default 7 bit I2C Address: 0x6A>>1: 0x35 ATECC608A-TNGTLS
Byte 16: 20 32 0010 0000 Default 7 bit I2C Address: 0x20>>1: 0x10 ATECC608A-UNKNOWN
+------+-------+---------+-------------+---------------------------------------------------------------+
| HEX | DEC | BIN | Description |
+======+=======+=========+=============+===============================================================+
| Byte 14: C0 | 192 | 1100 0000 | |
| | | ^xxx xxxx | Bit 0 (MSB): 0:Single Wire, 1:I2C; Bit 1-7: Set by Microchip |
+--------------+---------+-------------+---------------------------------------------------------------+
| Byte 16: C0 | 192 | 1100 0000 | Default 7 bit I2C Address: 0xC0>>1: 0x60 ATECC608A-MAHDA |
+--------------+---------+-------------+---------------------------------------------------------------+
| Byte 16: 6A | 106 | 0110 1010 | Default 7 bit I2C Address: 0x6A>>1: 0x35 ATECC608A-TNGTLS |
+--------------+---------+-------------+---------------------------------------------------------------+
| Byte 16: 20 | 32 | 0010 0000 | Default 7 bit I2C Address: 0x20>>1: 0x10 ATECC608A-UNKNOWN |
+--------------+---------+-------------+---------------------------------------------------------------+
"""

CFG_TLS = bytes(
bytearray(
unhexlify(
Expand Down
2 changes: 1 addition & 1 deletion adafruit_atecc/adafruit_atecc_asn1.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""
`atecc_asn1`
`adafruit_atecc_asn1`
================================================================================
ASN.1 Utilities for the Adafruit_ATECC Module.
Expand Down
9 changes: 9 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ API
.. automodule:: adafruit_atecc
:members:

.. automodule:: adafruit_atecc.adafruit_atecc
:members:

.. automodule:: adafruit_atecc.adafruit_atecc_asn1
:members:

.. automodule:: adafruit_atecc.adafruit_atecc_cert_util
:members:

0 comments on commit e1a6a65

Please sign in to comment.