Merge pull request #542 from dhylands/fix-pin

Fix pin initialization when a mode argument is provided
This commit is contained in:
Damien George 2014-05-01 23:26:28 +01:00
commit f2021ffe0f
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ STATIC mp_obj_t pin_make_new(mp_obj_t self_in, uint n_args, uint n_kw, const mp_
if (n_args >= 2) {
// pin mode given, so configure this GPIO
mp_obj_t args2[3] = {(mp_obj_t)pin, args2[1], MP_OBJ_NULL};
mp_obj_t args2[3] = {(mp_obj_t)pin, args[1], MP_OBJ_NULL};
if (n_args == 3) {
args2[2] = args[2];
}