Skip to content

Commit 510bd11

Browse files
committed
Enable reading back value of cyw43 pin
Now, `led.value = not led.value` works as a way to toggle the LED state. Closes: #6959
1 parent a3bcfd6 commit 510bd11

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/raspberrypi/common-hal/digitalio/DigitalInOut.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ void common_hal_digitalio_digitalinout_set_value(
140140

141141
bool common_hal_digitalio_digitalinout_get_value(
142142
digitalio_digitalinout_obj_t *self) {
143+
#if CIRCUITPY_CYW43
144+
if (IS_CYW(self)) {
145+
return cyw43_arch_gpio_get(self->pin->number);
146+
}
147+
#endif
143148
return gpio_get(self->pin->number);
144149
}
145150

0 commit comments

Comments
 (0)