NervesKey.OTP (nerves_key v1.1.0) View Source

This module handles OTP data stored in the NervesKey.

Link to this section Summary

Functions

Convert a raw configuration to a nice map.

Convert a raw configuration to a nice map. Raise if there is an error.

Create a NervesKey OTP data struct

Read NervesKey information from the OTP data.

Convert a nice config map back to a raw configuration

Write NervesKey information to the OTP zone.

Link to this section Types

Specs

raw() :: <<_::512>>

Specs

t() :: %NervesKey.OTP{
  board_name: binary(),
  flags: 0..65535,
  manufacturer_sn: binary(),
  user: <<_::256>>
}

Link to this section Functions

Specs

from_raw(raw()) :: {:ok, t()} | {:error, atom()}

Convert a raw configuration to a nice map.

Specs

from_raw!(raw()) :: t()

Convert a raw configuration to a nice map. Raise if there is an error.

Link to this function

new(board_name, manufacturer_sn, user \\ nil)

View Source

Specs

new(String.t(), String.t(), binary() | nil) :: t()

Create a NervesKey OTP data struct

Specs

read(ATECC508A.Transport.t()) :: {:ok, t()} | {:error, atom()}

Read NervesKey information from the OTP data.

Specs

to_raw(t()) :: raw()

Convert a nice config map back to a raw configuration

Specs

write(ATECC508A.Transport.t(), raw()) :: :ok | {:error, atom()}

Write NervesKey information to the OTP zone.