IntelHex.Record (intel_hex v0.2.1)

Copy Markdown View Source

Information for one line in an Intel HEX file

Summary

Functions

Helper for creating data records

Decode one Intel Hex record

Decode one Intel Hex record

Encode an Intel Hex record

Helper for creating an EOF record

Helper for creating an extended linear address record

Types

t()

@type t() :: %IntelHex.Record{
  address: non_neg_integer(),
  data: binary(),
  type: type()
}

type()

@type type() ::
  :data
  | :eof
  | :extended_segment_address
  | :start_segment_address
  | :extended_linear_address
  | :start_linear_address

Functions

data(address, data)

@spec data(non_neg_integer(), binary()) :: t()

Helper for creating data records

decode(string)

@spec decode(String.t()) :: {:ok, t()} | {:error, term()}

Decode one Intel Hex record

decode!(string)

@spec decode!(String.t()) :: t()

Decode one Intel Hex record

If the record is not in Intel Hex format, an exception will be raised.

encode(record)

@spec encode(t()) :: String.t()

Encode an Intel Hex record

eof()

@spec eof() :: %IntelHex.Record{address: 0, data: <<_::0>>, type: :eof}

Helper for creating an EOF record

extended_linear_address(address)

@spec extended_linear_address(non_neg_integer()) :: %IntelHex.Record{
  address: non_neg_integer(),
  data: term(),
  type: :extended_linear_address
}

Helper for creating an extended linear address record