summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pin.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/pin.c')
-rw-r--r--stmhal/pin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c
index 06923a492d..d390926360 100644
--- a/stmhal/pin.c
+++ b/stmhal/pin.c
@@ -4,9 +4,9 @@
#include "stm32f4xx_hal.h"
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
@@ -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];
}
@@ -241,6 +241,7 @@ STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(pin_debug_obj, (mp_obj_t)&pin_debug_fun_o
/// - `Pin.PULL_DOWN` - enable the pull-down resistor.
///
/// Returns: `None`.
+// TODO allow keyword args
STATIC mp_obj_t pin_obj_init(uint n_args, mp_obj_t *args) {
pin_obj_t *self = args[0];