nerves_key v0.5.2 NervesKey.Config View Source

This is a high level interface to provisioning and using the NervesKey or any ATECC508A/608A that can be configured similarly.

Link to this section Summary

Functions

Check if the chip's configuration is compatible with the NervesKey. This only checks what's important for the NervesKey.

Configure an ATECC508A or ATECC608A as a NervesKey.

Check whether the ATECC508A has been configured or not.

Helper for getting information about the ATECC module.

Helper for getting the ATECC508A's serial number.

Link to this section Functions

Link to this function

config_compatible?(transport)

View Source
config_compatible?(ATECC508A.Transport.t()) ::
  {:error, atom()} | {:ok, boolean()}

Check if the chip's configuration is compatible with the NervesKey. This only checks what's important for the NervesKey.

Link to this function

configure(transport)

View Source
configure(ATECC508A.Transport.t()) :: {:error, atom()} | :ok

Configure an ATECC508A or ATECC608A as a NervesKey.

This can only be called once. Subsequent calls will fail.

Link to this function

configured?(transport)

View Source
configured?(ATECC508A.Transport.t()) :: {:error, atom()} | {:ok, boolean()}

Check whether the ATECC508A has been configured or not.

If this returns {:ok, false}, then configure/1 can be called.

Link to this function

device_info(transport)

View Source
device_info(ATECC508A.Transport.t()) :: {:error, atom()} | {:ok, map()}

Helper for getting information about the ATECC module.

Link to this function

device_sn(transport)

View Source
device_sn(ATECC508A.Transport.t()) :: {:error, atom()} | {:ok, String.t()}

Helper for getting the ATECC508A's serial number.