summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pin.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/pin.c')
-rw-r--r--stmhal/pin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stmhal/pin.c b/stmhal/pin.c
index 6ee5fa564e..a9ebfa9766 100644
--- a/stmhal/pin.c
+++ b/stmhal/pin.c
@@ -29,12 +29,12 @@
#include <string.h>
#include "mpconfig.h"
-#include HAL_H
#include "nlr.h"
#include "misc.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
+#include MICROPY_HAL_H
#include "pin.h"
/// \moduleref pyb
@@ -99,8 +99,8 @@ STATIC mp_obj_t pin_class_map_dict;
STATIC bool pin_class_debug;
void pin_init(void) {
- pin_class_mapper = MP_OBJ_NULL;
- pin_class_map_dict = MP_OBJ_NULL;
+ pin_class_mapper = mp_const_none;
+ pin_class_map_dict = mp_const_none;
pin_class_debug = false;
}
@@ -119,7 +119,7 @@ const pin_obj_t *pin_find(mp_obj_t user_obj) {
return pin_obj;
}
- if (pin_class_mapper != MP_OBJ_NULL) {
+ if (pin_class_mapper != mp_const_none) {
pin_obj = mp_call_function_1(pin_class_mapper, user_obj);
if (pin_obj != mp_const_none) {
if (!MP_OBJ_IS_TYPE(pin_obj, &pin_type)) {
@@ -138,7 +138,7 @@ const pin_obj_t *pin_find(mp_obj_t user_obj) {
// other lookup methods.
}
- if (pin_class_map_dict != MP_OBJ_NULL) {
+ if (pin_class_map_dict != mp_const_none) {
mp_map_t *pin_map_map = mp_obj_dict_get_map(pin_class_map_dict);
mp_map_elem_t *elem = mp_map_lookup(pin_map_map, user_obj, MP_MAP_LOOKUP);
if (elem != NULL && elem->value != NULL) {