ihex

package
v0.0.0-...-3f33ff4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ihex implements enough of reading and writing Intel HEX files

to suffice for our purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	Addr uint32
	Data []byte
}

A Chunk represents a run of bytes, starting at a specific address.

type RecType

type RecType byte
const (
	TypeData RecType = 0 // Simple data
	TypeEof  RecType = 1 // End of file
	TypeELAR RecType = 4 // Extended Linear Address Record
)

type RecWidth

type RecWidth int
const (
	Width16 RecWidth = 16
	Width32 RecWidth = 32
)

type Writer

type Writer struct {
	Width   RecWidth
	UseCRLF bool // True to use \r\n as the line terminator
	// contains filtered or unexported fields
}

A Writer writes bytes at addresses to an Intel HEX formatted file.

As returned by NewWriter, a Writer writes records of 32 bytes, terminated by a newline. The exported fields can be changed to customize the details before the first call to Write.

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) End

func (w *Writer) End() error

func (*Writer) Write

func (w *Writer) Write(addr uint32, data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL