Module Intel_hexSource

The Intel HEX manipulating library for OCaml provides functions for reading, writing, and creating.

Sourcetype t = Record.t list

A Intel HEX file is composed of many records.

Create

You can use the high-level interface (via the Record.t module) to construct Intel HEX files. Here is an example:

  let ihex =
    Intel_hex.Record.
      [
        Data { offset = 0; payload = "hello " };
        Data { offset = 7; payload = "world" };
        (* ... *)
      ]

Read

Sourceval of_channel : in_channel -> t

of_channel ic read Intel HEX record from input channel.

Sourceval of_string : string -> t

of_string s read Intel HEX record from s string.

Write

Sourceval to_string : t -> string

to_string ihex returns string representation of Intel HEX.

Sourceval output_to_buffer : Buffer.t -> t -> unit

output_to_buffer buf ihex output string representation of Intel HEX to buf buffer.

Raw access

Sourcemodule Raw : sig ... end

Raw Intel HEX structure manipulation.

Modules

Sourcemodule Record : sig ... end

Intel HEX record representation.