summaryrefslogtreecommitdiff
path: root/ports/stm32/usrsw.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/stm32/usrsw.c')
-rw-r--r--ports/stm32/usrsw.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ports/stm32/usrsw.c b/ports/stm32/usrsw.c
index 170c01bd6..cbf4a36fb 100644
--- a/ports/stm32/usrsw.c
+++ b/ports/stm32/usrsw.c
@@ -68,7 +68,7 @@ typedef struct _pyb_switch_obj_t {
mp_obj_base_t base;
} pyb_switch_obj_t;
-STATIC const pyb_switch_obj_t pyb_switch_obj = {{&pyb_switch_type}};
+static const pyb_switch_obj_t pyb_switch_obj = {{&pyb_switch_type}};
void pyb_switch_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
mp_print_str(print, "Switch()");
@@ -76,7 +76,7 @@ void pyb_switch_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t
/// \classmethod \constructor()
/// Create and return a switch object.
-STATIC mp_obj_t pyb_switch_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
+static mp_obj_t pyb_switch_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
// check arguments
mp_arg_check_num(n_args, n_kw, 0, 0, false);
@@ -100,15 +100,15 @@ mp_obj_t pyb_switch_value(mp_obj_t self_in) {
(void)self_in;
return mp_obj_new_bool(switch_get());
}
-STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_switch_value_obj, pyb_switch_value);
+static MP_DEFINE_CONST_FUN_OBJ_1(pyb_switch_value_obj, pyb_switch_value);
-STATIC mp_obj_t switch_callback(mp_obj_t line) {
+static mp_obj_t switch_callback(mp_obj_t line) {
if (MP_STATE_PORT(pyb_switch_callback) != mp_const_none) {
mp_call_function_0(MP_STATE_PORT(pyb_switch_callback));
}
return mp_const_none;
}
-STATIC MP_DEFINE_CONST_FUN_OBJ_1(switch_callback_obj, switch_callback);
+static MP_DEFINE_CONST_FUN_OBJ_1(switch_callback_obj, switch_callback);
/// \method callback(fun)
/// Register the given function to be called when the switch is pressed down.
@@ -125,14 +125,14 @@ mp_obj_t pyb_switch_callback(mp_obj_t self_in, mp_obj_t callback) {
true);
return mp_const_none;
}
-STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_switch_callback_obj, pyb_switch_callback);
+static MP_DEFINE_CONST_FUN_OBJ_2(pyb_switch_callback_obj, pyb_switch_callback);
-STATIC const mp_rom_map_elem_t pyb_switch_locals_dict_table[] = {
+static const mp_rom_map_elem_t pyb_switch_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&pyb_switch_value_obj) },
{ MP_ROM_QSTR(MP_QSTR_callback), MP_ROM_PTR(&pyb_switch_callback_obj) },
};
-STATIC MP_DEFINE_CONST_DICT(pyb_switch_locals_dict, pyb_switch_locals_dict_table);
+static MP_DEFINE_CONST_DICT(pyb_switch_locals_dict, pyb_switch_locals_dict_table);
MP_DEFINE_CONST_OBJ_TYPE(
pyb_switch_type,