import { Transport } from "./webserial"; /** * Execute a classic set of commands that will reset the chip. * * Commands (e.g. R0) are defined by a code (R) and an argument (0). * * The commands are: * * D: setDTR - 1=True / 0=False * * R: setRTS - 1=True / 0=False * * W: Wait (time delay) - positive integer number (miliseconds) * * "D0|R1|W100|D1|R0|W50|D0" represents the classic reset strategy * @param {Transport} transport Transport class to perform serial communication. * @param {number} resetDelay Delay in milliseconds for reset. */ export declare function classicReset(transport: Transport, resetDelay?: number): Promise; /** * Execute a set of commands for USB JTAG serial reset. * * Commands (e.g. R0) are defined by a code (R) and an argument (0). * * The commands are: * * D: setDTR - 1=True / 0=False * * R: setRTS - 1=True / 0=False * * W: Wait (time delay) - positive integer number (miliseconds) * @param {Transport} transport Transport class to perform serial communication. */ export declare function usbJTAGSerialReset(transport: Transport): Promise; /** * Execute a set of commands that will hard reset the chip. * * Commands (e.g. R0) are defined by a code (R) and an argument (0). * * The commands are: * * D: setDTR - 1=True / 0=False * * R: setRTS - 1=True / 0=False * * W: Wait (time delay) - positive integer number (miliseconds) * @param {Transport} transport Transport class to perform serial communication. * @param {boolean} usingUsbOtg is it using USB-OTG ? */ export declare function hardReset(transport: Transport, usingUsbOtg?: boolean): Promise; /** * Validate a sequence string based on the following format: * * Commands (e.g. R0) are defined by a code (R) and an argument (0). * * The commands are: * * D: setDTR - 1=True / 0=False * * R: setRTS - 1=True / 0=False * * W: Wait (time delay) - positive integer number (miliseconds) * @param {string} seqStr Sequence string to validate * @returns {boolean} Is the sequence string valid ? */ export declare function validateCustomResetStringSequence(seqStr: string): boolean; /** * Custom reset strategy defined with a string. * * The sequenceString input string consists of individual commands divided by "|". * * Commands (e.g. R0) are defined by a code (R) and an argument (0). * * The commands are: * * D: setDTR - 1=True / 0=False * * R: setRTS - 1=True / 0=False * * W: Wait (time delay) - positive integer number (miliseconds) * * "D0|R1|W100|D1|R0|W50|D0" represents the classic reset strategy * @param {Transport} transport Transport class to perform serial communication. * @param {string} sequenceString Custom string sequence for reset strategy */ export declare function customReset(transport: Transport, sequenceString: string): Promise; declare const _default: { classicReset: typeof classicReset; customReset: typeof customReset; hardReset: typeof hardReset; usbJTAGSerialReset: typeof usbJTAGSerialReset; validateCustomResetStringSequence: typeof validateCustomResetStringSequence; }; export default _default;