feat: Enhance RP2040 simulator GPIO handling to support InputPullUp state

This commit is contained in:
David Montero Crespo 2026-03-22 18:46:52 -03:00
parent 083d8d69a8
commit 9c8e98cad2
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ export class RP2040Simulator {
if (!gpio) continue; if (!gpio) continue;
const unsub = gpio.addListener((state: GPIOPinState) => { const unsub = gpio.addListener((state: GPIOPinState) => {
const isHigh = state === GPIOPinState.High; const isHigh = state === GPIOPinState.High || state === GPIOPinState.InputPullUp;
this.pinManager.triggerPinChange(pin, isHigh); this.pinManager.triggerPinChange(pin, isHigh);
if (this.onPinChangeWithTime && this.rp2040) { if (this.onPinChangeWithTime && this.rp2040) {
// IClock interface exposes `nanos` (not `timeUs`) // IClock interface exposes `nanos` (not `timeUs`)