atecc508a v0.2.0 ATECC508A.Transport behaviour
ATECC508A transport behaviour
Link to this section Summary
Functions
Check whether the ATECC508A is present
Send a request to the ATECC508A and wait for a response
Link to this section Types
Link to this section Functions
Link to this function
detected?(arg)
Check whether the ATECC508A is present
The transport implementation should do the minimum work to figure out whether an ATECC508A is actually present. This is called by users who are unsure whether the device has an ATECC508A and want to check before sending requests to it.
Link to this function
request(arg, payload, timeout, response_payload_len)
request(arg, payload, timeout, response_payload_len)
request(t(), binary(), non_neg_integer(), non_neg_integer()) ::
{:ok, binary()} | {:error, atom()}
request(t(), binary(), non_neg_integer(), non_neg_integer()) :: {:ok, binary()} | {:error, atom()}
Send a request to the ATECC508A and wait for a response
This is the raw request. The transport implementation takes care of adding and removing CRCs.
Link to this section Callbacks
Link to this callback
detected?(arg)
Link to this callback
init(args)
Link to this callback
request(id, payload, timeout, response_payload_len)
request(id, payload, timeout, response_payload_len)
request(
id :: any(),
payload :: binary(),
timeout :: non_neg_integer(),
response_payload_len :: non_neg_integer()
) :: {:ok, binary()} | {:error, atom()}
request( id :: any(), payload :: binary(), timeout :: non_neg_integer(), response_payload_len :: non_neg_integer() ) :: {:ok, binary()} | {:error, atom()}