Skip to content

Commit e911cfd

Browse files
committed
Fix pin initialization when a mode argument is provided
1 parent 1f85d62 commit e911cfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stmhal/pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ STATIC mp_obj_t pin_make_new(mp_obj_t self_in, uint n_args, uint n_kw, const mp_
179179

180180
if (n_args >= 2) {
181181
// pin mode given, so configure this GPIO
182-
mp_obj_t args2[3] = {(mp_obj_t)pin, args2[1], MP_OBJ_NULL};
182+
mp_obj_t args2[3] = {(mp_obj_t)pin, args[1], MP_OBJ_NULL};
183183
if (n_args == 3) {
184184
args2[2] = args[2];
185185
}

0 commit comments

Comments
 (0)