ATECC508A.Request (atecc508a v0.3.0) View Source
This module knows how to send requests to the ATECC508A.
Link to this section Summary
Types
A transaction is a tuple with the binary to send, how long to wait in milliseconds for the response and the size of payload to expect to read for the response.
Functions
Create a genkey request message.
Lock a specific slot.
Create a message to lock a zone.
Request a random number.
Create a read message
Sign a SHA256 digest.
Create a write message
Link to this section Types
Specs
access_data() :: <<_::32>> | <<_::256>>
Specs
access_size() :: 4 | 32
Specs
addr() :: 0..65535
Specs
block() :: 0..3
Specs
offset() :: 0..7
Specs
slot() :: 0..15
Specs
transaction() :: {binary(), non_neg_integer(), non_neg_integer()}
A transaction is a tuple with the binary to send, how long to wait in milliseconds for the response and the size of payload to expect to read for the response.
Specs
zone() :: :config | :otp | :data
Link to this section Functions
Specs
genkey(ATECC508A.Transport.t(), slot(), boolean()) :: {:ok, binary()} | {:error, atom()}
Create a genkey request message.
Specs
lock_slot(ATECC508A.Transport.t(), slot()) :: :ok | {:error, atom()}
Lock a specific slot.
Specs
lock_zone(ATECC508A.Transport.t(), zone(), ATECC508A.crc16()) :: :ok | {:error, atom()}
Create a message to lock a zone.
Specs
random(ATECC508A.Transport.t()) :: {:ok, binary()} | {:error, atom()}
Request a random number.
Specs
read_zone(ATECC508A.Transport.t(), zone(), addr(), access_size()) :: {:ok, binary()} | {:error, atom()}
Create a read message
Specs
sign_digest(ATECC508A.Transport.t(), slot(), binary()) :: {:ok, binary()} | {:error, atom()}
Sign a SHA256 digest.
Specs
to_config_addr(0..127) :: addr()
Specs
Specs
Specs
Specs
to_otp_addr(0..127) :: addr()
Specs
Specs
write_zone(ATECC508A.Transport.t(), zone(), addr(), access_data()) :: :ok | {:error, atom()}
Create a write message