Skip to content

Commit b203c17

Browse files
committed
esp8266: Fix reading of pin object for GPIO16.
Pin(16) now works as an input.
1 parent 2146cda commit b203c17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esp8266/modpybpin.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ STATIC mp_obj_t pyb_pin_call(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw,
301301
pyb_pin_obj_t *self = self_in;
302302
if (n_args == 0) {
303303
// get pin
304-
return MP_OBJ_NEW_SMALL_INT(GPIO_INPUT_GET(self->phys_port));
304+
return MP_OBJ_NEW_SMALL_INT(pin_get(self->phys_port));
305305
} else {
306306
// set pin
307307
pin_set(self->phys_port, mp_obj_is_true(args[0]));

0 commit comments

Comments
 (0)