Commit 1dcf154
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 e8d201d commit 1dcf154
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
956 | 958 | | |
957 | 959 | | |
958 | 960 | | |
| |||
0 commit comments