atecc508a v0.2.1 ATECC508A.Request 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
Create a write message
Link to this section Types
Link to this type
transaction()
View Sourcetransaction() :: {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.
Link to this section Functions
Link to this function
genkey(transport, key_id, create_key?)
View Sourcegenkey(ATECC508A.Transport.t(), slot(), boolean()) :: {:ok, binary()} | {:error, atom()}
Create a genkey request message.
Link to this function
lock_slot(transport, slot)
View Sourcelock_slot(ATECC508A.Transport.t(), slot()) :: :ok | {:error, atom()}
Lock a specific slot.
Link to this function
lock_zone(transport, zone, zone_crc)
View Sourcelock_zone(ATECC508A.Transport.t(), zone(), ATECC508A.crc16()) :: :ok | {:error, atom()}
Create a message to lock a zone.
Link to this function
random(transport)
View Sourcerandom(ATECC508A.Transport.t()) :: {:ok, binary()} | {:error, atom()}
Request a random number.
Link to this function
read_zone(transport, zone, addr, length)
View Sourceread_zone(ATECC508A.Transport.t(), zone(), addr(), access_size()) :: {:ok, binary()} | {:error, atom()}
Create a read message
Link to this function
write_zone(transport, zone, addr, data)
View Sourcewrite_zone(ATECC508A.Transport.t(), zone(), addr(), access_data()) :: :ok | {:error, atom()}
Create a write message