Skip to content

fixing docs API section and resolve sphinx errors to get docs rendering #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: