View Source IntelHex.Record (intel_hex v0.2.1)

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

@type t() :: %IntelHex.Record{
  address: non_neg_integer(),
  data: binary(),
  type: type()
}
@type type() ::
  :data
  | :eof
  | :extended_segment_address
  | :start_segment_address
  | :extended_linear_address
  | :start_linear_address

Functions

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

Helper for creating data records

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

Decode one Intel Hex record

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

Decode one Intel Hex record

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

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

Encode an Intel Hex record

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

Helper for creating an EOF record

Link to this function

extended_linear_address(address)

View Source
@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