Skip to content

Commit 70257ba

Browse files
committed
Fix 'this' issue
1 parent 7c0ba2b commit 70257ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/processor/cortex-m.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class CortexM extends ADI implements Processor {
123123
return;
124124
}
125125

126-
return this.waitDelay(this.isHalted, timeout);
126+
return this.waitDelay(() => this.isHalted(), timeout);
127127
}
128128

129129
/**
@@ -243,7 +243,7 @@ export class CortexM extends ADI implements Processor {
243243
await this.transferSequence(sequence); // Write the registers
244244
await this.writeBlock(address, code); // Write the code to the address
245245
await this.resume(false); // Resume the target, without waiting
246-
await this.waitDelay(this.isHalted, EXECUTE_TIMEOUT); // Wait for the target to halt on the breakpoint
246+
await this.waitDelay(() => this.isHalted(), EXECUTE_TIMEOUT); // Wait for the target to halt on the breakpoint
247247
}
248248

249249
/**

0 commit comments

Comments
 (0)