Add hard_reset

This commit is contained in:
Paul Kendall 2022-07-07 16:29:24 +12:00
parent 33615ce370
commit 0fb492a9b6

View File

@ -1588,6 +1588,12 @@ class ESPLoader {
this.log("Detected flash size: " + this.DETECTED_FLASH_SIZES[flid_lowbyte]); this.log("Detected flash size: " + this.DETECTED_FLASH_SIZES[flid_lowbyte]);
} }
hard_reset = async() => {
this.transport.setRTS(true); // EN->LOW
await this._sleep(100);
this.transport.setRTS(false);
}
soft_reset = async() => { soft_reset = async() => {
if (!this.IS_STUB) { if (!this.IS_STUB) {
// 'run user code' is as close to a soft reset as we can do // 'run user code' is as close to a soft reset as we can do