summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-01 23:26:28 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-01 23:26:28 +0100
commitf2021ffe0f1d7d7e373b4e8739a493c9bd4e43ef (patch)
treecd4a729eaa6f9f37d5436bdc7cf5fc44d0da97b8
parent20c23c31bec47145430ff2b902285eca141b4e7a (diff)
parente911cfdb22b2703ffbf037f825c1d251df1fcd8a (diff)
downloadmicropython-f2021ffe0f1d7d7e373b4e8739a493c9bd4e43ef.tar.gz
micropython-f2021ffe0f1d7d7e373b4e8739a493c9bd4e43ef.zip
Merge pull request #542 from dhylands/fix-pin
Fix pin initialization when a mode argument is provided
-rw-r--r--stmhal/pin.c2
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];
}