Options
All
  • Public
  • Public/Protected
  • All
Menu

Module hex-map-utils

Functions

getString

  • getString(intelHexMap: MemoryMap, address: number): string
  • Decodes a UTF-8 null terminated string stored in the Intel Hex data at the indicated address.

    Parameters

    • intelHexMap: MemoryMap

      Memory map of the Intel Hex data.

    • address: number

      Start address for the string.

    Returns string

    String read from the Intel Hex data.

getUint16

  • getUint16(intelHexMap: MemoryMap, address: number): number
  • Reads a 16 bit little endian number from an Intel Hex memory map.

    Any missing data in that address range that is not contained inside the MemoryMap is filled with 0xFF.

    Parameters

    • intelHexMap: MemoryMap

      Memory map of the Intel Hex data.

    • address: number

      Start address of the 16 bit number.

    Returns number

    Number with the unsigned integer representation of those 2 bytes.

getUint32

  • getUint32(intelHexMap: MemoryMap, address: number): number
  • Reads a 32 bit little endian number from an Intel Hex memory map.

    Any missing data in that address range that is not contained inside the MemoryMap is filled with 0xFF.

    Parameters

    • intelHexMap: MemoryMap

      Memory map of the Intel Hex data.

    • address: number

      Start address of the 32 bit number.

    Returns number

    Number with the unsigned integer representation of those 4 bytes.

getUint64

  • getUint64(intelHexMap: MemoryMap, address: number): number
  • Reads a 64 bit little endian number from an Intel Hex memory map.

    Any missing data in that address range that is not contained inside the MemoryMap is filled with 0xFF.

    Parameters

    • intelHexMap: MemoryMap

      Memory map of the Intel Hex data.

    • address: number

      Start address of the 32 bit number.

    Returns number

    Number with the unsigned integer representation of those 8 bytes.

getUint8

  • getUint8(intelHexMap: MemoryMap, address: number): number
  • Reads a 8 bit number from an Intel Hex memory map.

    If the data is not contained inside the MemoryMap it returns 0xFF.

    Parameters

    • intelHexMap: MemoryMap

      Memory map of the Intel Hex data.

    • address: number

      Start address of the 16 bit number.

    Returns number

    Number with the unsigned integer representation of those 2 bytes.

Generated using TypeDoc