Options
All
  • Public
  • Public/Protected
  • All
Menu

Module micropython-appended

Functions

addIntelHexAppendedScript

  • addIntelHexAppendedScript(intelHex: string, pyCode: string): string
  • Converts the Python code into the Intel Hex format expected by MicroPython and injects it into a Intel Hex string containing a marker.

    TODO: Throw error if filesystem is using the penultimate page already.

    Parameters

    • intelHex: string

      Single string of Intel Hex records to inject the code.

    • pyCode: string

    Returns string

    Intel Hex string with the Python code injected.

cleanseOldHexFormat

  • cleanseOldHexFormat(intelHex: string): string
  • Removes the old insertion line the input Intel Hex string contains it.

    Parameters

    • intelHex: string

      String with the intel hex lines.

    Returns string

    The Intel Hex string without insertion line.

getIntelHexAppendedScript

  • getIntelHexAppendedScript(intelHex: string): string
  • Parses through an Intel Hex string to find the Python code at the allocated address and extracts it.

    Parameters

    • intelHex: string

      Intel Hex block to scan for the code.

    Returns string

    Python code.

isAppendedScriptPresent

  • isAppendedScriptPresent(intelHex: MemoryMap | string): boolean
  • Checks the Intel Hex memory map to see if there is an appended script.

    Parameters

    • intelHex: MemoryMap | string

    Returns boolean

    True if appended script is present, false otherwise.

Generated using TypeDoc