-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
Description
micropython/ports/esp32/machine_sdcard.c
Lines 72 to 79 in 7566d10
STATIC gpio_num_t pin_or_int(const mp_obj_t arg) { | |
if (mp_obj_is_small_int(arg)) { | |
return MP_OBJ_SMALL_INT_VALUE(arg); | |
} else { | |
// This raises a value error if the argument is not a Pin. | |
return machine_pin_get_id(arg); | |
} | |
} |
This function does not check int value.
return MP_OBJ_SMALL_INT_VALUE(arg);
may return invalid pin numbers like 12345