Skip to content

Commit bc63f93

Browse files
committed
comment why it's this way
1 parent 4380292 commit bc63f93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shared-bindings/digitalio/DigitalInOut.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ STATIC mp_obj_t digitalio_digitalinout_make_new(const mp_obj_type_t *type,
8989
self->base.type = &digitalio_digitalinout_type;
9090

9191
#if CIRCUITPY_CYW43
92+
// The GPIO pin attached to the CYW43 co-processor can only be used for
93+
// DigitalInOut, not for other purposes like PWM. That's why this check
94+
// is here, and it's not rolled into validate_obj_is_free_pin.
9295
const mcu_pin_obj_t *pin = validate_obj_is_free_pin_including_cyw43(args[0]);
9396
#else
9497
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[0]);

0 commit comments

Comments
 (0)