Commit 121833a
committed
esp32s3 t-display-s3: emulate external pullups
Emulate the external pullup resistors on
the GPIO0/GPIO14 buttons of the T-Display-S3.
On the physical t-display-s3, this works:
pin0 = Pin(0, Pin.IN)
pin0.value() # returns 1 (as it should because it's pulled high by an external resistor)
But on the emulator, the same code behaves differently:
pin0 = Pin(0, Pin.IN)
pin0.value() # returns 0 because external pullups weren't emulated
Internal pullups have been implemented already in commit cbb15d7
at https://github.com/a159x36/qemu/pull/2/changes so this works:
pin0 = Pin(0, Pin.IN, Pin.PULL_UP)
pin0.value() # returns 1 when internal pullups are supported
Obviously, the more the emulator mimicks the real hardware, the better,
so this is another step in the right direction.1 parent 6d6142f commit 121833a
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
992 | 992 | | |
993 | 993 | | |
994 | 994 | | |
| 995 | + | |
| 996 | + | |
995 | 997 | | |
996 | 998 | | |
997 | 999 | | |
| |||
0 commit comments