extmod/machine_signal: Fix parsing of invert arg when Pin is first arg.
This commit is contained in:
parent
6b4d4a25ce
commit
653a0c2d71
@ -96,7 +96,7 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t
|
|||||||
if (n_args == 1) {
|
if (n_args == 1) {
|
||||||
if (n_kw == 0) {
|
if (n_kw == 0) {
|
||||||
} else if (n_kw == 1 && args[1] == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) {
|
} else if (n_kw == 1 && args[1] == MP_OBJ_NEW_QSTR(MP_QSTR_invert)) {
|
||||||
invert = mp_obj_is_true(args[1]);
|
invert = mp_obj_is_true(args[2]);
|
||||||
} else {
|
} else {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user