diff options
author | Dave Hylands <dhylands@gmail.com> | 2014-05-01 12:15:37 -0700 |
---|---|---|
committer | Dave Hylands <dhylands@gmail.com> | 2014-05-01 12:15:37 -0700 |
commit | e911cfdb22b2703ffbf037f825c1d251df1fcd8a (patch) | |
tree | f177189c1717fcf9915fd9e189d5dfdb1323e9b9 /stmhal/pin.c | |
parent | 1f85d6255d6929edbcfc087e4e07c2fde39c3632 (diff) | |
download | micropython-e911cfdb22b2703ffbf037f825c1d251df1fcd8a.tar.gz micropython-e911cfdb22b2703ffbf037f825c1d251df1fcd8a.zip |
Fix pin initialization when a mode argument is provided
Diffstat (limited to 'stmhal/pin.c')
-rw-r--r-- | stmhal/pin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c index 06923a492d..608f225dae 100644 --- a/stmhal/pin.c +++ b/stmhal/pin.c @@ -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]; } |