Logo Search packages:      
Sourcecode: s51dude version File versions

ihex.h File Reference


Detailed Description

Low-level utility functions to create, read, write, and print Intel HEX8 binary records.

Author:
Vanya A. Sergeev <vsergeev@gmail.com>
Date:
December 24 2006
Version:
1.0.0 License: Public Domain

Definition in file ihex.h.

#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  _IHexRecord

Typedefs

typedef struct _IHexRecord IHexRecord

Enumerations

enum  _IHexDefinitions {
  IHEX_RECORD_BUFF_SIZE = 768, IHEX_COUNT_OFFSET = 1, IHEX_COUNT_LEN = 2, IHEX_ADDRESS_OFFSET = 3,
  IHEX_ADDRESS_LEN = 4, IHEX_TYPE_OFFSET = 7, IHEX_TYPE_LEN = 2, IHEX_DATA_OFFSET = 9,
  IHEX_CHECKSUM_LEN = 2, IHEX_MAX_DATA_LEN = 512, IHEX_ASCII_HEX_BYTE_LEN = 2, IHEX_START_CODE_OFFSET = 0,
  IHEX_START_CODE = ':'
}
enum  IHexErrors {
  IHEX_OK = 0, IHEX_ERROR_FILE = -1, IHEX_ERROR_EOF = -2, IHEX_ERROR_INVALID_RECORD = -3,
  IHEX_ERROR_INVALID_ARGUMENTS = -4
}
enum  IHexRecordTypes {
  IHEX_TYPE_00 = 0, IHEX_TYPE_01, IHEX_TYPE_02, IHEX_TYPE_03,
  IHEX_TYPE_04, IHEX_TYPE_05
}

Functions

uint8_t Checksum_IHexRecord (const IHexRecord ihexRecord)
int New_IHexRecord (int type, uint16_t address, uint8_t data[], int dataLen, IHexRecord *ihexRecord)
void Print_IHexRecord (const IHexRecord ihexRecord)
int Read_IHexRecord (IHexRecord *ihexRecord, FILE *in)
int Write_IHexRecord (const IHexRecord ihexRecord, FILE *out)


Generated by  Doxygen 1.6.0   Back to index