stk500-esm
Version:
A modern, ESM-compatible, TypeScript implementation of the STK500v1 protocol for programming Arduino boards directly from Node.js or the browser.
23 lines (22 loc) • 973 B
TypeScript
/**
* Represents the result of parsing Intel HEX data.
*/
interface ParseResult {
/** The parsed data as a Uint8Array. */
data: Uint8Array;
/** The start segment address, if present in the HEX data. */
startSegmentAddress: number | null;
/** The start linear address, if present in the HEX data. */
startLinearAddress: number | null;
}
/**
* Parses Intel HEX format data into a binary buffer.
*
* @param data - The Intel HEX data to parse, as a string or Uint8Array.
* @param bufferSize - The initial size of the buffer to allocate (default: 8192).
* @param addressOffset - An offset to apply to all addresses in the HEX data (default: 0).
* @returns An object containing the parsed binary data and any start addresses found.
* @throws Will throw an error if the HEX data is invalid or parsing fails.
*/
export default function parseIntelHex(data: string | Uint8Array, bufferSize?: number, addressOffset?: number): ParseResult;
export {};