From f57c2f5e561f38d26dc356611f0197940813d6f7 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Mon, 1 Jul 2024 10:17:21 +0200 Subject: [PATCH] misc: Replace deprecated STATIC with static. --- src/omv/modules/examplemodule.c | 8 +- src/omv/modules/py_clock.c | 14 +- src/omv/modules/py_display.c | 58 +- src/omv/modules/py_display_data.c | 22 +- src/omv/modules/py_fir.c | 36 +- src/omv/modules/py_fir_lepton.c | 4 +- src/omv/modules/py_ft5x06.c | 46 +- src/omv/modules/py_gif.c | 28 +- src/omv/modules/py_image.c | 798 +++++++++++------------ src/omv/modules/py_imageio.c | 64 +- src/omv/modules/py_mjpeg.c | 48 +- src/omv/modules/py_ml.c | 30 +- src/omv/modules/py_ml_nms.c | 12 +- src/omv/modules/py_omv.c | 12 +- src/omv/modules/py_sensor.c | 118 ++-- src/omv/modules/py_spi_display.c | 2 +- src/omv/modules/py_tfp410.c | 18 +- src/omv/modules/py_tof.c | 22 +- src/omv/modules/py_tv.c | 44 +- src/omv/ports/nrf/main.c | 2 +- src/omv/ports/nrf/modules/py_audio.c | 8 +- src/omv/ports/rp2/modules/py_audio.c | 14 +- src/omv/ports/stm32/modules/py_audio.c | 10 +- src/omv/ports/stm32/modules/py_buzzer.c | 10 +- src/omv/ports/stm32/modules/py_cpufreq.c | 8 +- src/omv/ports/stm32/modules/py_display.c | 2 +- src/omv/ports/stm32/modules/py_winc.c | 2 +- 27 files changed, 720 insertions(+), 720 deletions(-) diff --git a/src/omv/modules/examplemodule.c b/src/omv/modules/examplemodule.c index 220a6e0d9..05c2a55de 100644 --- a/src/omv/modules/examplemodule.c +++ b/src/omv/modules/examplemodule.c @@ -2,7 +2,7 @@ #include "py/runtime.h" // This is the function which will be called from Python as cexample.add_ints(a, b). -STATIC mp_obj_t example_add_ints(mp_obj_t a_obj, mp_obj_t b_obj) { +static mp_obj_t example_add_ints(mp_obj_t a_obj, mp_obj_t b_obj) { // Extract the ints from the micropython input objects. int a = mp_obj_get_int(a_obj); int b = mp_obj_get_int(b_obj); @@ -11,18 +11,18 @@ STATIC mp_obj_t example_add_ints(mp_obj_t a_obj, mp_obj_t b_obj) { return mp_obj_new_int(a + b); } // Define a Python reference to the function above. -STATIC MP_DEFINE_CONST_FUN_OBJ_2(example_add_ints_obj, example_add_ints); +static MP_DEFINE_CONST_FUN_OBJ_2(example_add_ints_obj, example_add_ints); // Define all properties of the module. // Table entries are key/value pairs of the attribute name (a string) // and the MicroPython object reference. // All identifiers and strings are written as MP_QSTR_xxx and will be // optimized to word-sized integers by the build system (interned strings). -STATIC const mp_rom_map_elem_t example_module_globals_table[] = { +static const mp_rom_map_elem_t example_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_cexample) }, { MP_ROM_QSTR(MP_QSTR_add_ints), MP_ROM_PTR(&example_add_ints_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(example_module_globals, example_module_globals_table); +static MP_DEFINE_CONST_DICT(example_module_globals, example_module_globals_table); // Define module object. const mp_obj_module_t example_user_cmodule = { diff --git a/src/omv/modules/py_clock.c b/src/omv/modules/py_clock.c index b2d0d170f..9a1cfba12 100644 --- a/src/omv/modules/py_clock.c +++ b/src/omv/modules/py_clock.c @@ -25,7 +25,7 @@ mp_obj_t py_clock_tick(mp_obj_t clock_obj) { clock->t_start = mp_hal_ticks_ms(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_clock_tick_obj, py_clock_tick); +static MP_DEFINE_CONST_FUN_OBJ_1(py_clock_tick_obj, py_clock_tick); mp_obj_t py_clock_fps(mp_obj_t clock_obj) { py_clock_obj_t *clock = (py_clock_obj_t *) clock_obj; @@ -34,7 +34,7 @@ mp_obj_t py_clock_fps(mp_obj_t clock_obj) { float fps = 1000.0f / (clock->t_ticks / (float) clock->t_frame); return mp_obj_new_float(fps); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_clock_fps_obj, py_clock_fps); +static MP_DEFINE_CONST_FUN_OBJ_1(py_clock_fps_obj, py_clock_fps); mp_obj_t py_clock_avg(mp_obj_t clock_obj) { py_clock_obj_t *clock = (py_clock_obj_t *) clock_obj; @@ -42,7 +42,7 @@ mp_obj_t py_clock_avg(mp_obj_t clock_obj) { clock->t_ticks += (mp_hal_ticks_ms() - clock->t_start); return mp_obj_new_float(clock->t_ticks / (float) clock->t_frame); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_clock_avg_obj, py_clock_avg); +static MP_DEFINE_CONST_FUN_OBJ_1(py_clock_avg_obj, py_clock_avg); mp_obj_t py_clock_reset(mp_obj_t clock_obj) { py_clock_obj_t *clock = (py_clock_obj_t *) clock_obj; @@ -51,9 +51,9 @@ mp_obj_t py_clock_reset(mp_obj_t clock_obj) { clock->t_frame = 0; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_clock_reset_obj, py_clock_reset); +static MP_DEFINE_CONST_FUN_OBJ_1(py_clock_reset_obj, py_clock_reset); -STATIC void py_clock_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { +static void py_clock_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { py_clock_obj_t *self = self_in; mp_printf(print, "t_start:%d t_ticks:%d t_frame:%d\n", self->t_start, self->t_ticks, self->t_frame); } @@ -68,14 +68,14 @@ mp_obj_t py_clock_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw return MP_OBJ_FROM_PTR(clock); } -STATIC const mp_rom_map_elem_t py_clock_locals_dict_table[] = { +static const mp_rom_map_elem_t py_clock_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_tick), MP_ROM_PTR(&py_clock_tick_obj)}, { MP_OBJ_NEW_QSTR(MP_QSTR_fps), MP_ROM_PTR(&py_clock_fps_obj)}, { MP_OBJ_NEW_QSTR(MP_QSTR_avg), MP_ROM_PTR(&py_clock_avg_obj)}, { MP_OBJ_NEW_QSTR(MP_QSTR_reset), MP_ROM_PTR(&py_clock_reset_obj)}, { NULL, NULL }, }; -STATIC MP_DEFINE_CONST_DICT(py_clock_locals_dict, py_clock_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_clock_locals_dict, py_clock_locals_dict_table); MP_DEFINE_CONST_OBJ_TYPE( py_clock_type, diff --git a/src/omv/modules/py_display.c b/src/omv/modules/py_display.c index a3564a3fe..8d06926a2 100644 --- a/src/omv/modules/py_display.c +++ b/src/omv/modules/py_display.c @@ -21,49 +21,49 @@ #include "py_image.h" #include "py_display.h" -STATIC mp_obj_t py_display_width(mp_obj_t self_in) { +static mp_obj_t py_display_width(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->width); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_width_obj, py_display_width); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_width_obj, py_display_width); -STATIC mp_obj_t py_display_height(mp_obj_t self_in) { +static mp_obj_t py_display_height(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->height); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_height_obj, py_display_height); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_height_obj, py_display_height); -STATIC mp_obj_t py_display_triple_buffer(mp_obj_t self_in) { +static mp_obj_t py_display_triple_buffer(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->triple_buffer); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_triple_buffer_obj, py_display_triple_buffer); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_triple_buffer_obj, py_display_triple_buffer); -STATIC mp_obj_t py_display_bgr(mp_obj_t self_in) { +static mp_obj_t py_display_bgr(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->bgr); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_bgr_obj, py_display_bgr); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_bgr_obj, py_display_bgr); -STATIC mp_obj_t py_display_byte_swap(mp_obj_t self_in) { +static mp_obj_t py_display_byte_swap(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->byte_swap); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_byte_swap_obj, py_display_byte_swap); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_byte_swap_obj, py_display_byte_swap); -STATIC mp_obj_t py_display_framesize(mp_obj_t self_in) { +static mp_obj_t py_display_framesize(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->framesize); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_framesize_obj, py_display_framesize); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_framesize_obj, py_display_framesize); -STATIC mp_obj_t py_display_refresh(mp_obj_t self_in) { +static mp_obj_t py_display_refresh(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->refresh); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_refresh_obj, py_display_refresh); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_refresh_obj, py_display_refresh); -STATIC mp_obj_t py_display_deinit(mp_obj_t self_in) { +static mp_obj_t py_display_deinit(mp_obj_t self_in) { py_display_obj_t *self = MP_OBJ_TO_PTR(self_in); py_display_p_t *display_p = (py_display_p_t *) MP_OBJ_TYPE_GET_SLOT(self->base.type, protocol); if (display_p->deinit != NULL) { @@ -78,9 +78,9 @@ STATIC mp_obj_t py_display_deinit(mp_obj_t self_in) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_deinit_obj, py_display_deinit); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_deinit_obj, py_display_deinit); -STATIC mp_obj_t py_display_clear(uint n_args, const mp_obj_t *args) { +static mp_obj_t py_display_clear(uint n_args, const mp_obj_t *args) { py_display_obj_t *self = MP_OBJ_TO_PTR(args[0]); bool display_off = (n_args > 1 && mp_obj_get_int(args[1])); py_display_p_t *display_p = (py_display_p_t *) MP_OBJ_TYPE_GET_SLOT(self->base.type, protocol); @@ -89,9 +89,9 @@ STATIC mp_obj_t py_display_clear(uint n_args, const mp_obj_t *args) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_display_clear_obj, 1, 2, py_display_clear); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_display_clear_obj, 1, 2, py_display_clear); -STATIC mp_obj_t py_display_backlight(uint n_args, const mp_obj_t *args) { +static mp_obj_t py_display_backlight(uint n_args, const mp_obj_t *args) { py_display_obj_t *self = MP_OBJ_TO_PTR(args[0]); if (n_args > 1) { uint32_t intensity = mp_obj_get_int(args[1]); @@ -119,9 +119,9 @@ STATIC mp_obj_t py_display_backlight(uint n_args, const mp_obj_t *args) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_display_backlight_obj, 1, 2, py_display_backlight); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_display_backlight_obj, 1, 2, py_display_backlight); -STATIC mp_obj_t py_display_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_display_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_image, ARG_x, ARG_y, ARG_x_scale, ARG_y_scale, ARG_roi, ARG_channel, ARG_alpha, ARG_color_palette, ARG_alpha_palette, ARG_hint @@ -175,9 +175,9 @@ STATIC mp_obj_t py_display_write(uint n_args, const mp_obj_t *pos_args, mp_map_t return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_display_write_obj, 2, py_display_write); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_display_write_obj, 2, py_display_write); -STATIC mp_obj_t py_display_bus_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_display_bus_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_cmd, ARG_args, ARG_dcs }; static const mp_arg_t allowed_args[] = { { MP_QSTR_cmd, MP_ARG_INT | MP_ARG_REQUIRED }, @@ -205,9 +205,9 @@ STATIC mp_obj_t py_display_bus_write(uint n_args, const mp_obj_t *pos_args, mp_m } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_display_bus_write_obj, 1, py_display_bus_write); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_display_bus_write_obj, 1, py_display_bus_write); -STATIC mp_obj_t py_display_bus_read(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_display_bus_read(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_cmd, ARG_len, ARG_args, ARG_dcs }; static const mp_arg_t allowed_args[] = { { MP_QSTR_cmd, MP_ARG_INT | MP_ARG_REQUIRED }, @@ -239,9 +239,9 @@ STATIC mp_obj_t py_display_bus_read(uint n_args, const mp_obj_t *pos_args, mp_ma } return MP_OBJ_FROM_PTR(wbuf); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_display_bus_read_obj, 1, py_display_bus_read); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_display_bus_read_obj, 1, py_display_bus_read); -STATIC const mp_rom_map_elem_t py_display_locals_dict_table[] = { +static const mp_rom_map_elem_t py_display_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_display) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_display_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&py_display_width_obj) }, @@ -259,7 +259,7 @@ STATIC const mp_rom_map_elem_t py_display_locals_dict_table[] = { }; MP_DEFINE_CONST_DICT(py_display_locals_dict, py_display_locals_dict_table); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_display) }, { MP_ROM_QSTR(MP_QSTR_QVGA), MP_ROM_INT(DISPLAY_RESOLUTION_QVGA) }, { MP_ROM_QSTR(MP_QSTR_TQVGA), MP_ROM_INT(DISPLAY_RESOLUTION_TQVGA) }, @@ -293,7 +293,7 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_DisplayData), MP_ROM_PTR(&py_display_data_type) }, #endif }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t display_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_display_data.c b/src/omv/modules/py_display_data.c index 8c9a4d3a6..abd42aa3f 100644 --- a/src/omv/modules/py_display_data.c +++ b/src/omv/modules/py_display_data.c @@ -49,7 +49,7 @@ static void cec_extint_callback(mp_obj_t self_in) { } } -STATIC mp_obj_t py_cec_send_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_cec_send_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_dst_addr, ARG_src_addr, ARG_data }; static const mp_arg_t allowed_args[] = { { MP_QSTR_dst_addr, MP_ARG_REQUIRED | MP_ARG_INT }, @@ -77,9 +77,9 @@ STATIC mp_obj_t py_cec_send_frame(uint n_args, const mp_obj_t *pos_args, mp_map_ } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_cec_send_frame_obj, 4, py_cec_send_frame); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_cec_send_frame_obj, 4, py_cec_send_frame); -STATIC mp_obj_t py_cec_receive_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_cec_receive_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_dst_addr, ARG_timeout }; static const mp_arg_t allowed_args[] = { { MP_QSTR_dst_addr, MP_ARG_REQUIRED | MP_ARG_INT }, @@ -103,9 +103,9 @@ STATIC mp_obj_t py_cec_receive_frame(uint n_args, const mp_obj_t *pos_args, mp_m } return mp_obj_new_tuple(2, (mp_obj_t []) { MP_OBJ_NEW_SMALL_INT(src_addr), frame }); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_cec_receive_frame_obj, 2, py_cec_receive_frame); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_cec_receive_frame_obj, 2, py_cec_receive_frame); -STATIC mp_obj_t py_cec_frame_callback(mp_obj_t self_in, mp_obj_t cb, mp_obj_t dst_addr) { +static mp_obj_t py_cec_frame_callback(mp_obj_t self_in, mp_obj_t cb, mp_obj_t dst_addr) { py_display_data_obj_t *self = MP_OBJ_TO_PTR(self_in); self->cec_callback = cb; @@ -121,7 +121,7 @@ STATIC mp_obj_t py_cec_frame_callback(mp_obj_t self_in, mp_obj_t cb, mp_obj_t ds } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_3(py_cec_frame_callback_obj, py_cec_frame_callback); +static MP_DEFINE_CONST_FUN_OBJ_3(py_cec_frame_callback_obj, py_cec_frame_callback); #endif // OMV_DISPLAY_CEC_ENABLE #if OMV_DISPLAY_DDC_ENABLE @@ -136,7 +136,7 @@ static bool ddc_checksum(uint8_t *data, int long_count) { return !(sum & 0xFF); } -STATIC mp_obj_t py_ddc_display_id(mp_obj_t self_in) { +static mp_obj_t py_ddc_display_id(mp_obj_t self_in) { py_display_data_obj_t *self = MP_OBJ_TO_PTR(self_in); if (mp_machine_soft_i2c_transfer(self->ddc_bus, self->ddc_addr, 1, &((mp_machine_i2c_buf_t) { @@ -174,7 +174,7 @@ STATIC mp_obj_t py_ddc_display_id(mp_obj_t self_in) { mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("Failed to get display id data!")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ddc_display_id_obj, py_ddc_display_id); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ddc_display_id_obj, py_ddc_display_id); #endif // OMV_DISPLAY_DDC_ENABLE mp_obj_t py_display_data_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { @@ -219,7 +219,7 @@ mp_obj_t py_display_data_make_new(const mp_obj_type_t *type, size_t n_args, size return MP_OBJ_FROM_PTR(self); } -STATIC mp_obj_t py_display_data_deinit(mp_obj_t self_in) { +static mp_obj_t py_display_data_deinit(mp_obj_t self_in) { py_display_data_obj_t *self = MP_OBJ_TO_PTR(self_in); #if OMV_DISPLAY_DDC_ENABLE @@ -236,9 +236,9 @@ STATIC mp_obj_t py_display_data_deinit(mp_obj_t self_in) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_display_data_deinit_obj, py_display_data_deinit); +static MP_DEFINE_CONST_FUN_OBJ_1(py_display_data_deinit_obj, py_display_data_deinit); -STATIC const mp_rom_map_elem_t py_display_data_locals_dict_table[] = { +static const mp_rom_map_elem_t py_display_data_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_display_data) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_display_data_deinit_obj) }, #if OMV_DISPLAY_DDC_ENABLE diff --git a/src/omv/modules/py_fir.c b/src/omv/modules/py_fir.c index 5d0bc7445..69c47fbf5 100644 --- a/src/omv/modules/py_fir.c +++ b/src/omv/modules/py_fir.c @@ -317,7 +317,7 @@ static mp_obj_t py_fir_deinit() { fir_transposed = false; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_deinit_obj, py_fir_deinit); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_deinit_obj, py_fir_deinit); mp_obj_t py_fir_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_type, ARG_refresh, ARG_resolution }; @@ -585,7 +585,7 @@ mp_obj_t py_fir_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_init_obj, 0, py_fir_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_init_obj, 0, py_fir_init); static mp_obj_t py_fir_type() { if (fir_sensor != FIR_NONE) { @@ -593,7 +593,7 @@ static mp_obj_t py_fir_type() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("FIR sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_type_obj, py_fir_type); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_type_obj, py_fir_type); static mp_obj_t py_fir_width() { if (fir_sensor != FIR_NONE) { @@ -601,7 +601,7 @@ static mp_obj_t py_fir_width() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("FIR sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_width_obj, py_fir_width); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_width_obj, py_fir_width); static mp_obj_t py_fir_height() { if (fir_sensor != FIR_NONE) { @@ -609,7 +609,7 @@ static mp_obj_t py_fir_height() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("FIR sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_height_obj, py_fir_height); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_height_obj, py_fir_height); static mp_obj_t py_fir_refresh() { #if (OMV_FIR_MLX90621_ENABLE == 1) @@ -643,7 +643,7 @@ static mp_obj_t py_fir_refresh() { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("FIR sensor is not initialized")); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_refresh_obj, py_fir_refresh); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_refresh_obj, py_fir_refresh); static mp_obj_t py_fir_resolution() { switch (fir_sensor) { @@ -671,7 +671,7 @@ static mp_obj_t py_fir_resolution() { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("FIR sensor is not initialized")); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_resolution_obj, py_fir_resolution); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_resolution_obj, py_fir_resolution); #if (OMV_FIR_LEPTON_ENABLE == 1) static mp_obj_t py_fir_radiometric() { @@ -681,7 +681,7 @@ static mp_obj_t py_fir_radiometric() { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Operation not supported by this FIR sensor")); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_radiometric_obj, py_fir_radiometric); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_radiometric_obj, py_fir_radiometric); #if defined(OMV_FIR_LEPTON_VSYNC_PRESENT) static mp_obj_t py_fir_register_vsync_cb(mp_obj_t cb) { @@ -692,7 +692,7 @@ static mp_obj_t py_fir_register_vsync_cb(mp_obj_t cb) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_fir_register_vsync_cb_obj, py_fir_register_vsync_cb); +static MP_DEFINE_CONST_FUN_OBJ_1(py_fir_register_vsync_cb_obj, py_fir_register_vsync_cb); #endif static mp_obj_t py_fir_register_frame_cb(mp_obj_t cb) { @@ -703,7 +703,7 @@ static mp_obj_t py_fir_register_frame_cb(mp_obj_t cb) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_fir_register_frame_cb_obj, py_fir_register_frame_cb); +static MP_DEFINE_CONST_FUN_OBJ_1(py_fir_register_frame_cb_obj, py_fir_register_frame_cb); static mp_obj_t py_fir_get_frame_available() { if (fir_sensor == FIR_LEPTON) { @@ -712,7 +712,7 @@ static mp_obj_t py_fir_get_frame_available() { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Operation not supported by this FIR sensor")); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_get_frame_available_obj, py_fir_get_frame_available); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_get_frame_available_obj, py_fir_get_frame_available); static mp_obj_t py_fir_trigger_ffc(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_timeout }; @@ -731,7 +731,7 @@ static mp_obj_t py_fir_trigger_ffc(uint n_args, const mp_obj_t *pos_args, mp_map } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_trigger_ffc_obj, 0, py_fir_trigger_ffc); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_trigger_ffc_obj, 0, py_fir_trigger_ffc); #endif mp_obj_t py_fir_read_ta() { @@ -795,7 +795,7 @@ mp_obj_t py_fir_read_ta() { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_fir_read_ta_obj, py_fir_read_ta); +static MP_DEFINE_CONST_FUN_OBJ_0(py_fir_read_ta_obj, py_fir_read_ta); mp_obj_t py_fir_read_ir(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_hmirror, ARG_vflip, ARG_transpose, ARG_timeout }; @@ -870,7 +870,7 @@ mp_obj_t py_fir_read_ir(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_read_ir_obj, 0, py_fir_read_ir); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_read_ir_obj, 0, py_fir_read_ir); mp_obj_t py_fir_draw_ir(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { @@ -944,7 +944,7 @@ mp_obj_t py_fir_draw_ir(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args fb_alloc_free_till_mark(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_draw_ir_obj, 2, py_fir_draw_ir); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_draw_ir_obj, 2, py_fir_draw_ir); mp_obj_t py_fir_snapshot(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { @@ -1096,9 +1096,9 @@ mp_obj_t py_fir_snapshot(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_arg } return py_image_from_struct(&dst_img); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_snapshot_obj, 0, py_fir_snapshot); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_fir_snapshot_obj, 0, py_fir_snapshot); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_fir) }, #if (OMV_FIR_MLX90621_ENABLE == 1) { MP_ROM_QSTR(MP_QSTR_FIR_SHIELD), MP_ROM_INT(FIR_MLX90621) }, @@ -1146,7 +1146,7 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_snapshot), MP_ROM_PTR(&py_fir_snapshot_obj) } }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t fir_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_fir_lepton.c b/src/omv/modules/py_fir_lepton.c index 5af8aac36..777864c99 100644 --- a/src/omv/modules/py_fir_lepton.c +++ b/src/omv/modules/py_fir_lepton.c @@ -69,7 +69,7 @@ static int fir_lepton_spi_rx_cb_expected_sid = 0; static uint16_t OMV_ATTR_SECTION(OMV_ATTR_ALIGNED_DMA(fir_lepton_buf[VOSPI_BUFFER_SIZE]), ".dma_buffer"); static void fir_lepton_spi_callback(omv_spi_t *spi, void *userdata, void *buf); -STATIC mp_obj_t fir_lepton_spi_resync_callback(mp_obj_t unused) { +static mp_obj_t fir_lepton_spi_resync_callback(mp_obj_t unused) { // For triple buffering we are never drawing where tail or head // (which may instantly update to be equal to tail) is. fir_lepton_spi_rx_cb_tail = (framebuffer_tail + 1) % FRAMEBUFFER_COUNT; @@ -88,7 +88,7 @@ STATIC mp_obj_t fir_lepton_spi_resync_callback(mp_obj_t unused) { omv_spi_transfer_start(&spi_bus, &spi_xfer); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(fir_lepton_spi_resync_callback_obj, fir_lepton_spi_resync_callback); +static MP_DEFINE_CONST_FUN_OBJ_1(fir_lepton_spi_resync_callback_obj, fir_lepton_spi_resync_callback); static void fir_lepton_spi_resync() { flir_lepton_spi_rx_timer.flags = SOFT_TIMER_FLAG_PY_CALLBACK; diff --git a/src/omv/modules/py_ft5x06.c b/src/omv/modules/py_ft5x06.c index 6fbb5a4d2..fed3ddeab 100644 --- a/src/omv/modules/py_ft5x06.c +++ b/src/omv/modules/py_ft5x06.c @@ -56,7 +56,7 @@ typedef struct _py_ft5x06_obj_t { const mp_obj_type_t py_ft5x06_type; -STATIC mp_obj_t py_ft5x06_update_points(mp_obj_t self_in); +static mp_obj_t py_ft5x06_update_points(mp_obj_t self_in); static void ft5x06_extint_callback(mp_obj_t self_in) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -67,19 +67,19 @@ static void ft5x06_extint_callback(mp_obj_t self_in) { } } -STATIC mp_obj_t py_ft5x06_get_gesture(mp_obj_t self_in) { +static mp_obj_t py_ft5x06_get_gesture(mp_obj_t self_in) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->touch_gesture); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_get_gesture_obj, py_ft5x06_get_gesture); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_get_gesture_obj, py_ft5x06_get_gesture); -STATIC mp_obj_t py_ft5x06_get_points(mp_obj_t self_in) { +static mp_obj_t py_ft5x06_get_points(mp_obj_t self_in) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->touch_points); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_get_points_obj, py_ft5x06_get_points); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_get_points_obj, py_ft5x06_get_points); -STATIC mp_obj_t py_ft5x06_get_point_flag(mp_obj_t self_in, mp_obj_t index) { +static mp_obj_t py_ft5x06_get_point_flag(mp_obj_t self_in, mp_obj_t index) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); int i = mp_obj_get_int(index); @@ -88,9 +88,9 @@ STATIC mp_obj_t py_ft5x06_get_point_flag(mp_obj_t self_in, mp_obj_t index) { } return mp_obj_new_int(self->touch_flag[i]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_flag_obj, py_ft5x06_get_point_flag); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_flag_obj, py_ft5x06_get_point_flag); -STATIC mp_obj_t py_ft5x06_get_point_id(mp_obj_t self_in, mp_obj_t index) { +static mp_obj_t py_ft5x06_get_point_id(mp_obj_t self_in, mp_obj_t index) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); int i = mp_obj_get_int(index); @@ -99,9 +99,9 @@ STATIC mp_obj_t py_ft5x06_get_point_id(mp_obj_t self_in, mp_obj_t index) { } return mp_obj_new_int(self->touch_id[i]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_id_obj, py_ft5x06_get_point_id); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_id_obj, py_ft5x06_get_point_id); -STATIC mp_obj_t py_ft5x06_get_point_x(mp_obj_t self_in, mp_obj_t index) { +static mp_obj_t py_ft5x06_get_point_x(mp_obj_t self_in, mp_obj_t index) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); int i = mp_obj_get_int(index); @@ -110,9 +110,9 @@ STATIC mp_obj_t py_ft5x06_get_point_x(mp_obj_t self_in, mp_obj_t index) { } return mp_obj_new_int(self->x[i]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_x_obj, py_ft5x06_get_point_x); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_x_obj, py_ft5x06_get_point_x); -STATIC mp_obj_t py_ft5x06_get_point_y(mp_obj_t self_in, mp_obj_t index) { +static mp_obj_t py_ft5x06_get_point_y(mp_obj_t self_in, mp_obj_t index) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); int i = mp_obj_get_int(index); @@ -121,9 +121,9 @@ STATIC mp_obj_t py_ft5x06_get_point_y(mp_obj_t self_in, mp_obj_t index) { } return mp_obj_new_int(self->y[i]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_y_obj, py_ft5x06_get_point_y); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_get_point_y_obj, py_ft5x06_get_point_y); -STATIC mp_obj_t py_ft5x06_callback(mp_obj_t self_in, mp_obj_t cb) { +static mp_obj_t py_ft5x06_callback(mp_obj_t self_in, mp_obj_t cb) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); self->touch_callback = cb; @@ -136,9 +136,9 @@ STATIC mp_obj_t py_ft5x06_callback(mp_obj_t self_in, mp_obj_t cb) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_callback_obj, py_ft5x06_callback); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ft5x06_callback_obj, py_ft5x06_callback); -STATIC mp_obj_t py_ft5x06_update_points(mp_obj_t self_in) { +static mp_obj_t py_ft5x06_update_points(mp_obj_t self_in) { py_ft5x06_obj_t *self = MP_OBJ_TO_PTR(self_in); if (mp_machine_soft_i2c_transfer(self->i2c_bus, self->i2c_addr, 1, &((mp_machine_i2c_buf_t) { @@ -189,9 +189,9 @@ STATIC mp_obj_t py_ft5x06_update_points(mp_obj_t self_in) { mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("Failed to update the number of touch points!")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_update_points_obj, py_ft5x06_update_points); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_update_points_obj, py_ft5x06_update_points); -STATIC mp_obj_t py_ft5x06_deinit(mp_obj_t self_in) { +static mp_obj_t py_ft5x06_deinit(mp_obj_t self_in) { omv_gpio_irq_enable(OMV_FT5X06_INT_PIN, false); omv_gpio_write(OMV_FT5X06_RESET_PIN, 0); @@ -207,7 +207,7 @@ STATIC mp_obj_t py_ft5x06_deinit(mp_obj_t self_in) { HAL_GPIO_DeInit(OMV_FT5X06_SCL_PIN->gpio, OMV_FT5X06_SCL_PIN->pin_mask); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_deinit_obj, py_ft5x06_deinit); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ft5x06_deinit_obj, py_ft5x06_deinit); mp_obj_t py_ft5x06_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_i2c_addr }; @@ -242,7 +242,7 @@ mp_obj_t py_ft5x06_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_k return MP_OBJ_FROM_PTR(self); } -STATIC const mp_rom_map_elem_t py_ft5x06_locals_dict_table[] = { +static const mp_rom_map_elem_t py_ft5x06_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ft5x06) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_ft5x06_deinit_obj) }, @@ -266,7 +266,7 @@ STATIC const mp_rom_map_elem_t py_ft5x06_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_touch_callback), MP_ROM_PTR(&py_ft5x06_callback_obj) }, { MP_ROM_QSTR(MP_QSTR_update_points), MP_ROM_PTR(&py_ft5x06_update_points_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(py_ft5x06_locals_dict, py_ft5x06_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_ft5x06_locals_dict, py_ft5x06_locals_dict_table); MP_DEFINE_CONST_OBJ_TYPE( py_ft5x06_type, @@ -276,11 +276,11 @@ MP_DEFINE_CONST_OBJ_TYPE( locals_dict, &py_ft5x06_locals_dict ); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_ft5x06) }, { MP_ROM_QSTR(MP_QSTR_FT5X06), MP_ROM_PTR(&py_ft5x06_type) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t ft5x06_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_gif.c b/src/omv/modules/py_gif.c index 46476028b..18cd3b4ff 100644 --- a/src/omv/modules/py_gif.c +++ b/src/omv/modules/py_gif.c @@ -42,31 +42,31 @@ static mp_obj_t py_gif_width(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->width); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_width_obj, py_gif_width); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_width_obj, py_gif_width); static mp_obj_t py_gif_height(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->height); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_height_obj, py_gif_height); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_height_obj, py_gif_height); static mp_obj_t py_gif_format(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->color ? PIXFORMAT_RGB565 : PIXFORMAT_GRAYSCALE); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_format_obj, py_gif_format); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_format_obj, py_gif_format); static mp_obj_t py_gif_size(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(file_size(&self->fp)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_size_obj, py_gif_size); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_size_obj, py_gif_size); static mp_obj_t py_gif_loop(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->loop); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_loop_obj, py_gif_loop); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_loop_obj, py_gif_loop); static mp_obj_t py_gif_add_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_delay }; @@ -91,14 +91,14 @@ static mp_obj_t py_gif_add_frame(uint n_args, const mp_obj_t *pos_args, mp_map_t gif_add_frame(&self->fp, image, args[ARG_delay].u_int); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_gif_add_frame_obj, 2, py_gif_add_frame); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_gif_add_frame_obj, 2, py_gif_add_frame); -STATIC mp_obj_t py_gif_close(mp_obj_t self_in) { +static mp_obj_t py_gif_close(mp_obj_t self_in) { py_gif_obj_t *self = MP_OBJ_TO_PTR(self_in); gif_close(&self->fp); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_gif_close_obj, py_gif_close); +static MP_DEFINE_CONST_FUN_OBJ_1(py_gif_close_obj, py_gif_close); static mp_obj_t py_gif_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_width, ARG_height, ARG_color, ARG_loop }; @@ -125,9 +125,9 @@ static mp_obj_t py_gif_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_ gif_open(&gif->fp, gif->width, gif->height, gif->color, gif->loop); return gif; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_gif_open_obj, 1, py_gif_open); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_gif_open_obj, 1, py_gif_open); -STATIC const mp_rom_map_elem_t py_gif_locals_dict_table[] = { +static const mp_rom_map_elem_t py_gif_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_gif) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_gif_close_obj) }, @@ -140,9 +140,9 @@ STATIC const mp_rom_map_elem_t py_gif_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_close), MP_ROM_PTR(&py_gif_close_obj) }, { NULL, NULL }, }; -STATIC MP_DEFINE_CONST_DICT(py_gif_locals_dict, py_gif_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_gif_locals_dict, py_gif_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_gif_type, MP_QSTR_Gif, MP_TYPE_FLAG_NONE, @@ -150,12 +150,12 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( locals_dict, &py_gif_locals_dict ); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_gif) }, { MP_OBJ_NEW_QSTR(MP_QSTR_Gif), MP_ROM_PTR(&py_gif_open_obj) }, { NULL, NULL }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t gif_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_image.c b/src/omv/modules/py_image.c index 5a2a023a1..b263e3f59 100644 --- a/src/omv/modules/py_image.c +++ b/src/omv/modules/py_image.c @@ -63,7 +63,7 @@ static void py_cascade_print(const mp_print_t *print, mp_obj_t self_in, mp_print self->_cobj.n_features, self->_cobj.n_rectangles); } -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_cascade_type, MP_QSTR_Cascade, MP_TYPE_FLAG_NONE, @@ -119,7 +119,7 @@ static mp_obj_t py_kp_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { return MP_OBJ_NULL; // op not supported } -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_kp_type, MP_QSTR_kp_desc, MP_TYPE_FLAG_NONE, @@ -148,7 +148,7 @@ static void py_lbp_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kin mp_printf(print, "{}"); } -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_lbp_type, MP_QSTR_lbp_desc, MP_TYPE_FLAG_NONE, @@ -208,47 +208,47 @@ static mp_obj_t py_kptmatch_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t va mp_obj_t py_kptmatch_cx(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->cx; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_cx_obj, py_kptmatch_cx); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_cx_obj, py_kptmatch_cx); mp_obj_t py_kptmatch_cy(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->cy; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_cy_obj, py_kptmatch_cy); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_cy_obj, py_kptmatch_cy); mp_obj_t py_kptmatch_x(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_x_obj, py_kptmatch_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_x_obj, py_kptmatch_x); mp_obj_t py_kptmatch_y(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_y_obj, py_kptmatch_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_y_obj, py_kptmatch_y); mp_obj_t py_kptmatch_w(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_w_obj, py_kptmatch_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_w_obj, py_kptmatch_w); mp_obj_t py_kptmatch_h(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_h_obj, py_kptmatch_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_h_obj, py_kptmatch_h); mp_obj_t py_kptmatch_count(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->count; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_count_obj, py_kptmatch_count); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_count_obj, py_kptmatch_count); mp_obj_t py_kptmatch_theta(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->theta; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_theta_obj, py_kptmatch_theta); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_theta_obj, py_kptmatch_theta); mp_obj_t py_kptmatch_match(mp_obj_t self_in) { return ((py_kptmatch_obj_t *) self_in)->match; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_match_obj, py_kptmatch_match); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_match_obj, py_kptmatch_match); mp_obj_t py_kptmatch_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_kptmatch_obj_t *) self_in)->x, @@ -256,9 +256,9 @@ mp_obj_t py_kptmatch_rect(mp_obj_t self_in) { ((py_kptmatch_obj_t *) self_in)->w, ((py_kptmatch_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_rect_obj, py_kptmatch_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_kptmatch_rect_obj, py_kptmatch_rect); -STATIC const mp_rom_map_elem_t py_kptmatch_locals_dict_table[] = { +static const mp_rom_map_elem_t py_kptmatch_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_cx), MP_ROM_PTR(&py_kptmatch_cx_obj) }, { MP_ROM_QSTR(MP_QSTR_cy), MP_ROM_PTR(&py_kptmatch_cy_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_kptmatch_x_obj) }, @@ -271,9 +271,9 @@ STATIC const mp_rom_map_elem_t py_kptmatch_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_kptmatch_rect_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_kptmatch_locals_dict, py_kptmatch_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_kptmatch_locals_dict, py_kptmatch_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_kptmatch_type, MP_QSTR_kptmatch, MP_TYPE_FLAG_NONE, @@ -323,7 +323,7 @@ mp_obj_t py_image_unary_op(mp_unary_op_t op, mp_obj_t self_in) { } // image iterator -STATIC mp_obj_t py_image_it_iternext(mp_obj_t self_in) { +static mp_obj_t py_image_it_iternext(mp_obj_t self_in) { mp_obj_py_image_it_t *self = MP_OBJ_TO_PTR(self_in); py_image_obj_t *image = MP_OBJ_TO_PTR(self->py_image); image_t *img = &image->_cobj; @@ -377,7 +377,7 @@ STATIC mp_obj_t py_image_it_iternext(mp_obj_t self_in) { } } -STATIC mp_obj_t py_image_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf) { +static mp_obj_t py_image_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf) { assert(sizeof(mp_obj_py_image_it_t) <= sizeof(mp_obj_iter_buf_t)); mp_obj_py_image_it_t *o = (mp_obj_py_image_it_t *) iter_buf; o->base.type = &mp_type_polymorph_iter; @@ -683,12 +683,12 @@ static mp_int_t py_image_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, static mp_obj_t py_image_width(mp_obj_t img_obj) { return mp_obj_new_int(((image_t *) py_image_cobj(img_obj))->w); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_width_obj, py_image_width); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_width_obj, py_image_width); static mp_obj_t py_image_height(mp_obj_t img_obj) { return mp_obj_new_int(((image_t *) py_image_cobj(img_obj))->h); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_height_obj, py_image_height); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_height_obj, py_image_height); static mp_obj_t py_image_format(mp_obj_t img_obj) { image_t *image = py_image_cobj(img_obj); @@ -711,20 +711,20 @@ static mp_obj_t py_image_format(mp_obj_t img_obj) { return mp_obj_new_int(PIXFORMAT_INVALID); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_format_obj, py_image_format); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_format_obj, py_image_format); static mp_obj_t py_image_size(mp_obj_t img_obj) { return mp_obj_new_int(image_size((image_t *) py_image_cobj(img_obj))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_size_obj, py_image_size); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_size_obj, py_image_size); static mp_obj_t py_image_bytearray(mp_obj_t img_obj) { image_t *arg_img = (image_t *) py_image_cobj(img_obj); return mp_obj_new_bytearray_by_ref(image_size(arg_img), arg_img->data); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_bytearray_obj, py_image_bytearray); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_bytearray_obj, py_image_bytearray); -STATIC mp_obj_t py_image_get_pixel(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_get_pixel(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_UNCOMPRESSED); const mp_obj_t *arg_vec; @@ -801,9 +801,9 @@ STATIC mp_obj_t py_image_get_pixel(uint n_args, const mp_obj_t *args, mp_map_t * default: return mp_const_none; } } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_pixel_obj, 2, py_image_get_pixel); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_pixel_obj, 2, py_image_get_pixel); -STATIC mp_obj_t py_image_set_pixel(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_set_pixel(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_UNCOMPRESSED); const mp_obj_t *arg_vec; @@ -838,7 +838,7 @@ STATIC mp_obj_t py_image_set_pixel(uint n_args, const mp_obj_t *args, mp_map_t * default: return args[0]; } } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_set_pixel_obj, 2, py_image_set_pixel); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_set_pixel_obj, 2, py_image_set_pixel); static mp_obj_t py_image_to(pixformat_t pixfmt, mp_rom_obj_t default_color_palette, bool default_copy, uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -1033,47 +1033,47 @@ static mp_obj_t py_image_to(pixformat_t pixfmt, mp_rom_obj_t default_color_palet static mp_obj_t py_image_to_bitmap(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_BINARY, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_bitmap_obj, 1, py_image_to_bitmap); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_bitmap_obj, 1, py_image_to_bitmap); static mp_obj_t py_image_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_GRAYSCALE, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_grayscale_obj, 1, py_image_to_grayscale); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_grayscale_obj, 1, py_image_to_grayscale); static mp_obj_t py_image_to_rgb565(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_RGB565, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_rgb565_obj, 1, py_image_to_rgb565); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_rgb565_obj, 1, py_image_to_rgb565); static mp_obj_t py_image_to_rainbow(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_RGB565, MP_ROM_INT(COLOR_PALETTE_RAINBOW), false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_rainbow_obj, 1, py_image_to_rainbow); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_rainbow_obj, 1, py_image_to_rainbow); static mp_obj_t py_image_to_ironbow(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_RGB565, MP_ROM_INT(COLOR_PALETTE_IRONBOW), false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_ironbow_obj, 1, py_image_to_ironbow); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_ironbow_obj, 1, py_image_to_ironbow); static mp_obj_t py_image_to_jpeg(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_JPEG, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_jpeg_obj, 1, py_image_to_jpeg); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_jpeg_obj, 1, py_image_to_jpeg); static mp_obj_t py_image_to_png(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_PNG, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_png_obj, 1, py_image_to_png); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_to_png_obj, 1, py_image_to_png); static mp_obj_t py_image_copy(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_INVALID, MP_ROM_NONE, true, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_copy_obj, 1, py_image_copy); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_copy_obj, 1, py_image_copy); static mp_obj_t py_image_crop(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { return py_image_to(PIXFORMAT_INVALID, MP_ROM_NONE, false, n_args, args, kw_args); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_crop_obj, 1, py_image_crop); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_crop_obj, 1, py_image_crop); #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) static mp_obj_t py_image_save(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -1091,20 +1091,20 @@ static mp_obj_t py_image_save(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_save_obj, 2, py_image_save); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_save_obj, 2, py_image_save); #endif //IMLIB_ENABLE_IMAGE_FILE_IO static mp_obj_t py_image_flush(mp_obj_t img_obj) { framebuffer_update_jpeg_buffer(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_flush_obj, py_image_flush); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_flush_obj, py_image_flush); ////////////////// // Drawing Methods ////////////////// -STATIC mp_obj_t py_image_clear(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_clear(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_UNCOMPRESSED); image_t *arg_msk = @@ -1118,9 +1118,9 @@ STATIC mp_obj_t py_image_clear(uint n_args, const mp_obj_t *args, mp_map_t *kw_a return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_clear_obj, 1, py_image_clear); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_clear_obj, 1, py_image_clear); -STATIC mp_obj_t py_image_draw_line(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_line(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1138,9 +1138,9 @@ STATIC mp_obj_t py_image_draw_line(uint n_args, const mp_obj_t *args, mp_map_t * imlib_draw_line(arg_img, arg_x0, arg_y0, arg_x1, arg_y1, arg_c, arg_thickness); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_line_obj, 2, py_image_draw_line); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_line_obj, 2, py_image_draw_line); -STATIC mp_obj_t py_image_draw_rectangle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_rectangle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1160,9 +1160,9 @@ STATIC mp_obj_t py_image_draw_rectangle(uint n_args, const mp_obj_t *args, mp_ma imlib_draw_rectangle(arg_img, arg_rx, arg_ry, arg_rw, arg_rh, arg_c, arg_thickness, arg_fill); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_rectangle_obj, 2, py_image_draw_rectangle); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_rectangle_obj, 2, py_image_draw_rectangle); -STATIC mp_obj_t py_image_draw_circle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_circle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1181,9 +1181,9 @@ STATIC mp_obj_t py_image_draw_circle(uint n_args, const mp_obj_t *args, mp_map_t imlib_draw_circle(arg_img, arg_cx, arg_cy, arg_cr, arg_c, arg_thickness, arg_fill); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_circle_obj, 2, py_image_draw_circle); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_circle_obj, 2, py_image_draw_circle); -STATIC mp_obj_t py_image_draw_ellipse(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_ellipse(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1204,9 +1204,9 @@ STATIC mp_obj_t py_image_draw_ellipse(uint n_args, const mp_obj_t *args, mp_map_ imlib_draw_ellipse(arg_img, arg_cx, arg_cy, arg_rx, arg_ry, arg_r, arg_c, arg_thickness, arg_fill); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_ellipse_obj, 2, py_image_draw_ellipse); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_ellipse_obj, 2, py_image_draw_ellipse); -STATIC mp_obj_t py_image_draw_string(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_string(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1245,9 +1245,9 @@ STATIC mp_obj_t py_image_draw_string(uint n_args, const mp_obj_t *args, mp_map_t arg_string_rotation, arg_string_hmirror, arg_string_vflip); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_string_obj, 2, py_image_draw_string); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_string_obj, 2, py_image_draw_string); -STATIC mp_obj_t py_image_draw_cross(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_cross(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1266,9 +1266,9 @@ STATIC mp_obj_t py_image_draw_cross(uint n_args, const mp_obj_t *args, mp_map_t imlib_draw_line(arg_img, arg_x, arg_y - arg_s, arg_x, arg_y + arg_s, arg_c, arg_thickness); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_cross_obj, 2, py_image_draw_cross); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_cross_obj, 2, py_image_draw_cross); -STATIC mp_obj_t py_image_draw_arrow(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_arrow(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1304,9 +1304,9 @@ STATIC mp_obj_t py_image_draw_arrow(uint n_args, const mp_obj_t *args, mp_map_t imlib_draw_line(arg_img, arg_x1, arg_y1, a1x, a1y, arg_c, arg_thickness); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_arrow_obj, 2, py_image_draw_arrow); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_arrow_obj, 2, py_image_draw_arrow); -STATIC mp_obj_t py_image_draw_edges(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_edges(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -1349,9 +1349,9 @@ STATIC mp_obj_t py_image_draw_edges(uint n_args, const mp_obj_t *args, mp_map_t return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_edges_obj, 2, py_image_draw_edges); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_edges_obj, 2, py_image_draw_edges); -STATIC mp_obj_t py_image_draw_image(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_image(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { fb_alloc_mark(); image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_other = py_helper_arg_to_image(args[1], ARG_IMAGE_ANY | ARG_IMAGE_ALLOC); @@ -1437,9 +1437,9 @@ STATIC mp_obj_t py_image_draw_image(uint n_args, const mp_obj_t *args, mp_map_t fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_image_obj, 3, py_image_draw_image); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_image_obj, 3, py_image_draw_image); -STATIC mp_obj_t py_image_draw_keypoints(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_draw_keypoints(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_c = @@ -1486,9 +1486,9 @@ STATIC mp_obj_t py_image_draw_keypoints(uint n_args, const mp_obj_t *args, mp_ma return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_keypoints_obj, 2, py_image_draw_keypoints); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_draw_keypoints_obj, 2, py_image_draw_keypoints); -STATIC mp_obj_t py_image_mask_rectangle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_mask_rectangle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_rx; int arg_ry; @@ -1522,9 +1522,9 @@ STATIC mp_obj_t py_image_mask_rectangle(uint n_args, const mp_obj_t *args, mp_ma fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_rectangle_obj, 1, py_image_mask_rectangle); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_rectangle_obj, 1, py_image_mask_rectangle); -STATIC mp_obj_t py_image_mask_circle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_mask_circle(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_cx; int arg_cy; @@ -1555,9 +1555,9 @@ STATIC mp_obj_t py_image_mask_circle(uint n_args, const mp_obj_t *args, mp_map_t fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_circle_obj, 1, py_image_mask_circle); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_circle_obj, 1, py_image_mask_circle); -STATIC mp_obj_t py_image_mask_ellipse(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_mask_ellipse(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_cx; int arg_cy; @@ -1594,10 +1594,10 @@ STATIC mp_obj_t py_image_mask_ellipse(uint n_args, const mp_obj_t *args, mp_map_ fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_ellipse_obj, 1, py_image_mask_ellipse); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mask_ellipse_obj, 1, py_image_mask_ellipse); #ifdef IMLIB_ENABLE_FLOOD_FILL -STATIC mp_obj_t py_image_flood_fill(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_flood_fill(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); const mp_obj_t *arg_vec; @@ -1629,7 +1629,7 @@ STATIC mp_obj_t py_image_flood_fill(uint n_args, const mp_obj_t *args, mp_map_t fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_flood_fill_obj, 2, py_image_flood_fill); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_flood_fill_obj, 2, py_image_flood_fill); #endif // IMLIB_ENABLE_FLOOD_FILL @@ -1638,7 +1638,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_flood_fill_obj, 2, py_image_flood_fil // ISP Methods ////////////// -STATIC mp_obj_t py_awb(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_awb(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_max }; static const mp_arg_t allowed_args[] = { { MP_QSTR_max, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} }, @@ -1660,9 +1660,9 @@ STATIC mp_obj_t py_awb(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) imlib_awb(image, r_out, g_out, b_out); return pos_args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_awb_obj, 1, py_awb); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_awb_obj, 1, py_awb); -STATIC mp_obj_t py_ccm(mp_obj_t img_obj, mp_obj_t ccm_obj) { +static mp_obj_t py_ccm(mp_obj_t img_obj, mp_obj_t ccm_obj) { image_t *image = py_helper_arg_to_image(img_obj, ARG_IMAGE_MUTABLE); float ccm[12] = {}; @@ -1711,9 +1711,9 @@ STATIC mp_obj_t py_ccm(mp_obj_t img_obj, mp_obj_t ccm_obj) { imlib_ccm(image, ccm, offset); return img_obj; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_ccm_obj, py_ccm); +static MP_DEFINE_CONST_FUN_OBJ_2(py_ccm_obj, py_ccm); -STATIC mp_obj_t py_image_gamma(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_gamma(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_gamma, ARG_contrast, ARG_brightness }; static const mp_arg_t allowed_args[] = { { MP_QSTR_gamma, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = MP_ROM_NONE } }, @@ -1735,7 +1735,7 @@ STATIC mp_obj_t py_image_gamma(uint n_args, const mp_obj_t *pos_args, mp_map_t * fb_alloc_free_till_mark(); return pos_args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_gamma_obj, 1, py_image_gamma); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_gamma_obj, 1, py_image_gamma); #endif // IMLIB_ENABLE_ISP_OPS @@ -1744,7 +1744,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_gamma_obj, 1, py_image_gamma); // Binary Methods ///////////////// -STATIC mp_obj_t py_image_binary(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_binary(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_thresholds, ARG_invert, ARG_zero, ARG_mask, ARG_to_bitmap, ARG_copy }; static const mp_arg_t allowed_args[] = { { MP_QSTR_thresholds, MP_ARG_OBJ | MP_ARG_REQUIRED, }, @@ -1809,15 +1809,15 @@ STATIC mp_obj_t py_image_binary(uint n_args, const mp_obj_t *pos_args, mp_map_t return py_image_from_struct(&out); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_binary_obj, 1, py_image_binary); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_binary_obj, 1, py_image_binary); -STATIC mp_obj_t py_image_invert(mp_obj_t img_obj) { +static mp_obj_t py_image_invert(mp_obj_t img_obj) { imlib_invert(py_helper_arg_to_image(img_obj, ARG_IMAGE_MUTABLE)); return img_obj; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_invert_obj, py_image_invert); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_invert_obj, py_image_invert); -STATIC mp_obj_t py_image_b_and(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_and(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1839,9 +1839,9 @@ STATIC mp_obj_t py_image_b_and(uint n_args, const mp_obj_t *args, mp_map_t *kw_a return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_and_obj, 2, py_image_b_and); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_and_obj, 2, py_image_b_and); -STATIC mp_obj_t py_image_b_nand(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_nand(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1863,9 +1863,9 @@ STATIC mp_obj_t py_image_b_nand(uint n_args, const mp_obj_t *args, mp_map_t *kw_ return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_nand_obj, 2, py_image_b_nand); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_nand_obj, 2, py_image_b_nand); -STATIC mp_obj_t py_image_b_or(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_or(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1887,9 +1887,9 @@ STATIC mp_obj_t py_image_b_or(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_or_obj, 2, py_image_b_or); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_or_obj, 2, py_image_b_or); -STATIC mp_obj_t py_image_b_nor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_nor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1911,9 +1911,9 @@ STATIC mp_obj_t py_image_b_nor(uint n_args, const mp_obj_t *args, mp_map_t *kw_a return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_nor_obj, 2, py_image_b_nor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_nor_obj, 2, py_image_b_nor); -STATIC mp_obj_t py_image_b_xor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_xor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1935,9 +1935,9 @@ STATIC mp_obj_t py_image_b_xor(uint n_args, const mp_obj_t *args, mp_map_t *kw_a return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_xor_obj, 2, py_image_b_xor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_xor_obj, 2, py_image_b_xor); -STATIC mp_obj_t py_image_b_xnor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_b_xnor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -1959,7 +1959,7 @@ STATIC mp_obj_t py_image_b_xnor(uint n_args, const mp_obj_t *args, mp_map_t *kw_ return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_xnor_obj, 2, py_image_b_xnor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_b_xnor_obj, 2, py_image_b_xnor); static mp_obj_t py_image_binary_morph_op(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args, binary_morph_op_t op) { @@ -1986,25 +1986,25 @@ static mp_obj_t py_image_binary_morph_op(uint n_args, const mp_obj_t *pos_args, return pos_args[0]; } -STATIC mp_obj_t py_image_erode(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_erode(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_erode); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_erode_obj, 2, py_image_erode); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_erode_obj, 2, py_image_erode); -STATIC mp_obj_t py_image_dilate(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_dilate(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_dilate); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_dilate_obj, 2, py_image_dilate); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_dilate_obj, 2, py_image_dilate); -STATIC mp_obj_t py_image_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_open); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_open_obj, 2, py_image_open); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_open_obj, 2, py_image_open); -STATIC mp_obj_t py_image_close(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_close(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_close); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_close_obj, 2, py_image_close); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_close_obj, 2, py_image_close); #endif // IMLIB_ENABLE_BINARY_OPS #ifdef IMLIB_ENABLE_MATH_OPS @@ -2012,7 +2012,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_close_obj, 2, py_image_close); // Math Methods /////////////// -STATIC mp_obj_t py_image_replace(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_replace(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); bool arg_hmirror = @@ -2057,9 +2057,9 @@ STATIC mp_obj_t py_image_replace(uint n_args, const mp_obj_t *args, mp_map_t *kw py_helper_update_framebuffer(arg_img); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_replace_obj, 1, py_image_replace); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_replace_obj, 1, py_image_replace); -STATIC mp_obj_t py_image_add(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_add(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -2081,9 +2081,9 @@ STATIC mp_obj_t py_image_add(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_add_obj, 2, py_image_add); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_add_obj, 2, py_image_add); -STATIC mp_obj_t py_image_sub(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_sub(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); bool arg_reverse = @@ -2107,9 +2107,9 @@ STATIC mp_obj_t py_image_sub(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_sub_obj, 2, py_image_sub); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_sub_obj, 2, py_image_sub); -STATIC mp_obj_t py_image_min(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_min(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -2131,9 +2131,9 @@ STATIC mp_obj_t py_image_min(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_min_obj, 2, py_image_min); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_min_obj, 2, py_image_min); -STATIC mp_obj_t py_image_max(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_max(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -2155,9 +2155,9 @@ STATIC mp_obj_t py_image_max(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_max_obj, 2, py_image_max); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_max_obj, 2, py_image_max); -STATIC mp_obj_t py_image_difference(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_difference(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); image_t *arg_msk = @@ -2179,9 +2179,9 @@ STATIC mp_obj_t py_image_difference(uint n_args, const mp_obj_t *args, mp_map_t return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_difference_obj, 2, py_image_difference); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_difference_obj, 2, py_image_difference); -STATIC mp_obj_t py_image_blend(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_blend(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); float arg_alpha = @@ -2206,19 +2206,19 @@ STATIC mp_obj_t py_image_blend(uint n_args, const mp_obj_t *args, mp_map_t *kw_a return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_blend_obj, 2, py_image_blend); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_blend_obj, 2, py_image_blend); #endif//IMLIB_ENABLE_MATH_OPS #if defined(IMLIB_ENABLE_MATH_OPS) && defined(IMLIB_ENABLE_BINARY_OPS) -STATIC mp_obj_t py_image_top_hat(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_top_hat(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_top_hat); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_top_hat_obj, 2, py_image_top_hat); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_top_hat_obj, 2, py_image_top_hat); -STATIC mp_obj_t py_image_black_hat(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_image_black_hat(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return py_image_binary_morph_op(n_args, pos_args, kw_args, imlib_black_hat); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_black_hat_obj, 2, py_image_black_hat); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_black_hat_obj, 2, py_image_black_hat); #endif // defined(IMLIB_ENABLE_MATH_OPS) && defined(IMLIB_ENABLE_BINARY_OPS) //////////////////// @@ -2244,10 +2244,10 @@ static mp_obj_t py_image_histeq(uint n_args, const mp_obj_t *args, mp_map_t *kw_ fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_histeq_obj, 1, py_image_histeq); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_histeq_obj, 1, py_image_histeq); #ifdef IMLIB_ENABLE_MEAN -STATIC mp_obj_t py_image_mean(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_mean(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2266,11 +2266,11 @@ STATIC mp_obj_t py_image_mean(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mean_obj, 2, py_image_mean); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mean_obj, 2, py_image_mean); #endif // IMLIB_ENABLE_MEAN #ifdef IMLIB_ENABLE_MEDIAN -STATIC mp_obj_t py_image_median(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_median(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2292,11 +2292,11 @@ STATIC mp_obj_t py_image_median(uint n_args, const mp_obj_t *args, mp_map_t *kw_ fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_median_obj, 2, py_image_median); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_median_obj, 2, py_image_median); #endif // IMLIB_ENABLE_MEDIAN #ifdef IMLIB_ENABLE_MODE -STATIC mp_obj_t py_image_mode(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_mode(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2315,11 +2315,11 @@ STATIC mp_obj_t py_image_mode(uint n_args, const mp_obj_t *args, mp_map_t *kw_ar fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mode_obj, 2, py_image_mode); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_mode_obj, 2, py_image_mode); #endif // IMLIB_ENABLE_MODE #ifdef IMLIB_ENABLE_MIDPOINT -STATIC mp_obj_t py_image_midpoint(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_midpoint(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2341,11 +2341,11 @@ STATIC mp_obj_t py_image_midpoint(uint n_args, const mp_obj_t *args, mp_map_t *k fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_midpoint_obj, 2, py_image_midpoint); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_midpoint_obj, 2, py_image_midpoint); #endif // IMLIB_ENABLE_MIDPOINT #ifdef IMLIB_ENABLE_MORPH -STATIC mp_obj_t py_image_morph(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_morph(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2387,11 +2387,11 @@ STATIC mp_obj_t py_image_morph(uint n_args, const mp_obj_t *args, mp_map_t *kw_a fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_morph_obj, 3, py_image_morph); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_morph_obj, 3, py_image_morph); #endif //IMLIB_ENABLE_MORPH #ifdef IMLIB_ENABLE_GAUSSIAN -STATIC mp_obj_t py_image_gaussian(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_gaussian(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2443,11 +2443,11 @@ STATIC mp_obj_t py_image_gaussian(uint n_args, const mp_obj_t *args, mp_map_t *k fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_gaussian_obj, 2, py_image_gaussian); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_gaussian_obj, 2, py_image_gaussian); #endif // IMLIB_ENABLE_GAUSSIAN #ifdef IMLIB_ENABLE_LAPLACIAN -STATIC mp_obj_t py_image_laplacian(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_laplacian(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2501,11 +2501,11 @@ STATIC mp_obj_t py_image_laplacian(uint n_args, const mp_obj_t *args, mp_map_t * fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_laplacian_obj, 2, py_image_laplacian); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_laplacian_obj, 2, py_image_laplacian); #endif // IMLIB_ENABLE_LAPLACIAN #ifdef IMLIB_ENABLE_BILATERAL -STATIC mp_obj_t py_image_bilateral(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_bilateral(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); int arg_ksize = @@ -2529,7 +2529,7 @@ STATIC mp_obj_t py_image_bilateral(uint n_args, const mp_obj_t *args, mp_map_t * fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_bilateral_obj, 2, py_image_bilateral); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_bilateral_obj, 2, py_image_bilateral); #endif // IMLIB_ENABLE_BILATERAL //////////////////// @@ -2550,7 +2550,7 @@ static mp_obj_t py_image_linpolar(uint n_args, const mp_obj_t *args, mp_map_t *k fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_linpolar_obj, 1, py_image_linpolar); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_linpolar_obj, 1, py_image_linpolar); #endif // IMLIB_ENABLE_LINPOLAR #ifdef IMLIB_ENABLE_LOGPOLAR @@ -2567,11 +2567,11 @@ static mp_obj_t py_image_logpolar(uint n_args, const mp_obj_t *args, mp_map_t *k fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_logpolar_obj, 1, py_image_logpolar); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_logpolar_obj, 1, py_image_logpolar); #endif // IMLIB_ENABLE_LOGPOLAR #ifdef IMLIB_ENABLE_LENS_CORR -STATIC mp_obj_t py_image_lens_corr(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_lens_corr(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); PY_ASSERT_FALSE_MSG(arg_img->w % 2, "Width must be even!"); @@ -2593,11 +2593,11 @@ STATIC mp_obj_t py_image_lens_corr(uint n_args, const mp_obj_t *args, mp_map_t * fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lens_corr_obj, 1, py_image_lens_corr); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lens_corr_obj, 1, py_image_lens_corr); #endif // IMLIB_ENABLE_LENS_CORR #ifdef IMLIB_ENABLE_ROTATION_CORR -STATIC mp_obj_t py_image_rotation_corr(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { +static mp_obj_t py_image_rotation_corr(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); float arg_x_rotation = @@ -2626,7 +2626,7 @@ STATIC mp_obj_t py_image_rotation_corr(uint n_args, const mp_obj_t *args, mp_map fb_alloc_free_till_mark(); return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rotation_corr_obj, 1, py_image_rotation_corr); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rotation_corr_obj, 1, py_image_rotation_corr); #endif // IMLIB_ENABLE_ROTATION_CORR ////////////// @@ -2677,33 +2677,33 @@ static mp_obj_t py_similarity_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t mp_obj_t py_similarity_mean(mp_obj_t self_in) { return ((py_similarity_obj_t *) self_in)->avg; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_mean_obj, py_similarity_mean); +static MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_mean_obj, py_similarity_mean); mp_obj_t py_similarity_stdev(mp_obj_t self_in) { return ((py_similarity_obj_t *) self_in)->std; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_stdev_obj, py_similarity_stdev); +static MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_stdev_obj, py_similarity_stdev); mp_obj_t py_similarity_min(mp_obj_t self_in) { return ((py_similarity_obj_t *) self_in)->min; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_min_obj, py_similarity_min); +static MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_min_obj, py_similarity_min); mp_obj_t py_similarity_max(mp_obj_t self_in) { return ((py_similarity_obj_t *) self_in)->max; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_max_obj, py_similarity_max); +static MP_DEFINE_CONST_FUN_OBJ_1(py_similarity_max_obj, py_similarity_max); -STATIC const mp_rom_map_elem_t py_similarity_locals_dict_table[] = { +static const mp_rom_map_elem_t py_similarity_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_mean), MP_ROM_PTR(&py_similarity_mean_obj) }, { MP_ROM_QSTR(MP_QSTR_stdev), MP_ROM_PTR(&py_similarity_stdev_obj) }, { MP_ROM_QSTR(MP_QSTR_min), MP_ROM_PTR(&py_similarity_min_obj) }, { MP_ROM_QSTR(MP_QSTR_max), MP_ROM_PTR(&py_similarity_max_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_similarity_locals_dict, py_similarity_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_similarity_locals_dict, py_similarity_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_similarity_type, MP_QSTR_similarity, MP_TYPE_FLAG_NONE, @@ -2771,7 +2771,7 @@ static mp_obj_t py_image_get_similarity(uint n_args, const mp_obj_t *pos_args, m o->max = mp_obj_new_float(max); return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_similarity_obj, 1, py_image_get_similarity); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_similarity_obj, 1, py_image_get_similarity); #endif // IMLIB_ENABLE_GET_SIMILARITY // Statistics Object // @@ -2897,164 +2897,164 @@ static mp_obj_t py_statistics_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t mp_obj_t py_statistics_mean(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMean; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_mean_obj, py_statistics_mean); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_mean_obj, py_statistics_mean); mp_obj_t py_statistics_median(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMedian; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_median_obj, py_statistics_median); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_median_obj, py_statistics_median); mp_obj_t py_statistics_mode(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMode; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_mode_obj, py_statistics_mode); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_mode_obj, py_statistics_mode); mp_obj_t py_statistics_stdev(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LSTDev; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_stdev_obj, py_statistics_stdev); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_stdev_obj, py_statistics_stdev); mp_obj_t py_statistics_min(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMin; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_min_obj, py_statistics_min); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_min_obj, py_statistics_min); mp_obj_t py_statistics_max(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMax; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_max_obj, py_statistics_max); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_max_obj, py_statistics_max); mp_obj_t py_statistics_lq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LLQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_lq_obj, py_statistics_lq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_lq_obj, py_statistics_lq); mp_obj_t py_statistics_uq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LUQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_uq_obj, py_statistics_uq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_uq_obj, py_statistics_uq); mp_obj_t py_statistics_l_mean(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMean; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_mean_obj, py_statistics_l_mean); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_mean_obj, py_statistics_l_mean); mp_obj_t py_statistics_l_median(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMedian; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_median_obj, py_statistics_l_median); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_median_obj, py_statistics_l_median); mp_obj_t py_statistics_l_mode(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMode; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_mode_obj, py_statistics_l_mode); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_mode_obj, py_statistics_l_mode); mp_obj_t py_statistics_l_stdev(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LSTDev; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_stdev_obj, py_statistics_l_stdev); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_stdev_obj, py_statistics_l_stdev); mp_obj_t py_statistics_l_min(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMin; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_min_obj, py_statistics_l_min); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_min_obj, py_statistics_l_min); mp_obj_t py_statistics_l_max(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LMax; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_max_obj, py_statistics_l_max); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_max_obj, py_statistics_l_max); mp_obj_t py_statistics_l_lq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LLQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_lq_obj, py_statistics_l_lq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_lq_obj, py_statistics_l_lq); mp_obj_t py_statistics_l_uq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->LUQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_uq_obj, py_statistics_l_uq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_l_uq_obj, py_statistics_l_uq); mp_obj_t py_statistics_a_mean(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AMean; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_mean_obj, py_statistics_a_mean); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_mean_obj, py_statistics_a_mean); mp_obj_t py_statistics_a_median(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AMedian; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_median_obj, py_statistics_a_median); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_median_obj, py_statistics_a_median); mp_obj_t py_statistics_a_mode(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AMode; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_mode_obj, py_statistics_a_mode); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_mode_obj, py_statistics_a_mode); mp_obj_t py_statistics_a_stdev(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->ASTDev; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_stdev_obj, py_statistics_a_stdev); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_stdev_obj, py_statistics_a_stdev); mp_obj_t py_statistics_a_min(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AMin; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_min_obj, py_statistics_a_min); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_min_obj, py_statistics_a_min); mp_obj_t py_statistics_a_max(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AMax; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_max_obj, py_statistics_a_max); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_max_obj, py_statistics_a_max); mp_obj_t py_statistics_a_lq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->ALQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_lq_obj, py_statistics_a_lq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_lq_obj, py_statistics_a_lq); mp_obj_t py_statistics_a_uq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->AUQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_uq_obj, py_statistics_a_uq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_a_uq_obj, py_statistics_a_uq); mp_obj_t py_statistics_b_mean(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BMean; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_mean_obj, py_statistics_b_mean); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_mean_obj, py_statistics_b_mean); mp_obj_t py_statistics_b_median(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BMedian; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_median_obj, py_statistics_b_median); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_median_obj, py_statistics_b_median); mp_obj_t py_statistics_b_mode(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BMode; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_mode_obj, py_statistics_b_mode); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_mode_obj, py_statistics_b_mode); mp_obj_t py_statistics_b_stdev(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BSTDev; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_stdev_obj, py_statistics_b_stdev); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_stdev_obj, py_statistics_b_stdev); mp_obj_t py_statistics_b_min(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BMin; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_min_obj, py_statistics_b_min); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_min_obj, py_statistics_b_min); mp_obj_t py_statistics_b_max(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BMax; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_max_obj, py_statistics_b_max); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_max_obj, py_statistics_b_max); mp_obj_t py_statistics_b_lq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BLQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_lq_obj, py_statistics_b_lq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_lq_obj, py_statistics_b_lq); mp_obj_t py_statistics_b_uq(mp_obj_t self_in) { return ((py_statistics_obj_t *) self_in)->BUQ; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_uq_obj, py_statistics_b_uq); +static MP_DEFINE_CONST_FUN_OBJ_1(py_statistics_b_uq_obj, py_statistics_b_uq); -STATIC const mp_rom_map_elem_t py_statistics_locals_dict_table[] = { +static const mp_rom_map_elem_t py_statistics_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_mean), MP_ROM_PTR(&py_statistics_mean_obj) }, { MP_ROM_QSTR(MP_QSTR_median), MP_ROM_PTR(&py_statistics_median_obj) }, { MP_ROM_QSTR(MP_QSTR_mode), MP_ROM_PTR(&py_statistics_mode_obj) }, @@ -3089,9 +3089,9 @@ STATIC const mp_rom_map_elem_t py_statistics_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_b_uq), MP_ROM_PTR(&py_statistics_b_uq_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_statistics_locals_dict, py_statistics_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_statistics_locals_dict, py_statistics_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_statistics_type, MP_QSTR_statistics, MP_TYPE_FLAG_NONE, @@ -3160,33 +3160,33 @@ static mp_obj_t py_percentile_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t mp_obj_t py_percentile_value(mp_obj_t self_in) { return ((py_percentile_obj_t *) self_in)->LValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_value_obj, py_percentile_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_value_obj, py_percentile_value); mp_obj_t py_percentile_l_value(mp_obj_t self_in) { return ((py_percentile_obj_t *) self_in)->LValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_l_value_obj, py_percentile_l_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_l_value_obj, py_percentile_l_value); mp_obj_t py_percentile_a_value(mp_obj_t self_in) { return ((py_percentile_obj_t *) self_in)->AValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_a_value_obj, py_percentile_a_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_a_value_obj, py_percentile_a_value); mp_obj_t py_percentile_b_value(mp_obj_t self_in) { return ((py_percentile_obj_t *) self_in)->BValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_b_value_obj, py_percentile_b_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_percentile_b_value_obj, py_percentile_b_value); -STATIC const mp_rom_map_elem_t py_percentile_locals_dict_table[] = { +static const mp_rom_map_elem_t py_percentile_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&py_percentile_value_obj) }, { MP_ROM_QSTR(MP_QSTR_l_value), MP_ROM_PTR(&py_percentile_l_value_obj) }, { MP_ROM_QSTR(MP_QSTR_a_value), MP_ROM_PTR(&py_percentile_a_value_obj) }, { MP_ROM_QSTR(MP_QSTR_b_value), MP_ROM_PTR(&py_percentile_b_value_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_percentile_locals_dict, py_percentile_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_percentile_locals_dict, py_percentile_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_percentile_type, MP_QSTR_percentile, MP_TYPE_FLAG_NONE, @@ -3255,33 +3255,33 @@ static mp_obj_t py_threshold_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t v mp_obj_t py_threshold_value(mp_obj_t self_in) { return ((py_threshold_obj_t *) self_in)->LValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_value_obj, py_threshold_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_value_obj, py_threshold_value); mp_obj_t py_threshold_l_value(mp_obj_t self_in) { return ((py_threshold_obj_t *) self_in)->LValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_l_value_obj, py_threshold_l_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_l_value_obj, py_threshold_l_value); mp_obj_t py_threshold_a_value(mp_obj_t self_in) { return ((py_threshold_obj_t *) self_in)->AValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_a_value_obj, py_threshold_a_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_a_value_obj, py_threshold_a_value); mp_obj_t py_threshold_b_value(mp_obj_t self_in) { return ((py_threshold_obj_t *) self_in)->BValue; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_b_value_obj, py_threshold_b_value); +static MP_DEFINE_CONST_FUN_OBJ_1(py_threshold_b_value_obj, py_threshold_b_value); -STATIC const mp_rom_map_elem_t py_threshold_locals_dict_table[] = { +static const mp_rom_map_elem_t py_threshold_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&py_threshold_value_obj) }, { MP_ROM_QSTR(MP_QSTR_l_value), MP_ROM_PTR(&py_threshold_l_value_obj) }, { MP_ROM_QSTR(MP_QSTR_a_value), MP_ROM_PTR(&py_threshold_a_value_obj) }, { MP_ROM_QSTR(MP_QSTR_b_value), MP_ROM_PTR(&py_threshold_b_value_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_threshold_locals_dict, py_threshold_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_threshold_locals_dict, py_threshold_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_threshold_type, MP_QSTR_threshold, MP_TYPE_FLAG_NONE, @@ -3355,22 +3355,22 @@ static mp_obj_t py_histogram_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t v mp_obj_t py_histogram_bins(mp_obj_t self_in) { return ((py_histogram_obj_t *) self_in)->LBins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_bins_obj, py_histogram_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_bins_obj, py_histogram_bins); mp_obj_t py_histogram_l_bins(mp_obj_t self_in) { return ((py_histogram_obj_t *) self_in)->LBins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_l_bins_obj, py_histogram_l_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_l_bins_obj, py_histogram_l_bins); mp_obj_t py_histogram_a_bins(mp_obj_t self_in) { return ((py_histogram_obj_t *) self_in)->ABins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_a_bins_obj, py_histogram_a_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_a_bins_obj, py_histogram_a_bins); mp_obj_t py_histogram_b_bins(mp_obj_t self_in) { return ((py_histogram_obj_t *) self_in)->BBins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_b_bins_obj, py_histogram_b_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_b_bins_obj, py_histogram_b_bins); mp_obj_t py_histogram_get_percentile(mp_obj_t self_in, mp_obj_t percentile) { histogram_t hist; @@ -3408,7 +3408,7 @@ mp_obj_t py_histogram_get_percentile(mp_obj_t self_in, mp_obj_t percentile) { return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_histogram_get_percentile_obj, py_histogram_get_percentile); +static MP_DEFINE_CONST_FUN_OBJ_2(py_histogram_get_percentile_obj, py_histogram_get_percentile); mp_obj_t py_histogram_get_threshold(mp_obj_t self_in) { histogram_t hist; @@ -3446,7 +3446,7 @@ mp_obj_t py_histogram_get_threshold(mp_obj_t self_in) { return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_get_threshold_obj, py_histogram_get_threshold); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_get_threshold_obj, py_histogram_get_threshold); mp_obj_t py_histogram_get_statistics(mp_obj_t self_in) { histogram_t hist; @@ -3505,9 +3505,9 @@ mp_obj_t py_histogram_get_statistics(mp_obj_t self_in) { return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_get_statistics_obj, py_histogram_get_statistics); +static MP_DEFINE_CONST_FUN_OBJ_1(py_histogram_get_statistics_obj, py_histogram_get_statistics); -STATIC const mp_rom_map_elem_t py_histogram_locals_dict_table[] = { +static const mp_rom_map_elem_t py_histogram_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_bins), MP_ROM_PTR(&py_histogram_bins_obj) }, { MP_ROM_QSTR(MP_QSTR_l_bins), MP_ROM_PTR(&py_histogram_l_bins_obj) }, { MP_ROM_QSTR(MP_QSTR_a_bins), MP_ROM_PTR(&py_histogram_a_bins_obj) }, @@ -3519,9 +3519,9 @@ STATIC const mp_rom_map_elem_t py_histogram_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_statistics), MP_ROM_PTR(&py_histogram_get_statistics_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_histogram_locals_dict, py_histogram_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_histogram_locals_dict, py_histogram_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_histogram_type, MP_QSTR_histogram, MP_TYPE_FLAG_NONE, @@ -3629,7 +3629,7 @@ static mp_obj_t py_image_get_histogram(uint n_args, const mp_obj_t *args, mp_map return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_histogram_obj, 1, py_image_get_histogram); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_histogram_obj, 1, py_image_get_histogram); static mp_obj_t py_image_get_statistics(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { image_t *arg_img = py_helper_arg_to_image(args[0], ARG_IMAGE_MUTABLE); @@ -3741,7 +3741,7 @@ static mp_obj_t py_image_get_statistics(uint n_args, const mp_obj_t *args, mp_ma return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_statistics_obj, 1, py_image_get_statistics); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_statistics_obj, 1, py_image_get_statistics); // Line Object // #define py_line_obj_size 8 @@ -3797,49 +3797,49 @@ mp_obj_t py_line_line(mp_obj_t self_in) { ((py_line_obj_t *) self_in)->x2, ((py_line_obj_t *) self_in)->y2}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_line_obj, py_line_line); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_line_obj, py_line_line); mp_obj_t py_line_x1(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->x1; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_x1_obj, py_line_x1); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_x1_obj, py_line_x1); mp_obj_t py_line_y1(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->y1; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_y1_obj, py_line_y1); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_y1_obj, py_line_y1); mp_obj_t py_line_x2(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->x2; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_x2_obj, py_line_x2); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_x2_obj, py_line_x2); mp_obj_t py_line_y2(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->y2; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_y2_obj, py_line_y2); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_y2_obj, py_line_y2); mp_obj_t py_line_length(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->length; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_length_obj, py_line_length); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_length_obj, py_line_length); mp_obj_t py_line_magnitude(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->magnitude; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_magnitude_obj, py_line_magnitude); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_magnitude_obj, py_line_magnitude); mp_obj_t py_line_theta(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->theta; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_theta_obj, py_line_theta); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_theta_obj, py_line_theta); mp_obj_t py_line_rho(mp_obj_t self_in) { return ((py_line_obj_t *) self_in)->rho; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_line_rho_obj, py_line_rho); +static MP_DEFINE_CONST_FUN_OBJ_1(py_line_rho_obj, py_line_rho); -STATIC const mp_rom_map_elem_t py_line_locals_dict_table[] = { +static const mp_rom_map_elem_t py_line_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_line), MP_ROM_PTR(&py_line_line_obj) }, { MP_ROM_QSTR(MP_QSTR_x1), MP_ROM_PTR(&py_line_x1_obj) }, { MP_ROM_QSTR(MP_QSTR_y1), MP_ROM_PTR(&py_line_y1_obj) }, @@ -3851,9 +3851,9 @@ STATIC const mp_rom_map_elem_t py_line_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_rho), MP_ROM_PTR(&py_line_rho_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_line_locals_dict, py_line_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_line_locals_dict, py_line_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_line_type, MP_QSTR_line, MP_TYPE_FLAG_NONE, @@ -3914,7 +3914,7 @@ static mp_obj_t py_image_get_regression(uint n_args, const mp_obj_t *args, mp_ma return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_regression_obj, 2, py_image_get_regression); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_get_regression_obj, 2, py_image_get_regression); /////////////// // Find Methods @@ -3985,12 +3985,12 @@ static mp_obj_t py_blob_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) mp_obj_t py_blob_corners(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_corners_obj, py_blob_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_corners_obj, py_blob_corners); mp_obj_t py_blob_min_corners(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->min_corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_min_corners_obj, py_blob_min_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_min_corners_obj, py_blob_min_corners); mp_obj_t py_blob_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_blob_obj_t *) self_in)->x, @@ -3998,104 +3998,104 @@ mp_obj_t py_blob_rect(mp_obj_t self_in) { ((py_blob_obj_t *) self_in)->w, ((py_blob_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rect_obj, py_blob_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rect_obj, py_blob_rect); mp_obj_t py_blob_x(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_x_obj, py_blob_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_x_obj, py_blob_x); mp_obj_t py_blob_y(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_y_obj, py_blob_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_y_obj, py_blob_y); mp_obj_t py_blob_w(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_w_obj, py_blob_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_w_obj, py_blob_w); mp_obj_t py_blob_h(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_h_obj, py_blob_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_h_obj, py_blob_h); mp_obj_t py_blob_pixels(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->pixels; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_pixels_obj, py_blob_pixels); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_pixels_obj, py_blob_pixels); mp_obj_t py_blob_cx(mp_obj_t self_in) { return mp_obj_new_int(fast_roundf(mp_obj_get_float(((py_blob_obj_t *) self_in)->cx))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cx_obj, py_blob_cx); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cx_obj, py_blob_cx); mp_obj_t py_blob_cxf(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->cx; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cxf_obj, py_blob_cxf); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cxf_obj, py_blob_cxf); mp_obj_t py_blob_cy(mp_obj_t self_in) { return mp_obj_new_int(fast_roundf(mp_obj_get_float(((py_blob_obj_t *) self_in)->cy))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cy_obj, py_blob_cy); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cy_obj, py_blob_cy); mp_obj_t py_blob_cyf(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->cy; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cyf_obj, py_blob_cyf); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_cyf_obj, py_blob_cyf); mp_obj_t py_blob_rotation(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_obj, py_blob_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_obj, py_blob_rotation); mp_obj_t py_blob_rotation_deg(mp_obj_t self_in) { return mp_obj_new_int(IM_RAD2DEG(mp_obj_get_float(((py_blob_obj_t *) self_in)->rotation))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_deg_obj, py_blob_rotation_deg); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_deg_obj, py_blob_rotation_deg); mp_obj_t py_blob_rotation_rad(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_rad_obj, py_blob_rotation_rad); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_rotation_rad_obj, py_blob_rotation_rad); mp_obj_t py_blob_code(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->code; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_code_obj, py_blob_code); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_code_obj, py_blob_code); mp_obj_t py_blob_count(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->count; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_count_obj, py_blob_count); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_count_obj, py_blob_count); mp_obj_t py_blob_perimeter(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->perimeter; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_perimeter_obj, py_blob_perimeter); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_perimeter_obj, py_blob_perimeter); mp_obj_t py_blob_roundness(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->roundness; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_roundness_obj, py_blob_roundness); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_roundness_obj, py_blob_roundness); mp_obj_t py_blob_elongation(mp_obj_t self_in) { return mp_obj_new_float(1 - mp_obj_get_float(((py_blob_obj_t *) self_in)->roundness)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_elongation_obj, py_blob_elongation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_elongation_obj, py_blob_elongation); mp_obj_t py_blob_area(mp_obj_t self_in) { return mp_obj_new_int(mp_obj_get_int(((py_blob_obj_t *) self_in)->w) * mp_obj_get_int(((py_blob_obj_t *) self_in)->h)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_area_obj, py_blob_area); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_area_obj, py_blob_area); mp_obj_t py_blob_density(mp_obj_t self_in) { int area = mp_obj_get_int(((py_blob_obj_t *) self_in)->w) * mp_obj_get_int(((py_blob_obj_t *) self_in)->h); int pixels = mp_obj_get_int(((py_blob_obj_t *) self_in)->pixels); return mp_obj_new_float(IM_DIV(pixels, ((float) area))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_density_obj, py_blob_density); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_density_obj, py_blob_density); // Rect-area versus pixels (e.g. blob area) -> Above. // Rect-area versus perimeter -> Basically the same as the above with a different scale factor. @@ -4106,7 +4106,7 @@ mp_obj_t py_blob_compactness(mp_obj_t self_in) { float perimeter = mp_obj_get_int(((py_blob_obj_t *) self_in)->perimeter); return mp_obj_new_float(IM_DIV((pixels * 4 * M_PI), (perimeter * perimeter))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_compactness_obj, py_blob_compactness); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_compactness_obj, py_blob_compactness); mp_obj_t py_blob_solidity(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4131,7 +4131,7 @@ mp_obj_t py_blob_solidity(mp_obj_t self_in) { int pixels = mp_obj_get_int(((py_blob_obj_t *) self_in)->pixels); return mp_obj_new_float(IM_MIN(IM_DIV(pixels, min_area), 1)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_solidity_obj, py_blob_solidity); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_solidity_obj, py_blob_solidity); mp_obj_t py_blob_convexity(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4158,7 +4158,7 @@ mp_obj_t py_blob_convexity(mp_obj_t self_in) { int perimeter = mp_obj_get_int(((py_blob_obj_t *) self_in)->perimeter); return mp_obj_new_float(IM_MIN(IM_DIV(d0 + d1 + d2 + d3, perimeter), 1)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_convexity_obj, py_blob_convexity); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_convexity_obj, py_blob_convexity); // Min rect-area versus pixels (e.g. blob area) -> Above. // Min rect-area versus perimeter -> Basically the same as the above with a different scale factor. // Min rect-perimeter versus pixels (e.g. blob area) -> Basically the same as the above with a different scale factor. @@ -4167,12 +4167,12 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_convexity_obj, py_blob_convexity); mp_obj_t py_blob_x_hist_bins(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->x_hist_bins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_x_hist_bins_obj, py_blob_x_hist_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_x_hist_bins_obj, py_blob_x_hist_bins); mp_obj_t py_blob_y_hist_bins(mp_obj_t self_in) { return ((py_blob_obj_t *) self_in)->y_hist_bins; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_y_hist_bins_obj, py_blob_y_hist_bins); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_y_hist_bins_obj, py_blob_y_hist_bins); mp_obj_t py_blob_major_axis_line(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4216,7 +4216,7 @@ mp_obj_t py_blob_major_axis_line(mp_obj_t self_in) { mp_obj_new_int(m3y)}); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_major_axis_line_obj, py_blob_major_axis_line); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_major_axis_line_obj, py_blob_major_axis_line); mp_obj_t py_blob_minor_axis_line(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4260,7 +4260,7 @@ mp_obj_t py_blob_minor_axis_line(mp_obj_t self_in) { mp_obj_new_int(m3y)}); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_minor_axis_line_obj, py_blob_minor_axis_line); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_minor_axis_line_obj, py_blob_minor_axis_line); mp_obj_t py_blob_enclosing_circle(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4293,7 +4293,7 @@ mp_obj_t py_blob_enclosing_circle(mp_obj_t self_in) { mp_obj_new_int(cy), mp_obj_new_int(fast_roundf(d))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_enclosing_circle_obj, py_blob_enclosing_circle); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_enclosing_circle_obj, py_blob_enclosing_circle); mp_obj_t py_blob_enclosed_ellipse(mp_obj_t self_in) { mp_obj_t *corners, *p0, *p1, *p2, *p3; @@ -4349,9 +4349,9 @@ mp_obj_t py_blob_enclosed_ellipse(mp_obj_t self_in) { mp_obj_new_int(b), mp_obj_new_int(r)}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_blob_enclosed_ellipse_obj, py_blob_enclosed_ellipse); +static MP_DEFINE_CONST_FUN_OBJ_1(py_blob_enclosed_ellipse_obj, py_blob_enclosed_ellipse); -STATIC const mp_rom_map_elem_t py_blob_locals_dict_table[] = { +static const mp_rom_map_elem_t py_blob_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_blob_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_min_corners), MP_ROM_PTR(&py_blob_min_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_blob_rect_obj) }, @@ -4386,9 +4386,9 @@ STATIC const mp_rom_map_elem_t py_blob_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_enclosed_ellipse), MP_ROM_PTR(&py_blob_enclosed_ellipse_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_blob_locals_dict, py_blob_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_blob_locals_dict, py_blob_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_blob_type, MP_QSTR_blob, MP_TYPE_FLAG_NONE, @@ -4534,7 +4534,7 @@ static mp_obj_t py_image_find_blobs(uint n_args, const mp_obj_t *args, mp_map_t return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_blobs_obj, 2, py_image_find_blobs); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_blobs_obj, 2, py_image_find_blobs); #ifdef IMLIB_ENABLE_FIND_LINES static mp_obj_t py_image_find_lines(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -4579,7 +4579,7 @@ static mp_obj_t py_image_find_lines(uint n_args, const mp_obj_t *args, mp_map_t return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_lines_obj, 1, py_image_find_lines); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_lines_obj, 1, py_image_find_lines); #endif // IMLIB_ENABLE_FIND_LINES #ifdef IMLIB_ENABLE_FIND_LINE_SEGMENTS @@ -4620,7 +4620,7 @@ static mp_obj_t py_image_find_line_segments(uint n_args, const mp_obj_t *args, m return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_line_segments_obj, 1, py_image_find_line_segments); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_line_segments_obj, 1, py_image_find_line_segments); #endif // IMLIB_ENABLE_FIND_LINE_SEGMENTS #ifdef IMLIB_ENABLE_FIND_CIRCLES @@ -4669,29 +4669,29 @@ mp_obj_t py_circle_circle(mp_obj_t self_in) { ((py_circle_obj_t *) self_in)->y, ((py_circle_obj_t *) self_in)->r}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_circle_circle_obj, py_circle_circle); +static MP_DEFINE_CONST_FUN_OBJ_1(py_circle_circle_obj, py_circle_circle); mp_obj_t py_circle_x(mp_obj_t self_in) { return ((py_circle_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_circle_x_obj, py_circle_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_circle_x_obj, py_circle_x); mp_obj_t py_circle_y(mp_obj_t self_in) { return ((py_circle_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_circle_y_obj, py_circle_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_circle_y_obj, py_circle_y); mp_obj_t py_circle_r(mp_obj_t self_in) { return ((py_circle_obj_t *) self_in)->r; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_circle_r_obj, py_circle_r); +static MP_DEFINE_CONST_FUN_OBJ_1(py_circle_r_obj, py_circle_r); mp_obj_t py_circle_magnitude(mp_obj_t self_in) { return ((py_circle_obj_t *) self_in)->magnitude; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_circle_magnitude_obj, py_circle_magnitude); +static MP_DEFINE_CONST_FUN_OBJ_1(py_circle_magnitude_obj, py_circle_magnitude); -STATIC const mp_rom_map_elem_t py_circle_locals_dict_table[] = { +static const mp_rom_map_elem_t py_circle_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_circle), MP_ROM_PTR(&py_circle_circle_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_circle_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&py_circle_y_obj) }, @@ -4699,9 +4699,9 @@ STATIC const mp_rom_map_elem_t py_circle_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_magnitude), MP_ROM_PTR(&py_circle_magnitude_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_circle_locals_dict, py_circle_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_circle_locals_dict, py_circle_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_circle_type, MP_QSTR_circle, MP_TYPE_FLAG_NONE, @@ -4753,7 +4753,7 @@ static mp_obj_t py_image_find_circles(uint n_args, const mp_obj_t *args, mp_map_ return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_circles_obj, 1, py_image_find_circles); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_circles_obj, 1, py_image_find_circles); #endif // IMLIB_ENABLE_FIND_CIRCLES #ifdef IMLIB_ENABLE_FIND_RECTS @@ -4803,7 +4803,7 @@ static mp_obj_t py_rect_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) mp_obj_t py_rect_corners(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_corners_obj, py_rect_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_corners_obj, py_rect_corners); mp_obj_t py_rect_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_rect_obj_t *) self_in)->x, @@ -4811,34 +4811,34 @@ mp_obj_t py_rect_rect(mp_obj_t self_in) { ((py_rect_obj_t *) self_in)->w, ((py_rect_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_rect_obj, py_rect_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_rect_obj, py_rect_rect); mp_obj_t py_rect_x(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_x_obj, py_rect_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_x_obj, py_rect_x); mp_obj_t py_rect_y(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_y_obj, py_rect_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_y_obj, py_rect_y); mp_obj_t py_rect_w(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_w_obj, py_rect_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_w_obj, py_rect_w); mp_obj_t py_rect_h(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_h_obj, py_rect_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_h_obj, py_rect_h); mp_obj_t py_rect_magnitude(mp_obj_t self_in) { return ((py_rect_obj_t *) self_in)->magnitude; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_rect_magnitude_obj, py_rect_magnitude); +static MP_DEFINE_CONST_FUN_OBJ_1(py_rect_magnitude_obj, py_rect_magnitude); -STATIC const mp_rom_map_elem_t py_rect_locals_dict_table[] = { +static const mp_rom_map_elem_t py_rect_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_rect_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_rect_rect_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_rect_x_obj) }, @@ -4848,9 +4848,9 @@ STATIC const mp_rom_map_elem_t py_rect_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_magnitude), MP_ROM_PTR(&py_rect_magnitude_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_rect_locals_dict, py_rect_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_rect_locals_dict, py_rect_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_rect_type, MP_QSTR_rect, MP_TYPE_FLAG_NONE, @@ -4903,7 +4903,7 @@ static mp_obj_t py_image_find_rects(uint n_args, const mp_obj_t *args, mp_map_t return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_rects_obj, 1, py_image_find_rects); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_rects_obj, 1, py_image_find_rects); #endif // IMLIB_ENABLE_FIND_RECTS #ifdef IMLIB_ENABLE_QRCODES @@ -4964,7 +4964,7 @@ static mp_obj_t py_qrcode_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t valu mp_obj_t py_qrcode_corners(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_corners_obj, py_qrcode_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_corners_obj, py_qrcode_corners); mp_obj_t py_qrcode_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_qrcode_obj_t *) self_in)->x, @@ -4972,79 +4972,79 @@ mp_obj_t py_qrcode_rect(mp_obj_t self_in) { ((py_qrcode_obj_t *) self_in)->w, ((py_qrcode_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_rect_obj, py_qrcode_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_rect_obj, py_qrcode_rect); mp_obj_t py_qrcode_x(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_x_obj, py_qrcode_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_x_obj, py_qrcode_x); mp_obj_t py_qrcode_y(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_y_obj, py_qrcode_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_y_obj, py_qrcode_y); mp_obj_t py_qrcode_w(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_w_obj, py_qrcode_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_w_obj, py_qrcode_w); mp_obj_t py_qrcode_h(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_h_obj, py_qrcode_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_h_obj, py_qrcode_h); mp_obj_t py_qrcode_payload(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->payload; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_payload_obj, py_qrcode_payload); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_payload_obj, py_qrcode_payload); mp_obj_t py_qrcode_version(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->version; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_version_obj, py_qrcode_version); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_version_obj, py_qrcode_version); mp_obj_t py_qrcode_ecc_level(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->ecc_level; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_ecc_level_obj, py_qrcode_ecc_level); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_ecc_level_obj, py_qrcode_ecc_level); mp_obj_t py_qrcode_mask(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->mask; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_mask_obj, py_qrcode_mask); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_mask_obj, py_qrcode_mask); mp_obj_t py_qrcode_data_type(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->data_type; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_data_type_obj, py_qrcode_data_type); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_data_type_obj, py_qrcode_data_type); mp_obj_t py_qrcode_eci(mp_obj_t self_in) { return ((py_qrcode_obj_t *) self_in)->eci; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_eci_obj, py_qrcode_eci); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_eci_obj, py_qrcode_eci); mp_obj_t py_qrcode_is_numeric(mp_obj_t self_in) { return mp_obj_new_bool(mp_obj_get_int(((py_qrcode_obj_t *) self_in)->data_type) == 1); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_numeric_obj, py_qrcode_is_numeric); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_numeric_obj, py_qrcode_is_numeric); mp_obj_t py_qrcode_is_alphanumeric(mp_obj_t self_in) { return mp_obj_new_bool(mp_obj_get_int(((py_qrcode_obj_t *) self_in)->data_type) == 2); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_alphanumeric_obj, py_qrcode_is_alphanumeric); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_alphanumeric_obj, py_qrcode_is_alphanumeric); mp_obj_t py_qrcode_is_binary(mp_obj_t self_in) { return mp_obj_new_bool(mp_obj_get_int(((py_qrcode_obj_t *) self_in)->data_type) == 4); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_binary_obj, py_qrcode_is_binary); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_binary_obj, py_qrcode_is_binary); mp_obj_t py_qrcode_is_kanji(mp_obj_t self_in) { return mp_obj_new_bool(mp_obj_get_int(((py_qrcode_obj_t *) self_in)->data_type) == 8); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_kanji_obj, py_qrcode_is_kanji); +static MP_DEFINE_CONST_FUN_OBJ_1(py_qrcode_is_kanji_obj, py_qrcode_is_kanji); -STATIC const mp_rom_map_elem_t py_qrcode_locals_dict_table[] = { +static const mp_rom_map_elem_t py_qrcode_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_qrcode_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_qrcode_rect_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_qrcode_x_obj) }, @@ -5063,9 +5063,9 @@ STATIC const mp_rom_map_elem_t py_qrcode_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_is_kanji), MP_ROM_PTR(&py_qrcode_is_kanji_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_qrcode_locals_dict, py_qrcode_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_qrcode_locals_dict, py_qrcode_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_qrcode_type, MP_QSTR_qrcode, MP_TYPE_FLAG_NONE, @@ -5122,7 +5122,7 @@ static mp_obj_t py_image_find_qrcodes(uint n_args, const mp_obj_t *args, mp_map_ return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_qrcodes_obj, 1, py_image_find_qrcodes); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_qrcodes_obj, 1, py_image_find_qrcodes); #endif // IMLIB_ENABLE_QRCODES #ifdef IMLIB_ENABLE_APRILTAGS @@ -5203,7 +5203,7 @@ static mp_obj_t py_apriltag_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t va mp_obj_t py_apriltag_corners(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_corners_obj, py_apriltag_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_corners_obj, py_apriltag_corners); mp_obj_t py_apriltag_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_apriltag_obj_t *) self_in)->x, @@ -5211,109 +5211,109 @@ mp_obj_t py_apriltag_rect(mp_obj_t self_in) { ((py_apriltag_obj_t *) self_in)->w, ((py_apriltag_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_rect_obj, py_apriltag_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_rect_obj, py_apriltag_rect); mp_obj_t py_apriltag_x(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_obj, py_apriltag_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_obj, py_apriltag_x); mp_obj_t py_apriltag_y(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_obj, py_apriltag_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_obj, py_apriltag_y); mp_obj_t py_apriltag_w(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_w_obj, py_apriltag_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_w_obj, py_apriltag_w); mp_obj_t py_apriltag_h(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_h_obj, py_apriltag_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_h_obj, py_apriltag_h); mp_obj_t py_apriltag_id(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->id; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_id_obj, py_apriltag_id); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_id_obj, py_apriltag_id); mp_obj_t py_apriltag_family(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->family; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_family_obj, py_apriltag_family); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_family_obj, py_apriltag_family); mp_obj_t py_apriltag_cx(mp_obj_t self_in) { return mp_obj_new_int(fast_roundf(mp_obj_get_float(((py_apriltag_obj_t *) self_in)->cx))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cx_obj, py_apriltag_cx); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cx_obj, py_apriltag_cx); mp_obj_t py_apriltag_cxf(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->cx; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cxf_obj, py_apriltag_cxf); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cxf_obj, py_apriltag_cxf); mp_obj_t py_apriltag_cy(mp_obj_t self_in) { return mp_obj_new_int(fast_roundf(mp_obj_get_float(((py_apriltag_obj_t *) self_in)->cy))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cy_obj, py_apriltag_cy); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cy_obj, py_apriltag_cy); mp_obj_t py_apriltag_cyf(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->cy; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cyf_obj, py_apriltag_cyf); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_cyf_obj, py_apriltag_cyf); mp_obj_t py_apriltag_rotation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_rotation_obj, py_apriltag_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_rotation_obj, py_apriltag_rotation); mp_obj_t py_apriltag_decision_margin(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->decision_margin; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_decision_margin_obj, py_apriltag_decision_margin); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_decision_margin_obj, py_apriltag_decision_margin); mp_obj_t py_apriltag_hamming(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->hamming; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_hamming_obj, py_apriltag_hamming); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_hamming_obj, py_apriltag_hamming); mp_obj_t py_apriltag_goodness(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->goodness; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_goodness_obj, py_apriltag_goodness); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_goodness_obj, py_apriltag_goodness); mp_obj_t py_apriltag_x_translation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->x_translation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_translation_obj, py_apriltag_x_translation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_translation_obj, py_apriltag_x_translation); mp_obj_t py_apriltag_y_translation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->y_translation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_translation_obj, py_apriltag_y_translation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_translation_obj, py_apriltag_y_translation); mp_obj_t py_apriltag_z_translation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->z_translation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_z_translation_obj, py_apriltag_z_translation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_z_translation_obj, py_apriltag_z_translation); mp_obj_t py_apriltag_x_rotation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->x_rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_rotation_obj, py_apriltag_x_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_x_rotation_obj, py_apriltag_x_rotation); mp_obj_t py_apriltag_y_rotation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->y_rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_rotation_obj, py_apriltag_y_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_y_rotation_obj, py_apriltag_y_rotation); mp_obj_t py_apriltag_z_rotation(mp_obj_t self_in) { return ((py_apriltag_obj_t *) self_in)->z_rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_z_rotation_obj, py_apriltag_z_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_apriltag_z_rotation_obj, py_apriltag_z_rotation); -STATIC const mp_rom_map_elem_t py_apriltag_locals_dict_table[] = { +static const mp_rom_map_elem_t py_apriltag_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_apriltag_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_apriltag_rect_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_apriltag_x_obj) }, @@ -5338,9 +5338,9 @@ STATIC const mp_rom_map_elem_t py_apriltag_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_z_rotation), MP_ROM_PTR(&py_apriltag_z_rotation_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_apriltag_locals_dict, py_apriltag_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_apriltag_locals_dict, py_apriltag_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_apriltag_type, MP_QSTR_apriltag, MP_TYPE_FLAG_NONE, @@ -5420,7 +5420,7 @@ static mp_obj_t py_image_find_apriltags(uint n_args, const mp_obj_t *args, mp_ma return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_apriltags_obj, 1, py_image_find_apriltags); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_apriltags_obj, 1, py_image_find_apriltags); #endif // IMLIB_ENABLE_APRILTAGS #ifdef IMLIB_ENABLE_DATAMATRICES @@ -5481,7 +5481,7 @@ static mp_obj_t py_datamatrix_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t mp_obj_t py_datamatrix_corners(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_corners_obj, py_datamatrix_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_corners_obj, py_datamatrix_corners); mp_obj_t py_datamatrix_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_datamatrix_obj_t *) self_in)->x, @@ -5489,59 +5489,59 @@ mp_obj_t py_datamatrix_rect(mp_obj_t self_in) { ((py_datamatrix_obj_t *) self_in)->w, ((py_datamatrix_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rect_obj, py_datamatrix_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rect_obj, py_datamatrix_rect); mp_obj_t py_datamatrix_x(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_x_obj, py_datamatrix_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_x_obj, py_datamatrix_x); mp_obj_t py_datamatrix_y(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_y_obj, py_datamatrix_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_y_obj, py_datamatrix_y); mp_obj_t py_datamatrix_w(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_w_obj, py_datamatrix_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_w_obj, py_datamatrix_w); mp_obj_t py_datamatrix_h(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_h_obj, py_datamatrix_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_h_obj, py_datamatrix_h); mp_obj_t py_datamatrix_payload(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->payload; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_payload_obj, py_datamatrix_payload); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_payload_obj, py_datamatrix_payload); mp_obj_t py_datamatrix_rotation(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rotation_obj, py_datamatrix_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rotation_obj, py_datamatrix_rotation); mp_obj_t py_datamatrix_rows(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->rows; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rows_obj, py_datamatrix_rows); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_rows_obj, py_datamatrix_rows); mp_obj_t py_datamatrix_columns(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->columns; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_columns_obj, py_datamatrix_columns); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_columns_obj, py_datamatrix_columns); mp_obj_t py_datamatrix_capacity(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->capacity; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_capacity_obj, py_datamatrix_capacity); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_capacity_obj, py_datamatrix_capacity); mp_obj_t py_datamatrix_padding(mp_obj_t self_in) { return ((py_datamatrix_obj_t *) self_in)->padding; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_padding_obj, py_datamatrix_padding); +static MP_DEFINE_CONST_FUN_OBJ_1(py_datamatrix_padding_obj, py_datamatrix_padding); -STATIC const mp_rom_map_elem_t py_datamatrix_locals_dict_table[] = { +static const mp_rom_map_elem_t py_datamatrix_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_datamatrix_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_datamatrix_rect_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_datamatrix_x_obj) }, @@ -5556,9 +5556,9 @@ STATIC const mp_rom_map_elem_t py_datamatrix_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_padding), MP_ROM_PTR(&py_datamatrix_padding_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_datamatrix_locals_dict, py_datamatrix_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_datamatrix_locals_dict, py_datamatrix_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_datamatrix_type, MP_QSTR_datamatrix, MP_TYPE_FLAG_NONE, @@ -5617,7 +5617,7 @@ static mp_obj_t py_image_find_datamatrices(uint n_args, const mp_obj_t *args, mp return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_datamatrices_obj, 1, py_image_find_datamatrices); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_datamatrices_obj, 1, py_image_find_datamatrices); #endif // IMLIB_ENABLE_DATAMATRICES #ifdef IMLIB_ENABLE_BARCODES @@ -5674,7 +5674,7 @@ static mp_obj_t py_barcode_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t val mp_obj_t py_barcode_corners(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->corners; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_corners_obj, py_barcode_corners); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_corners_obj, py_barcode_corners); mp_obj_t py_barcode_rect(mp_obj_t self_in) { return mp_obj_new_tuple(4, (mp_obj_t []) {((py_barcode_obj_t *) self_in)->x, @@ -5682,49 +5682,49 @@ mp_obj_t py_barcode_rect(mp_obj_t self_in) { ((py_barcode_obj_t *) self_in)->w, ((py_barcode_obj_t *) self_in)->h}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_rect_obj, py_barcode_rect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_rect_obj, py_barcode_rect); mp_obj_t py_barcode_x(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->x; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_x_obj, py_barcode_x); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_x_obj, py_barcode_x); mp_obj_t py_barcode_y(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->y; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_y_obj, py_barcode_y); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_y_obj, py_barcode_y); mp_obj_t py_barcode_w(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->w; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_w_obj, py_barcode_w); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_w_obj, py_barcode_w); mp_obj_t py_barcode_h(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->h; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_h_obj, py_barcode_h); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_h_obj, py_barcode_h); mp_obj_t py_barcode_payload_fun(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->payload; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_payload_fun_obj, py_barcode_payload_fun); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_payload_fun_obj, py_barcode_payload_fun); mp_obj_t py_barcode_type_fun(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->type; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_type_fun_obj, py_barcode_type_fun); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_type_fun_obj, py_barcode_type_fun); mp_obj_t py_barcode_rotation_fun(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_rotation_fun_obj, py_barcode_rotation_fun); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_rotation_fun_obj, py_barcode_rotation_fun); mp_obj_t py_barcode_quality_fun(mp_obj_t self_in) { return ((py_barcode_obj_t *) self_in)->quality; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_quality_fun_obj, py_barcode_quality_fun); +static MP_DEFINE_CONST_FUN_OBJ_1(py_barcode_quality_fun_obj, py_barcode_quality_fun); -STATIC const mp_rom_map_elem_t py_barcode_locals_dict_table[] = { +static const mp_rom_map_elem_t py_barcode_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_corners), MP_ROM_PTR(&py_barcode_corners_obj) }, { MP_ROM_QSTR(MP_QSTR_rect), MP_ROM_PTR(&py_barcode_rect_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&py_barcode_x_obj) }, @@ -5737,9 +5737,9 @@ STATIC const mp_rom_map_elem_t py_barcode_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_quality), MP_ROM_PTR(&py_barcode_quality_fun_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_barcode_locals_dict, py_barcode_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_barcode_locals_dict, py_barcode_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_barcode_type, MP_QSTR_barcode, MP_TYPE_FLAG_NONE, @@ -5794,7 +5794,7 @@ static mp_obj_t py_image_find_barcodes(uint n_args, const mp_obj_t *args, mp_map return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_barcodes_obj, 1, py_image_find_barcodes); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_barcodes_obj, 1, py_image_find_barcodes); #endif // IMLIB_ENABLE_BARCODES #ifdef IMLIB_ENABLE_FIND_DISPLACEMENT @@ -5843,29 +5843,29 @@ static mp_obj_t py_displacement_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_ mp_obj_t py_displacement_x_translation(mp_obj_t self_in) { return ((py_displacement_obj_t *) self_in)->x_translation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_x_translation_obj, py_displacement_x_translation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_x_translation_obj, py_displacement_x_translation); mp_obj_t py_displacement_y_translation(mp_obj_t self_in) { return ((py_displacement_obj_t *) self_in)->y_translation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_y_translation_obj, py_displacement_y_translation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_y_translation_obj, py_displacement_y_translation); mp_obj_t py_displacement_rotation(mp_obj_t self_in) { return ((py_displacement_obj_t *) self_in)->rotation; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_rotation_obj, py_displacement_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_rotation_obj, py_displacement_rotation); mp_obj_t py_displacement_scale(mp_obj_t self_in) { return ((py_displacement_obj_t *) self_in)->scale; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_scale_obj, py_displacement_scale); +static MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_scale_obj, py_displacement_scale); mp_obj_t py_displacement_response(mp_obj_t self_in) { return ((py_displacement_obj_t *) self_in)->response; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_response_obj, py_displacement_response); +static MP_DEFINE_CONST_FUN_OBJ_1(py_displacement_response_obj, py_displacement_response); -STATIC const mp_rom_map_elem_t py_displacement_locals_dict_table[] = { +static const mp_rom_map_elem_t py_displacement_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_x_translation), MP_ROM_PTR(&py_displacement_x_translation_obj) }, { MP_ROM_QSTR(MP_QSTR_y_translation), MP_ROM_PTR(&py_displacement_y_translation_obj) }, { MP_ROM_QSTR(MP_QSTR_rotation), MP_ROM_PTR(&py_displacement_rotation_obj) }, @@ -5873,9 +5873,9 @@ STATIC const mp_rom_map_elem_t py_displacement_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_response), MP_ROM_PTR(&py_displacement_response_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_displacement_locals_dict, py_displacement_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_displacement_locals_dict, py_displacement_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_displacement_type, MP_QSTR_displacement, MP_TYPE_FLAG_NONE, @@ -5917,7 +5917,7 @@ static mp_obj_t py_image_find_displacement(uint n_args, const mp_obj_t *args, mp return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_displacement_obj, 2, py_image_find_displacement); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_displacement_obj, 2, py_image_find_displacement); #endif // IMLIB_ENABLE_FIND_DISPLACEMENT #ifdef IMLIB_FIND_TEMPLATE @@ -5962,7 +5962,7 @@ static mp_obj_t py_image_find_template(uint n_args, const mp_obj_t *args, mp_map } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_template_obj, 3, py_image_find_template); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_template_obj, 3, py_image_find_template); #endif // IMLIB_FIND_TEMPLATE #ifdef IMLIB_ENABLE_FEATURES @@ -5999,7 +5999,7 @@ static mp_obj_t py_image_find_features(uint n_args, const mp_obj_t *args, mp_map array_free(objects_array); return objects_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_features_obj, 2, py_image_find_features); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_features_obj, 2, py_image_find_features); #endif // IMLIB_ENABLE_FEATURES static mp_obj_t py_image_find_eye(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -6018,7 +6018,7 @@ static mp_obj_t py_image_find_eye(uint n_args, const mp_obj_t *args, mp_map_t *k return mp_obj_new_tuple(2, eye_obj); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_eye_obj, 2, py_image_find_eye); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_eye_obj, 2, py_image_find_eye); #ifdef IMLIB_ENABLE_FIND_LBP static mp_obj_t py_image_find_lbp(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -6032,7 +6032,7 @@ static mp_obj_t py_image_find_lbp(uint n_args, const mp_obj_t *args, mp_map_t *k lbp_obj->hist = imlib_lbp_desc(arg_img, &roi); return lbp_obj; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_lbp_obj, 2, py_image_find_lbp); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_lbp_obj, 2, py_image_find_lbp); #endif // IMLIB_ENABLE_FIND_LBP #ifdef IMLIB_ENABLE_FIND_KEYPOINTS @@ -6073,7 +6073,7 @@ static mp_obj_t py_image_find_keypoints(uint n_args, const mp_obj_t *args, mp_ma } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_keypoints_obj, 1, py_image_find_keypoints); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_keypoints_obj, 1, py_image_find_keypoints); #endif // IMLIB_ENABLE_FIND_KEYPOINTS #ifdef IMLIB_ENABLE_BINARY_OPS @@ -6112,7 +6112,7 @@ static mp_obj_t py_image_find_edges(uint n_args, const mp_obj_t *args, mp_map_t return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_edges_obj, 2, py_image_find_edges); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_edges_obj, 2, py_image_find_edges); #endif #ifdef IMLIB_ENABLE_HOG @@ -6130,7 +6130,7 @@ static mp_obj_t py_image_find_hog(uint n_args, const mp_obj_t *args, mp_map_t *k return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_hog_obj, 1, py_image_find_hog); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_find_hog_obj, 1, py_image_find_hog); #endif // IMLIB_ENABLE_HOG #ifdef IMLIB_ENABLE_SELECTIVE_SEARCH @@ -6159,7 +6159,7 @@ static mp_obj_t py_image_selective_search(uint n_args, const mp_obj_t *args, mp_ array_free(proposals_array); return proposals_list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_selective_search_obj, 1, py_image_selective_search); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_selective_search_obj, 1, py_image_selective_search); #endif // IMLIB_ENABLE_SELECTIVE_SEARCH #ifdef IMLIB_ENABLE_STEREO_DISPARITY @@ -6188,7 +6188,7 @@ static mp_obj_t py_image_stereo_disparity(uint n_args, const mp_obj_t *args, mp_ return args[0]; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_stereo_disparity_obj, 1, py_image_stereo_disparity); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_stereo_disparity_obj, 1, py_image_stereo_disparity); #endif // IMLIB_ENABLE_STEREO_DISPARITY static const mp_rom_map_elem_t locals_dict_table[] = { @@ -6490,7 +6490,7 @@ static const mp_rom_map_elem_t locals_dict_table[] = { #endif }; -STATIC MP_DEFINE_CONST_DICT(py_image_locals_dict, locals_dict_table); +static MP_DEFINE_CONST_DICT(py_image_locals_dict, locals_dict_table); MP_DEFINE_CONST_OBJ_TYPE( py_image_type, @@ -6508,7 +6508,7 @@ mp_obj_t py_image_binary_to_grayscale(mp_obj_t arg) { int8_t b = mp_obj_get_int(arg) & 1; return mp_obj_new_int(COLOR_BINARY_TO_GRAYSCALE(b)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_grayscale_obj, py_image_binary_to_grayscale); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_grayscale_obj, py_image_binary_to_grayscale); mp_obj_t py_image_binary_to_rgb(mp_obj_t arg) { int8_t b = mp_obj_get_int(arg) & 1; @@ -6518,7 +6518,7 @@ mp_obj_t py_image_binary_to_rgb(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_G8(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B8(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_rgb_obj, py_image_binary_to_rgb); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_rgb_obj, py_image_binary_to_rgb); mp_obj_t py_image_binary_to_lab(mp_obj_t arg) { int8_t b = mp_obj_get_int(arg) & 1; @@ -6528,7 +6528,7 @@ mp_obj_t py_image_binary_to_lab(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_A(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_lab_obj, py_image_binary_to_lab); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_lab_obj, py_image_binary_to_lab); mp_obj_t py_image_binary_to_yuv(mp_obj_t arg) { int8_t b = mp_obj_get_int(arg) & 1; @@ -6538,13 +6538,13 @@ mp_obj_t py_image_binary_to_yuv(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_U(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_V(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_yuv_obj, py_image_binary_to_yuv); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_binary_to_yuv_obj, py_image_binary_to_yuv); mp_obj_t py_image_grayscale_to_binary(mp_obj_t arg) { int8_t g = mp_obj_get_int(arg) & 255; return mp_obj_new_int(COLOR_GRAYSCALE_TO_BINARY(g)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_binary_obj, py_image_grayscale_to_binary); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_binary_obj, py_image_grayscale_to_binary); mp_obj_t py_image_grayscale_to_rgb(mp_obj_t arg) { int8_t g = mp_obj_get_int(arg) & 255; @@ -6554,7 +6554,7 @@ mp_obj_t py_image_grayscale_to_rgb(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_G8(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B8(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_rgb_obj, py_image_grayscale_to_rgb); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_rgb_obj, py_image_grayscale_to_rgb); mp_obj_t py_image_grayscale_to_lab(mp_obj_t arg) { int8_t g = mp_obj_get_int(arg) & 255; @@ -6564,7 +6564,7 @@ mp_obj_t py_image_grayscale_to_lab(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_A(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_lab_obj, py_image_grayscale_to_lab); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_lab_obj, py_image_grayscale_to_lab); mp_obj_t py_image_grayscale_to_yuv(mp_obj_t arg) { int8_t g = mp_obj_get_int(arg) & 255; @@ -6574,7 +6574,7 @@ mp_obj_t py_image_grayscale_to_yuv(mp_obj_t arg) { mp_obj_new_int(COLOR_RGB565_TO_U(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_V(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_yuv_obj, py_image_grayscale_to_yuv); +static MP_DEFINE_CONST_FUN_OBJ_1(py_image_grayscale_to_yuv_obj, py_image_grayscale_to_yuv); mp_obj_t py_image_rgb_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6585,7 +6585,7 @@ mp_obj_t py_image_rgb_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_ uint16_t rgb565 = COLOR_R8_G8_B8_TO_RGB565(r, g, b); return mp_obj_new_int(COLOR_RGB565_TO_BINARY(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_binary_obj, 1, py_image_rgb_to_binary); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_binary_obj, 1, py_image_rgb_to_binary); mp_obj_t py_image_rgb_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6596,7 +6596,7 @@ mp_obj_t py_image_rgb_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t * uint16_t rgb565 = COLOR_R8_G8_B8_TO_RGB565(r, g, b); return mp_obj_new_int(COLOR_RGB565_TO_GRAYSCALE(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_grayscale_obj, 1, py_image_rgb_to_grayscale); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_grayscale_obj, 1, py_image_rgb_to_grayscale); mp_obj_t py_image_rgb_to_lab(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6610,7 +6610,7 @@ mp_obj_t py_image_rgb_to_lab(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_A(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_lab_obj, 1, py_image_rgb_to_lab); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_lab_obj, 1, py_image_rgb_to_lab); mp_obj_t py_image_rgb_to_yuv(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6624,7 +6624,7 @@ mp_obj_t py_image_rgb_to_yuv(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_U(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_V(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_yuv_obj, 1, py_image_rgb_to_yuv); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_rgb_to_yuv_obj, 1, py_image_rgb_to_yuv); mp_obj_t py_image_lab_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6635,7 +6635,7 @@ mp_obj_t py_image_lab_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_ uint16_t rgb565 = COLOR_LAB_TO_RGB565(l, a, b); return mp_obj_new_int(COLOR_RGB565_TO_BINARY(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_binary_obj, 1, py_image_lab_to_binary); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_binary_obj, 1, py_image_lab_to_binary); mp_obj_t py_image_lab_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6646,7 +6646,7 @@ mp_obj_t py_image_lab_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t * uint16_t rgb565 = COLOR_LAB_TO_RGB565(l, a, b); return mp_obj_new_int(COLOR_RGB565_TO_GRAYSCALE(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_grayscale_obj, 1, py_image_lab_to_grayscale); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_grayscale_obj, 1, py_image_lab_to_grayscale); mp_obj_t py_image_lab_to_rgb(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6660,7 +6660,7 @@ mp_obj_t py_image_lab_to_rgb(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_G8(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B8(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_rgb_obj, 1, py_image_lab_to_rgb); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_rgb_obj, 1, py_image_lab_to_rgb); mp_obj_t py_image_lab_to_yuv(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6674,7 +6674,7 @@ mp_obj_t py_image_lab_to_yuv(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_U(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_V(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_yuv_obj, 1, py_image_lab_to_yuv); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_lab_to_yuv_obj, 1, py_image_lab_to_yuv); mp_obj_t py_image_yuv_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6685,7 +6685,7 @@ mp_obj_t py_image_yuv_to_binary(uint n_args, const mp_obj_t *args, mp_map_t *kw_ uint16_t rgb565 = COLOR_YUV_TO_RGB565(y, u, v); return mp_obj_new_int(COLOR_RGB565_TO_BINARY(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_binary_obj, 1, py_image_yuv_to_binary); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_binary_obj, 1, py_image_yuv_to_binary); mp_obj_t py_image_yuv_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6696,7 +6696,7 @@ mp_obj_t py_image_yuv_to_grayscale(uint n_args, const mp_obj_t *args, mp_map_t * uint16_t rgb565 = COLOR_YUV_TO_RGB565(y, u, v); return mp_obj_new_int(COLOR_RGB565_TO_GRAYSCALE(rgb565)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_grayscale_obj, 1, py_image_yuv_to_grayscale); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_grayscale_obj, 1, py_image_yuv_to_grayscale); mp_obj_t py_image_yuv_to_rgb(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6710,7 +6710,7 @@ mp_obj_t py_image_yuv_to_rgb(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_G8(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B8(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_rgb_obj, 1, py_image_yuv_to_rgb); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_rgb_obj, 1, py_image_yuv_to_rgb); mp_obj_t py_image_yuv_to_lab(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { const mp_obj_t *arg_vec; @@ -6724,7 +6724,7 @@ mp_obj_t py_image_yuv_to_lab(uint n_args, const mp_obj_t *args, mp_map_t *kw_arg mp_obj_new_int(COLOR_RGB565_TO_A(rgb565)), mp_obj_new_int(COLOR_RGB565_TO_B(rgb565))}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_lab_obj, 1, py_image_yuv_to_lab); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_yuv_to_lab_obj, 1, py_image_yuv_to_lab); mp_obj_t py_image(int w, int h, pixformat_t pixfmt, uint32_t size, void *pixels) { py_image_obj_t *o = m_new_obj(py_image_obj_t); @@ -6909,7 +6909,7 @@ mp_obj_t py_image_load_image(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw } return py_image_from_struct(&image); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_image_obj, 1, py_image_load_image); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_image_obj, 1, py_image_load_image); #ifdef IMLIB_ENABLE_FEATURES mp_obj_t py_image_load_cascade(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -6941,7 +6941,7 @@ mp_obj_t py_image_load_cascade(uint n_args, const mp_obj_t *args, mp_map_t *kw_a o->_cobj = cascade; return o; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_cascade_obj, 1, py_image_load_cascade); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_cascade_obj, 1, py_image_load_cascade); #endif // IMLIB_ENABLE_FEATURES #if defined(IMLIB_ENABLE_DESCRIPTOR) @@ -7006,7 +7006,7 @@ mp_obj_t py_image_load_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *k } return desc; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_descriptor_obj, 1, py_image_load_descriptor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_load_descriptor_obj, 1, py_image_load_descriptor); mp_obj_t py_image_save_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { FIL fp; @@ -7063,7 +7063,7 @@ mp_obj_t py_image_save_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *k } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_save_descriptor_obj, 2, py_image_save_descriptor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_save_descriptor_obj, 2, py_image_save_descriptor); #endif //IMLIB_ENABLE_IMAGE_FILE_IO static mp_obj_t py_image_match_descriptor(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { @@ -7147,7 +7147,7 @@ static mp_obj_t py_image_match_descriptor(uint n_args, const mp_obj_t *args, mp_ return match_obj; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_image_match_descriptor_obj, 2, py_image_match_descriptor); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_image_match_descriptor_obj, 2, py_image_match_descriptor); #endif //IMLIB_ENABLE_DESCRIPTOR #if defined(IMLIB_ENABLE_FIND_KEYPOINTS) && defined(IMLIB_ENABLE_IMAGE_FILE_IO) @@ -7275,7 +7275,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { #endif }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t image_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_imageio.c b/src/omv/modules/py_imageio.c index c8ede2b76..9a5ff6777 100644 --- a/src/omv/modules/py_imageio.c +++ b/src/omv/modules/py_imageio.c @@ -51,7 +51,7 @@ / (IMAGE_ALIGNMENT)) \ * (IMAGE_ALIGNMENT)) -STATIC size_t image_size_aligned(image_t *image) { +static size_t image_size_aligned(image_t *image) { return ((image_size(image) + (IMAGE_ALIGNMENT) -1) / (IMAGE_ALIGNMENT)) * (IMAGE_ALIGNMENT); } @@ -81,7 +81,7 @@ typedef struct py_imageio_obj { }; } py_imageio_obj_t; -STATIC py_imageio_obj_t *py_imageio_obj(mp_obj_t self) { +static py_imageio_obj_t *py_imageio_obj(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); if (stream->closed) { @@ -91,7 +91,7 @@ STATIC py_imageio_obj_t *py_imageio_obj(mp_obj_t self) { return stream; } -STATIC void py_imageio_print(const mp_print_t *print, mp_obj_t self, mp_print_kind_t kind) { +static void py_imageio_print(const mp_print_t *print, mp_obj_t self, mp_print_kind_t kind) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); mp_printf(print, "{\"type\":%s, \"closed\":%s, \"count\":%u, \"offset\":%u, " "\"version\":%u, \"buffer_size\":%u, \"size\":%u}", @@ -112,39 +112,39 @@ STATIC void py_imageio_print(const mp_print_t *print, mp_obj_t self, mp_print_ki #endif } -STATIC mp_obj_t py_imageio_get_type(mp_obj_t self) { +static mp_obj_t py_imageio_get_type(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); return mp_obj_new_int(stream->type); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_get_type_obj, py_imageio_get_type); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_get_type_obj, py_imageio_get_type); -STATIC mp_obj_t py_imageio_is_closed(mp_obj_t self) { +static mp_obj_t py_imageio_is_closed(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); return mp_obj_new_int(stream->closed); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_is_closed_obj, py_imageio_is_closed); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_is_closed_obj, py_imageio_is_closed); -STATIC mp_obj_t py_imageio_count(mp_obj_t self) { +static mp_obj_t py_imageio_count(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); return mp_obj_new_int(stream->count); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_count_obj, py_imageio_count); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_count_obj, py_imageio_count); -STATIC mp_obj_t py_imageio_offset(mp_obj_t self) { +static mp_obj_t py_imageio_offset(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); return mp_obj_new_int(stream->offset); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_offset_obj, py_imageio_offset); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_offset_obj, py_imageio_offset); #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) -STATIC mp_obj_t py_imageio_version(mp_obj_t self) { +static mp_obj_t py_imageio_version(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); return (stream->type == IMAGE_IO_FILE_STREAM) ? mp_obj_new_int(stream->version) : mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_version_obj, py_imageio_version); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_version_obj, py_imageio_version); #endif -STATIC mp_obj_t py_imageio_buffer_size(mp_obj_t self) { +static mp_obj_t py_imageio_buffer_size(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) @@ -155,9 +155,9 @@ STATIC mp_obj_t py_imageio_buffer_size(mp_obj_t self) { return mp_obj_new_int(stream->size - IMAGE_T_SIZE_ALIGNED); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_buffer_size_obj, py_imageio_buffer_size); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_buffer_size_obj, py_imageio_buffer_size); -STATIC mp_obj_t py_imageio_size(mp_obj_t self) { +static mp_obj_t py_imageio_size(mp_obj_t self) { py_imageio_obj_t *stream = MP_OBJ_TO_PTR(self); #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) @@ -168,9 +168,9 @@ STATIC mp_obj_t py_imageio_size(mp_obj_t self) { return mp_obj_new_int(stream->count * stream->size); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_size_obj, py_imageio_size); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_size_obj, py_imageio_size); -STATIC mp_obj_t py_imageio_write(mp_obj_t self, mp_obj_t img_obj) { +static mp_obj_t py_imageio_write(mp_obj_t self, mp_obj_t img_obj) { py_imageio_obj_t *stream = py_imageio_obj(self); image_t *image = py_image_cobj(img_obj); @@ -243,9 +243,9 @@ STATIC mp_obj_t py_imageio_write(mp_obj_t self, mp_obj_t img_obj) { return self; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_imageio_write_obj, py_imageio_write); +static MP_DEFINE_CONST_FUN_OBJ_2(py_imageio_write_obj, py_imageio_write); -STATIC void int_py_imageio_pause(py_imageio_obj_t *stream, bool pause) { +static void int_py_imageio_pause(py_imageio_obj_t *stream, bool pause) { uint32_t elapsed_ms; if (0) { @@ -265,7 +265,7 @@ STATIC void int_py_imageio_pause(py_imageio_obj_t *stream, bool pause) { } #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) -STATIC void int_py_imageio_read_chunk(py_imageio_obj_t *stream, image_t *image, bool pause) { +static void int_py_imageio_read_chunk(py_imageio_obj_t *stream, image_t *image, bool pause) { FIL *fp = &stream->fp; if (f_eof(fp)) { @@ -308,7 +308,7 @@ STATIC void int_py_imageio_read_chunk(py_imageio_obj_t *stream, image_t *image, } #endif -STATIC mp_obj_t py_imageio_read(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_imageio_read(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_copy_to_fb, ARG_loop, ARG_pause }; static const mp_arg_t allowed_args[] = { { MP_QSTR_copy_to_fb, MP_ARG_INT, {.u_bool = true } }, @@ -404,9 +404,9 @@ STATIC mp_obj_t py_imageio_read(uint n_args, const mp_obj_t *pos_args, mp_map_t } return py_image_from_struct(&image); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_imageio_read_obj, 1, py_imageio_read); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_imageio_read_obj, 1, py_imageio_read); -STATIC mp_obj_t py_imageio_seek(mp_obj_t self, mp_obj_t offs) { +static mp_obj_t py_imageio_seek(mp_obj_t self, mp_obj_t offs) { py_imageio_obj_t *stream = py_imageio_obj(self); int offset = mp_obj_get_int(offs); @@ -441,9 +441,9 @@ STATIC mp_obj_t py_imageio_seek(mp_obj_t self, mp_obj_t offs) { return self; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_imageio_seek_obj, py_imageio_seek); +static MP_DEFINE_CONST_FUN_OBJ_2(py_imageio_seek_obj, py_imageio_seek); -STATIC mp_obj_t py_imageio_sync(mp_obj_t self) { +static mp_obj_t py_imageio_sync(mp_obj_t self) { #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) py_imageio_obj_t *stream = py_imageio_obj(self); @@ -454,9 +454,9 @@ STATIC mp_obj_t py_imageio_sync(mp_obj_t self) { return self; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_sync_obj, py_imageio_sync); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_sync_obj, py_imageio_sync); -STATIC mp_obj_t py_imageio_close(mp_obj_t self) { +static mp_obj_t py_imageio_close(mp_obj_t self) { py_imageio_obj_t *stream = py_imageio_obj(self); if (0) { @@ -472,9 +472,9 @@ STATIC mp_obj_t py_imageio_close(mp_obj_t self) { return self; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_close_obj, py_imageio_close); +static MP_DEFINE_CONST_FUN_OBJ_1(py_imageio_close_obj, py_imageio_close); -STATIC mp_obj_t py_imageio_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 py_imageio_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { mp_arg_check_num(n_args, n_kw, 2, 2, false); py_imageio_obj_t *stream = m_new_obj_with_finaliser(py_imageio_obj_t); stream->base.type = &py_imageio_type; @@ -580,7 +580,7 @@ STATIC mp_obj_t py_imageio_make_new(const mp_obj_type_t *type, size_t n_args, si return MP_OBJ_FROM_PTR(stream); } -STATIC const mp_rom_map_elem_t py_imageio_locals_dict_table[] = { +static const mp_rom_map_elem_t py_imageio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_imageio) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_imageio_close_obj) }, { MP_ROM_QSTR(MP_QSTR_FILE_STREAM), MP_ROM_INT(IMAGE_IO_FILE_STREAM) }, @@ -603,7 +603,7 @@ STATIC const mp_rom_map_elem_t py_imageio_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&py_imageio_close_obj) } }; -STATIC MP_DEFINE_CONST_DICT(py_imageio_locals_dict, py_imageio_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_imageio_locals_dict, py_imageio_locals_dict_table); MP_DEFINE_CONST_OBJ_TYPE( py_imageio_type, diff --git a/src/omv/modules/py_mjpeg.c b/src/omv/modules/py_mjpeg.c index 80376f3e7..1d453057b 100644 --- a/src/omv/modules/py_mjpeg.c +++ b/src/omv/modules/py_mjpeg.c @@ -38,7 +38,7 @@ typedef struct py_mjpeg_obj { FIL fp; } py_mjpeg_obj_t; -STATIC void py_mjpeg_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { +static void py_mjpeg_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); mp_printf(print, "{\"closed\":%s, \"width\":%u, \"height\":%u, \"count\":%u, \"size\":%u}", self->closed ? "\"true\"" : "\"false\"", @@ -48,37 +48,37 @@ STATIC void py_mjpeg_print(const mp_print_t *print, mp_obj_t self_in, mp_print_k f_size(&self->fp)); } -STATIC mp_obj_t py_mjpeg_is_closed(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_is_closed(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->closed); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_is_closed_obj, py_mjpeg_is_closed); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_is_closed_obj, py_mjpeg_is_closed); -STATIC mp_obj_t py_mjpeg_width(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_width(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->width); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_width_obj, py_mjpeg_width); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_width_obj, py_mjpeg_width); -STATIC mp_obj_t py_mjpeg_height(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_height(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->height); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_height_obj, py_mjpeg_height); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_height_obj, py_mjpeg_height); -STATIC mp_obj_t py_mjpeg_count(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_count(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(self->frames); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_count_obj, py_mjpeg_count); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_count_obj, py_mjpeg_count); -STATIC mp_obj_t py_mjpeg_size(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_size(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_int(f_size(&self->fp)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_size_obj, py_mjpeg_size); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_size_obj, py_mjpeg_size); -STATIC mp_obj_t py_mjpeg_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_mjpeg_write(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_roi, ARG_channel, ARG_alpha, ARG_color_palette, ARG_alpha_palette, ARG_hint, ARG_quality }; static const mp_arg_t allowed_args[] = { { MP_QSTR_roi, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = MP_ROM_NONE} }, @@ -139,9 +139,9 @@ STATIC mp_obj_t py_mjpeg_write(uint n_args, const mp_obj_t *pos_args, mp_map_t * return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_mjpeg_write_obj, 2, py_mjpeg_write); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_mjpeg_write_obj, 2, py_mjpeg_write); -STATIC mp_obj_t py_mjpeg_sync(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_sync(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); if (self->closed) { mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("MJPEG stream is closed")); @@ -149,9 +149,9 @@ STATIC mp_obj_t py_mjpeg_sync(mp_obj_t self_in) { mjpeg_sync(&self->fp, self->frames, self->bytes, self->us_avg); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_sync_obj, py_mjpeg_sync); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_sync_obj, py_mjpeg_sync); -STATIC mp_obj_t py_mjpeg_close(mp_obj_t self_in) { +static mp_obj_t py_mjpeg_close(mp_obj_t self_in) { py_mjpeg_obj_t *self = MP_OBJ_TO_PTR(self_in); if (!self->closed) { mjpeg_close(&self->fp, self->frames, self->bytes, self->us_avg); @@ -159,9 +159,9 @@ STATIC mp_obj_t py_mjpeg_close(mp_obj_t self_in) { self->closed = true; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_close_obj, py_mjpeg_close); +static MP_DEFINE_CONST_FUN_OBJ_1(py_mjpeg_close_obj, py_mjpeg_close); -STATIC mp_obj_t py_mjpeg_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_mjpeg_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_width, ARG_height }; static const mp_arg_t allowed_args[] = { { MP_QSTR_width, MP_ARG_INT, {.u_int = -1 } }, @@ -183,9 +183,9 @@ STATIC mp_obj_t py_mjpeg_open(uint n_args, const mp_obj_t *pos_args, mp_map_t *k mjpeg_open(&mjpeg->fp, mjpeg->width, mjpeg->height); return mjpeg; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_mjpeg_open_obj, 1, py_mjpeg_open); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_mjpeg_open_obj, 1, py_mjpeg_open); -STATIC const mp_rom_map_elem_t py_mjpeg_locals_dict_table[] = { +static const mp_rom_map_elem_t py_mjpeg_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_Mjpeg) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_mjpeg_close_obj) }, { MP_ROM_QSTR(MP_QSTR_is_closed), MP_ROM_PTR(&py_mjpeg_is_closed_obj) }, @@ -199,9 +199,9 @@ STATIC const mp_rom_map_elem_t py_mjpeg_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&py_mjpeg_close_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(py_mjpeg_locals_dict, py_mjpeg_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_mjpeg_locals_dict, py_mjpeg_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_mjpeg_type, MP_QSTR_Mjpeg, MP_TYPE_FLAG_NONE, @@ -209,12 +209,12 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( locals_dict, &py_mjpeg_locals_dict ); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_mjpeg) }, { MP_ROM_QSTR(MP_QSTR_Mjpeg), MP_ROM_PTR(&py_mjpeg_open_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t mjpeg_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_ml.c b/src/omv/modules/py_ml.c index 6b619a213..f9cefd698 100644 --- a/src/omv/modules/py_ml.c +++ b/src/omv/modules/py_ml.c @@ -28,7 +28,7 @@ #define PY_ML_GRAYSCALE_RANGE ((COLOR_GRAYSCALE_MAX) -(COLOR_GRAYSCALE_MIN)) #define PY_ML_GRAYSCALE_MID (((PY_ML_GRAYSCALE_RANGE) +1) / 2) -STATIC const char *py_ml_map_dtype(py_ml_dtype_t dtype) { +static const char *py_ml_map_dtype(py_ml_dtype_t dtype) { if (dtype == PY_ML_DTYPE_UINT8) { return "uint8"; } else if (dtype == PY_ML_DTYPE_INT8) { @@ -73,7 +73,7 @@ static void py_ml_tuple_hwc(mp_obj_tuple_t *o, size_t *h, size_t *w, size_t *c) *c = mp_obj_get_int(o->items[3]); } -STATIC void py_ml_input_callback(py_ml_model_obj_t *model, void *arg) { +static void py_ml_input_callback(py_ml_model_obj_t *model, void *arg) { // TODO we assume that there's a single input. void *model_input = ml_backend_get_input(model, 0); py_ml_input_data_t *input_data = (py_ml_input_data_t *) arg; @@ -192,7 +192,7 @@ STATIC void py_ml_input_callback(py_ml_model_obj_t *model, void *arg) { } } -STATIC void py_ml_input_callback_regression(py_ml_model_obj_t *model, void *arg) { +static void py_ml_input_callback_regression(py_ml_model_obj_t *model, void *arg) { // TODO we assume that there's a single input. void *model_input = ml_backend_get_input(model, 0); py_ml_input_data_t *input_data = (py_ml_input_data_t *) arg; @@ -236,7 +236,7 @@ STATIC void py_ml_input_callback_regression(py_ml_model_obj_t *model, void *arg) } } -STATIC void py_ml_output_callback(py_ml_model_obj_t *model, void *arg) { +static void py_ml_output_callback(py_ml_model_obj_t *model, void *arg) { mp_obj_list_t *output_list = MP_OBJ_TO_PTR(mp_obj_new_list(model->outputs_size, NULL)); for (size_t i = 0; i < model->outputs_size; i++) { void *model_output = ml_backend_get_output(model, i); @@ -271,7 +271,7 @@ STATIC void py_ml_output_callback(py_ml_model_obj_t *model, void *arg) { // TF Model Object. static const mp_obj_type_t py_ml_model_type; -STATIC void py_ml_model_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { +static void py_ml_model_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { py_ml_model_obj_t *self = MP_OBJ_TO_PTR(self_in); mp_printf(print, "{size: %d, ram: %d, inputs_size: %d, input_dtype: %s, input_scale: %f, input_zero_point: %d, " @@ -281,7 +281,7 @@ STATIC void py_ml_model_print(const mp_print_t *print, mp_obj_t self_in, mp_prin (double) self->output_scale, self->output_zero_point); } -STATIC mp_obj_t py_ml_model_predict(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_ml_model_predict(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_roi, ARG_callback, ARG_scale, ARG_mean, ARG_stdev }; static const mp_arg_t allowed_args[] = { { MP_QSTR_roi, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = MP_ROM_NONE} }, @@ -336,9 +336,9 @@ STATIC mp_obj_t py_ml_model_predict(uint n_args, const mp_obj_t *pos_args, mp_ma return output_data; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_ml_model_predict_obj, 2, py_ml_model_predict); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_ml_model_predict_obj, 2, py_ml_model_predict); -STATIC void py_ml_model_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { +static void py_ml_model_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { py_ml_model_obj_t *self = MP_OBJ_TO_PTR(self_in); const char *str; if (dest[0] == MP_OBJ_NULL) { @@ -459,23 +459,23 @@ mp_obj_t py_ml_model_make_new(const mp_obj_type_t *type, size_t n_args, size_t n } } -STATIC mp_obj_t py_ml_model_deinit(mp_obj_t self_in) { +static mp_obj_t py_ml_model_deinit(mp_obj_t self_in) { py_ml_model_obj_t *model = MP_OBJ_TO_PTR(self_in); if (model->fb_alloc) { fb_alloc_free_till_mark_past_mark_permanent(); } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_ml_model_deinit_obj, py_ml_model_deinit); +static MP_DEFINE_CONST_FUN_OBJ_1(py_ml_model_deinit_obj, py_ml_model_deinit); -STATIC const mp_rom_map_elem_t py_ml_model_locals_dict_table[] = { +static const mp_rom_map_elem_t py_ml_model_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_ml_model_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_predict), MP_ROM_PTR(&py_ml_model_predict_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(py_ml_model_locals_dict, py_ml_model_locals_dict_table); +static MP_DEFINE_CONST_DICT(py_ml_model_locals_dict, py_ml_model_locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +static MP_DEFINE_CONST_OBJ_TYPE( py_ml_model_type, MP_QSTR_ml_model, MP_TYPE_FLAG_NONE, @@ -487,7 +487,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( extern const mp_obj_type_t py_ml_nms_type; -STATIC const mp_rom_map_elem_t py_ml_globals_dict_table[] = { +static const mp_rom_map_elem_t py_ml_globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_ml) }, { MP_ROM_QSTR(MP_QSTR_Model), MP_ROM_PTR(&py_ml_model_type) }, { MP_ROM_QSTR(MP_QSTR_NMS), MP_ROM_PTR(&py_ml_nms_type) }, @@ -497,7 +497,7 @@ STATIC const mp_rom_map_elem_t py_ml_globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_SCALE_S128_127), MP_ROM_INT(PY_ML_SCALE_S128_127) }, }; -STATIC MP_DEFINE_CONST_DICT(py_ml_globals_dict, py_ml_globals_dict_table); +static MP_DEFINE_CONST_DICT(py_ml_globals_dict, py_ml_globals_dict_table); const mp_obj_module_t ml_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_ml_nms.c b/src/omv/modules/py_ml_nms.c index 0ace7ce49..b71b1a8f0 100644 --- a/src/omv/modules/py_ml_nms.c +++ b/src/omv/modules/py_ml_nms.c @@ -26,7 +26,7 @@ typedef struct py_ml_nms_obj { const mp_obj_type_t py_ml_nms_type; // The use of mp_arg_parse_all() is deliberately avoided here to ensure this method remains fast. -STATIC mp_obj_t py_ml_nms_add_bounding_box(uint n_args, const mp_obj_t *pos_args) { +static mp_obj_t py_ml_nms_add_bounding_box(uint n_args, const mp_obj_t *pos_args) { enum { ARG_self, ARG_xmin, ARG_ymin, ARG_xmax, ARG_ymax, ARG_score, ARG_label_index }; py_ml_nms_obj_t *self_in = MP_OBJ_TO_PTR(pos_args[ARG_self]); @@ -52,9 +52,9 @@ STATIC mp_obj_t py_ml_nms_add_bounding_box(uint n_args, const mp_obj_t *pos_args return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_ml_nms_add_bounding_box_obj, 7, 7, py_ml_nms_add_bounding_box); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_ml_nms_add_bounding_box_obj, 7, 7, py_ml_nms_add_bounding_box); -STATIC mp_obj_t py_ml_nms_get_bounding_boxes(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_ml_nms_get_bounding_boxes(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_threshold, ARG_sigma }; static const mp_arg_t allowed_args[] = { { MP_QSTR_threshold, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_rom_obj = MP_ROM_NONE } }, @@ -88,7 +88,7 @@ STATIC mp_obj_t py_ml_nms_get_bounding_boxes(uint n_args, const mp_obj_t *pos_ar return list; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_ml_nms_get_bounding_boxes_obj, 1, py_ml_nms_get_bounding_boxes); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_ml_nms_get_bounding_boxes_obj, 1, py_ml_nms_get_bounding_boxes); mp_obj_t py_ml_nms_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_window_w, ARG_window_h, ARG_roi }; @@ -125,12 +125,12 @@ mp_obj_t py_ml_nms_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_k return MP_OBJ_FROM_PTR(model); } -STATIC const mp_rom_map_elem_t py_ml_nms_locals_table[] = { +static const mp_rom_map_elem_t py_ml_nms_locals_table[] = { { MP_ROM_QSTR(MP_QSTR_add_bounding_box), MP_ROM_PTR(&py_ml_nms_add_bounding_box_obj) }, { MP_ROM_QSTR(MP_QSTR_get_bounding_boxes), MP_ROM_PTR(&py_ml_nms_get_bounding_boxes_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(py_ml_nms_locals_dict, py_ml_nms_locals_table); +static MP_DEFINE_CONST_DICT(py_ml_nms_locals_dict, py_ml_nms_locals_table); MP_DEFINE_CONST_OBJ_TYPE( py_ml_nms_type, diff --git a/src/omv/modules/py_omv.c b/src/omv/modules/py_omv.c index 02e4235a4..494c16153 100644 --- a/src/omv/modules/py_omv.c +++ b/src/omv/modules/py_omv.c @@ -24,19 +24,19 @@ static mp_obj_t py_omv_version_string() { FIRMWARE_VERSION_PATCH); return mp_obj_new_str(str, strlen(str)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_omv_version_string_obj, py_omv_version_string); +static MP_DEFINE_CONST_FUN_OBJ_0(py_omv_version_string_obj, py_omv_version_string); static mp_obj_t py_omv_arch() { char *str = OMV_BOARD_ARCH; return mp_obj_new_str(str, strlen(str)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_omv_arch_obj, py_omv_arch); +static MP_DEFINE_CONST_FUN_OBJ_0(py_omv_arch_obj, py_omv_arch); static mp_obj_t py_omv_board_type() { char *str = OMV_BOARD_TYPE; return mp_obj_new_str(str, strlen(str)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_omv_board_type_obj, py_omv_board_type); +static MP_DEFINE_CONST_FUN_OBJ_0(py_omv_board_type_obj, py_omv_board_type); static mp_obj_t py_omv_board_id() { char str[25]; @@ -46,7 +46,7 @@ static mp_obj_t py_omv_board_id() { *((unsigned int *) (OMV_BOARD_UID_ADDR + 0))); return mp_obj_new_str(str, strlen(str)); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_omv_board_id_obj, py_omv_board_id); +static MP_DEFINE_CONST_FUN_OBJ_0(py_omv_board_id_obj, py_omv_board_id); static mp_obj_t py_omv_disable_fb(uint n_args, const mp_obj_t *args) { if (!n_args) { @@ -55,7 +55,7 @@ static mp_obj_t py_omv_disable_fb(uint n_args, const mp_obj_t *args) { fb_set_streaming_enabled(!mp_obj_get_int(args[0])); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_omv_disable_fb_obj, 0, 1, py_omv_disable_fb); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_omv_disable_fb_obj, 0, 1, py_omv_disable_fb); static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_omv) }, @@ -69,7 +69,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_disable_fb), MP_ROM_PTR(&py_omv_disable_fb_obj) } }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t omv_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_sensor.c b/src/omv/modules/py_sensor.c index 7f5cf8507..ae953f121 100644 --- a/src/omv/modules/py_sensor.c +++ b/src/omv/modules/py_sensor.c @@ -78,7 +78,7 @@ static mp_obj_t py_sensor__init__() { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor__init__obj, py_sensor__init__); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor__init__obj, py_sensor__init__); static mp_obj_t py_sensor_reset() { int error = sensor_reset(); @@ -94,25 +94,25 @@ static mp_obj_t py_sensor_reset() { #endif // MICROPY_PY_IMU return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_reset_obj, py_sensor_reset); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_reset_obj, py_sensor_reset); static mp_obj_t py_sensor_sleep(mp_obj_t enable) { PY_ASSERT_FALSE_MSG(sensor_sleep(mp_obj_is_true(enable)) != 0, "Sleep Failed"); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_sleep_obj, py_sensor_sleep); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_sleep_obj, py_sensor_sleep); static mp_obj_t py_sensor_shutdown(mp_obj_t enable) { PY_ASSERT_FALSE_MSG(sensor_shutdown(mp_obj_is_true(enable)) != 0, "Shutdown Failed"); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_shutdown_obj, py_sensor_shutdown); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_shutdown_obj, py_sensor_shutdown); static mp_obj_t py_sensor_flush() { framebuffer_update_jpeg_buffer(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_flush_obj, py_sensor_flush); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_flush_obj, py_sensor_flush); static mp_obj_t py_sensor_snapshot(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { #if MICROPY_PY_IMU @@ -130,7 +130,7 @@ static mp_obj_t py_sensor_snapshot(uint n_args, const mp_obj_t *args, mp_map_t * } return image; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_snapshot_obj, 0, py_sensor_snapshot); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_snapshot_obj, 0, py_sensor_snapshot); static mp_obj_t py_sensor_skip_frames(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) { mp_map_elem_t *kw_arg = mp_map_lookup(kw_args, MP_ROM_QSTR(MP_QSTR_time), MP_MAP_LOOKUP); @@ -159,17 +159,17 @@ static mp_obj_t py_sensor_skip_frames(uint n_args, const mp_obj_t *args, mp_map_ return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_skip_frames_obj, 0, py_sensor_skip_frames); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_skip_frames_obj, 0, py_sensor_skip_frames); static mp_obj_t py_sensor_width() { return mp_obj_new_int(resolution[sensor.framesize][0]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_width_obj, py_sensor_width); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_width_obj, py_sensor_width); static mp_obj_t py_sensor_height() { return mp_obj_new_int(resolution[sensor.framesize][1]); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_height_obj, py_sensor_height); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_height_obj, py_sensor_height); static mp_obj_t py_sensor_get_fb() { if (framebuffer_get_depth() < 0) { @@ -180,17 +180,17 @@ static mp_obj_t py_sensor_get_fb() { framebuffer_init_image(&image); return py_image_from_struct(&image); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_fb_obj, py_sensor_get_fb); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_fb_obj, py_sensor_get_fb); static mp_obj_t py_sensor_get_id() { return mp_obj_new_int(sensor_get_id()); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_id_obj, py_sensor_get_id); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_id_obj, py_sensor_get_id); static mp_obj_t py_sensor_get_frame_available() { return mp_obj_new_bool(framebuffer->tail != framebuffer->head); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_frame_available_obj, py_sensor_get_frame_available); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_frame_available_obj, py_sensor_get_frame_available); static mp_obj_t py_sensor_alloc_extra_fb(mp_obj_t w_obj, mp_obj_t h_obj, mp_obj_t pixfmt_obj) { int w = mp_obj_get_int(w_obj); @@ -212,13 +212,13 @@ static mp_obj_t py_sensor_alloc_extra_fb(mp_obj_t w_obj, mp_obj_t h_obj, mp_obj_ fb_alloc_mark_permanent(); // pixels will not be popped on exception return r; } -STATIC MP_DEFINE_CONST_FUN_OBJ_3(py_sensor_alloc_extra_fb_obj, py_sensor_alloc_extra_fb); +static MP_DEFINE_CONST_FUN_OBJ_3(py_sensor_alloc_extra_fb_obj, py_sensor_alloc_extra_fb); static mp_obj_t py_sensor_dealloc_extra_fb() { fb_alloc_free_till_mark_past_mark_permanent(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_dealloc_extra_fb_obj, py_sensor_dealloc_extra_fb); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_dealloc_extra_fb_obj, py_sensor_dealloc_extra_fb); static mp_obj_t py_sensor_set_pixformat(mp_obj_t pixformat) { int error = sensor_set_pixformat(mp_obj_get_int(pixformat)); @@ -227,7 +227,7 @@ static mp_obj_t py_sensor_set_pixformat(mp_obj_t pixformat) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_pixformat_obj, py_sensor_set_pixformat); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_pixformat_obj, py_sensor_set_pixformat); static mp_obj_t py_sensor_get_pixformat() { if (sensor.pixformat == PIXFORMAT_INVALID) { @@ -235,7 +235,7 @@ static mp_obj_t py_sensor_get_pixformat() { } return mp_obj_new_int(sensor.pixformat); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_pixformat_obj, py_sensor_get_pixformat); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_pixformat_obj, py_sensor_get_pixformat); static mp_obj_t py_sensor_set_framesize(mp_obj_t framesize) { int error = sensor_set_framesize(mp_obj_get_int(framesize)); @@ -244,7 +244,7 @@ static mp_obj_t py_sensor_set_framesize(mp_obj_t framesize) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framesize_obj, py_sensor_set_framesize); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framesize_obj, py_sensor_set_framesize); static mp_obj_t py_sensor_get_framesize() { if (sensor.framesize == FRAMESIZE_INVALID) { @@ -252,7 +252,7 @@ static mp_obj_t py_sensor_get_framesize() { } return mp_obj_new_int(sensor.framesize); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framesize_obj, py_sensor_get_framesize); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framesize_obj, py_sensor_get_framesize); static mp_obj_t py_sensor_set_framerate(mp_obj_t framerate) { int error = sensor_set_framerate(mp_obj_get_int(framerate)); @@ -261,7 +261,7 @@ static mp_obj_t py_sensor_set_framerate(mp_obj_t framerate) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framerate_obj, py_sensor_set_framerate); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framerate_obj, py_sensor_set_framerate); static mp_obj_t py_sensor_get_framerate() { if (sensor.framerate == 0) { @@ -269,7 +269,7 @@ static mp_obj_t py_sensor_get_framerate() { } return mp_obj_new_int(sensor.framerate); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framerate_obj, py_sensor_get_framerate); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framerate_obj, py_sensor_get_framerate); static mp_obj_t py_sensor_set_windowing(uint n_args, const mp_obj_t *args) { if (sensor.framesize == FRAMESIZE_INVALID) { @@ -322,7 +322,7 @@ static mp_obj_t py_sensor_set_windowing(uint n_args, const mp_obj_t *args) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_set_windowing_obj, 1, 4, py_sensor_set_windowing); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_set_windowing_obj, 1, 4, py_sensor_set_windowing); static mp_obj_t py_sensor_get_windowing() { if (sensor.framesize == FRAMESIZE_INVALID) { @@ -334,7 +334,7 @@ static mp_obj_t py_sensor_get_windowing() { mp_obj_new_int(framebuffer_get_u()), mp_obj_new_int(framebuffer_get_v())}); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_windowing_obj, py_sensor_get_windowing); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_windowing_obj, py_sensor_get_windowing); static mp_obj_t py_sensor_set_gainceiling(mp_obj_t gainceiling) { gainceiling_t gain; @@ -370,7 +370,7 @@ static mp_obj_t py_sensor_set_gainceiling(mp_obj_t gainceiling) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_gainceiling_obj, py_sensor_set_gainceiling); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_gainceiling_obj, py_sensor_set_gainceiling); static mp_obj_t py_sensor_set_brightness(mp_obj_t brightness) { if (sensor_set_brightness(mp_obj_get_int(brightness)) != 0) { @@ -378,7 +378,7 @@ static mp_obj_t py_sensor_set_brightness(mp_obj_t brightness) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_brightness_obj, py_sensor_set_brightness); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_brightness_obj, py_sensor_set_brightness); static mp_obj_t py_sensor_set_contrast(mp_obj_t contrast) { if (sensor_set_contrast(mp_obj_get_int(contrast)) != 0) { @@ -386,7 +386,7 @@ static mp_obj_t py_sensor_set_contrast(mp_obj_t contrast) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_contrast_obj, py_sensor_set_contrast); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_contrast_obj, py_sensor_set_contrast); static mp_obj_t py_sensor_set_saturation(mp_obj_t saturation) { if (sensor_set_saturation(mp_obj_get_int(saturation)) != 0) { @@ -394,7 +394,7 @@ static mp_obj_t py_sensor_set_saturation(mp_obj_t saturation) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_saturation_obj, py_sensor_set_saturation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_saturation_obj, py_sensor_set_saturation); static mp_obj_t py_sensor_set_quality(mp_obj_t qs) { int q = mp_obj_get_int(qs); @@ -407,7 +407,7 @@ static mp_obj_t py_sensor_set_quality(mp_obj_t qs) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_quality_obj, py_sensor_set_quality); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_quality_obj, py_sensor_set_quality); static mp_obj_t py_sensor_set_colorbar(mp_obj_t enable) { if (sensor_set_colorbar(mp_obj_is_true(enable)) != 0) { @@ -415,7 +415,7 @@ static mp_obj_t py_sensor_set_colorbar(mp_obj_t enable) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_colorbar_obj, py_sensor_set_colorbar); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_colorbar_obj, py_sensor_set_colorbar); static mp_obj_t py_sensor_set_auto_gain(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_gain_db, ARG_gain_db_ceiling }; @@ -441,7 +441,7 @@ static mp_obj_t py_sensor_set_auto_gain(uint n_args, const mp_obj_t *pos_args, m } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_gain_obj, 1, py_sensor_set_auto_gain); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_gain_obj, 1, py_sensor_set_auto_gain); static mp_obj_t py_sensor_get_gain_db() { float gain_db; @@ -451,7 +451,7 @@ static mp_obj_t py_sensor_get_gain_db() { } return mp_obj_new_float(gain_db); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_gain_db_obj, py_sensor_get_gain_db); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_gain_db_obj, py_sensor_get_gain_db); static mp_obj_t py_sensor_set_auto_exposure(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_exposure_us }; @@ -473,7 +473,7 @@ static mp_obj_t py_sensor_set_auto_exposure(uint n_args, const mp_obj_t *pos_arg } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_exposure_obj, 1, py_sensor_set_auto_exposure); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_exposure_obj, 1, py_sensor_set_auto_exposure); static mp_obj_t py_sensor_get_exposure_us() { int exposure_us; @@ -483,7 +483,7 @@ static mp_obj_t py_sensor_get_exposure_us() { } return mp_obj_new_int(exposure_us); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_exposure_us_obj, py_sensor_get_exposure_us); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_exposure_us_obj, py_sensor_get_exposure_us); static mp_obj_t py_sensor_set_auto_whitebal(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_rgb_gain_db }; @@ -508,7 +508,7 @@ static mp_obj_t py_sensor_set_auto_whitebal(uint n_args, const mp_obj_t *pos_arg } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_whitebal_obj, 1, py_sensor_set_auto_whitebal); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_whitebal_obj, 1, py_sensor_set_auto_whitebal); static mp_obj_t py_sensor_get_rgb_gain_db() { float r_gain_db = 0.0, g_gain_db = 0.0, b_gain_db = 0.0; @@ -522,7 +522,7 @@ static mp_obj_t py_sensor_get_rgb_gain_db() { mp_obj_new_float(b_gain_db) }); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_rgb_gain_db_obj, py_sensor_get_rgb_gain_db); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_rgb_gain_db_obj, py_sensor_get_rgb_gain_db); static mp_obj_t py_sensor_set_auto_blc(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_enable, ARG_regs }; @@ -554,7 +554,7 @@ static mp_obj_t py_sensor_set_auto_blc(uint n_args, const mp_obj_t *pos_args, mp } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_blc_obj, 1, py_sensor_set_auto_blc); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_sensor_set_auto_blc_obj, 1, py_sensor_set_auto_blc); static mp_obj_t py_sensor_get_blc_regs() { int regs[sensor.hw_flags.blc_size]; @@ -569,7 +569,7 @@ static mp_obj_t py_sensor_get_blc_regs() { } return l; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_blc_regs_obj, py_sensor_get_blc_regs); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_blc_regs_obj, py_sensor_get_blc_regs); static mp_obj_t py_sensor_set_hmirror(mp_obj_t enable) { int error = sensor_set_hmirror(mp_obj_is_true(enable)); @@ -578,12 +578,12 @@ static mp_obj_t py_sensor_set_hmirror(mp_obj_t enable) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_hmirror_obj, py_sensor_set_hmirror); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_hmirror_obj, py_sensor_set_hmirror); static mp_obj_t py_sensor_get_hmirror() { return mp_obj_new_bool(sensor_get_hmirror()); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_hmirror_obj, py_sensor_get_hmirror); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_hmirror_obj, py_sensor_get_hmirror); static mp_obj_t py_sensor_set_vflip(mp_obj_t enable) { int error = sensor_set_vflip(mp_obj_is_true(enable)); @@ -592,12 +592,12 @@ static mp_obj_t py_sensor_set_vflip(mp_obj_t enable) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_vflip_obj, py_sensor_set_vflip); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_vflip_obj, py_sensor_set_vflip); static mp_obj_t py_sensor_get_vflip() { return mp_obj_new_bool(sensor_get_vflip()); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_vflip_obj, py_sensor_get_vflip); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_vflip_obj, py_sensor_get_vflip); static mp_obj_t py_sensor_set_transpose(mp_obj_t enable) { int error = sensor_set_transpose(mp_obj_is_true(enable)); @@ -606,12 +606,12 @@ static mp_obj_t py_sensor_set_transpose(mp_obj_t enable) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_transpose_obj, py_sensor_set_transpose); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_transpose_obj, py_sensor_set_transpose); static mp_obj_t py_sensor_get_transpose() { return mp_obj_new_bool(sensor_get_transpose()); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_transpose_obj, py_sensor_get_transpose); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_transpose_obj, py_sensor_get_transpose); static mp_obj_t py_sensor_set_auto_rotation(mp_obj_t enable) { int error = sensor_set_auto_rotation(mp_obj_is_true(enable)); @@ -620,12 +620,12 @@ static mp_obj_t py_sensor_set_auto_rotation(mp_obj_t enable) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_auto_rotation_obj, py_sensor_set_auto_rotation); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_auto_rotation_obj, py_sensor_set_auto_rotation); static mp_obj_t py_sensor_get_auto_rotation() { return mp_obj_new_bool(sensor_get_auto_rotation()); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_auto_rotation_obj, py_sensor_get_auto_rotation); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_auto_rotation_obj, py_sensor_get_auto_rotation); static mp_obj_t py_sensor_set_framebuffers(mp_obj_t count) { mp_int_t c = mp_obj_get_int(count); @@ -645,12 +645,12 @@ static mp_obj_t py_sensor_set_framebuffers(mp_obj_t count) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framebuffers_obj, py_sensor_set_framebuffers); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_framebuffers_obj, py_sensor_set_framebuffers); static mp_obj_t py_sensor_get_framebuffers() { return mp_obj_new_int(framebuffer->n_buffers); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framebuffers_obj, py_sensor_get_framebuffers); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_framebuffers_obj, py_sensor_get_framebuffers); static mp_obj_t py_sensor_disable_delays(uint n_args, const mp_obj_t *args) { if (!n_args) { @@ -660,7 +660,7 @@ static mp_obj_t py_sensor_disable_delays(uint n_args, const mp_obj_t *args) { sensor.disable_delays = mp_obj_get_int(args[0]); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_disable_delays_obj, 0, 1, py_sensor_disable_delays); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_disable_delays_obj, 0, 1, py_sensor_disable_delays); static mp_obj_t py_sensor_disable_full_flush(uint n_args, const mp_obj_t *args) { if (!n_args) { @@ -670,7 +670,7 @@ static mp_obj_t py_sensor_disable_full_flush(uint n_args, const mp_obj_t *args) sensor.disable_full_flush = mp_obj_get_int(args[0]); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_disable_full_flush_obj, 0, 1, py_sensor_disable_full_flush); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_disable_full_flush_obj, 0, 1, py_sensor_disable_full_flush); static mp_obj_t py_sensor_set_special_effect(mp_obj_t sde) { if (sensor_set_special_effect(mp_obj_get_int(sde)) != 0) { @@ -678,7 +678,7 @@ static mp_obj_t py_sensor_set_special_effect(mp_obj_t sde) { } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_special_effect_obj, py_sensor_set_special_effect); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_special_effect_obj, py_sensor_set_special_effect); static mp_obj_t py_sensor_set_lens_correction(mp_obj_t enable, mp_obj_t radi, mp_obj_t coef) { if (sensor_set_lens_correction(mp_obj_is_true(enable), @@ -687,7 +687,7 @@ static mp_obj_t py_sensor_set_lens_correction(mp_obj_t enable, mp_obj_t radi, mp } return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_3(py_sensor_set_lens_correction_obj, py_sensor_set_lens_correction); +static MP_DEFINE_CONST_FUN_OBJ_3(py_sensor_set_lens_correction_obj, py_sensor_set_lens_correction); static void sensor_vsync_callback(uint32_t vsync) { if (mp_obj_is_callable(vsync_callback)) { @@ -706,7 +706,7 @@ static mp_obj_t py_sensor_set_vsync_callback(mp_obj_t vsync_callback_obj) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_vsync_callback_obj, py_sensor_set_vsync_callback); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_vsync_callback_obj, py_sensor_set_vsync_callback); static void sensor_frame_callback() { if (mp_obj_is_callable(frame_callback)) { @@ -725,7 +725,7 @@ static mp_obj_t py_sensor_set_frame_callback(mp_obj_t frame_callback_obj) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_frame_callback_obj, py_sensor_set_frame_callback); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_frame_callback_obj, py_sensor_set_frame_callback); static mp_obj_t py_sensor_ioctl(uint n_args, const mp_obj_t *args) { mp_obj_t ret_obj = mp_const_none; @@ -993,7 +993,7 @@ static mp_obj_t py_sensor_ioctl(uint n_args, const mp_obj_t *args) { return ret_obj; } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_ioctl_obj, 1, 5, py_sensor_ioctl); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_sensor_ioctl_obj, 1, 5, py_sensor_ioctl); static mp_obj_t py_sensor_set_color_palette(mp_obj_t palette_obj) { int palette = mp_obj_get_int(palette_obj); @@ -1010,7 +1010,7 @@ static mp_obj_t py_sensor_set_color_palette(mp_obj_t palette_obj) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_color_palette_obj, py_sensor_set_color_palette); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_set_color_palette_obj, py_sensor_set_color_palette); static mp_obj_t py_sensor_get_color_palette() { const uint16_t *palette = sensor_get_color_palette(); @@ -1021,20 +1021,20 @@ static mp_obj_t py_sensor_get_color_palette() { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_color_palette_obj, py_sensor_get_color_palette); +static MP_DEFINE_CONST_FUN_OBJ_0(py_sensor_get_color_palette_obj, py_sensor_get_color_palette); static mp_obj_t py_sensor_write_reg(mp_obj_t addr, mp_obj_t val) { sensor_write_reg(mp_obj_get_int(addr), mp_obj_get_int(val)); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_sensor_write_reg_obj, py_sensor_write_reg); +static MP_DEFINE_CONST_FUN_OBJ_2(py_sensor_write_reg_obj, py_sensor_write_reg); static mp_obj_t py_sensor_read_reg(mp_obj_t addr) { return mp_obj_new_int(sensor_read_reg(mp_obj_get_int(addr))); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_read_reg_obj, py_sensor_read_reg); +static MP_DEFINE_CONST_FUN_OBJ_1(py_sensor_read_reg_obj, py_sensor_read_reg); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_sensor)}, // Pixel Formats @@ -1213,7 +1213,7 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___write_reg), MP_ROM_PTR(&py_sensor_write_reg_obj) }, { MP_ROM_QSTR(MP_QSTR___read_reg), MP_ROM_PTR(&py_sensor_read_reg_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t sensor_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_spi_display.c b/src/omv/modules/py_spi_display.c index 6d45319cf..17bcc83a4 100644 --- a/src/omv/modules/py_spi_display.c +++ b/src/omv/modules/py_spi_display.c @@ -407,7 +407,7 @@ mp_obj_t spi_display_make_new(const mp_obj_type_t *type, size_t n_args, size_t n return MP_OBJ_FROM_PTR(self); } -STATIC const py_display_p_t py_display_p = { +static const py_display_p_t py_display_p = { .deinit = spi_display_deinit, .clear = spi_display_clear, .write = spi_display_write, diff --git a/src/omv/modules/py_tfp410.c b/src/omv/modules/py_tfp410.c index 47393ea1f..24ce2dcc9 100644 --- a/src/omv/modules/py_tfp410.c +++ b/src/omv/modules/py_tfp410.c @@ -63,7 +63,7 @@ static void dvi_extint_callback(mp_obj_t self_in) { } } -STATIC mp_obj_t py_dvi_is_connected(mp_obj_t self_in) { +static mp_obj_t py_dvi_is_connected(mp_obj_t self_in) { py_tfp410_obj_t *self = MP_OBJ_TO_PTR(self_in); bool connected; @@ -72,9 +72,9 @@ STATIC mp_obj_t py_dvi_is_connected(mp_obj_t self_in) { } mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("Display init failed!")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_dvi_is_connected_obj, py_dvi_is_connected); +static MP_DEFINE_CONST_FUN_OBJ_1(py_dvi_is_connected_obj, py_dvi_is_connected); -STATIC mp_obj_t py_dvi_hotplug_callback(mp_obj_t self_in, mp_obj_t cb) { +static mp_obj_t py_dvi_hotplug_callback(mp_obj_t self_in, mp_obj_t cb) { py_tfp410_obj_t *self = MP_OBJ_TO_PTR(self_in); self->hotplug_callback = cb; @@ -87,7 +87,7 @@ STATIC mp_obj_t py_dvi_hotplug_callback(mp_obj_t self_in, mp_obj_t cb) { } return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_2(py_dvi_hotplug_callback_obj, py_dvi_hotplug_callback); +static MP_DEFINE_CONST_FUN_OBJ_2(py_dvi_hotplug_callback_obj, py_dvi_hotplug_callback); mp_obj_t py_tfp410_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_i2c_addr }; @@ -123,7 +123,7 @@ mp_obj_t py_tfp410_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_k return MP_OBJ_FROM_PTR(self); } -STATIC mp_obj_t py_tfp410_deinit(mp_obj_t self_in) { +static mp_obj_t py_tfp410_deinit(mp_obj_t self_in) { omv_gpio_irq_enable(OMV_TFP410_INT_PIN, false); omv_gpio_write(OMV_TFP410_RESET_PIN, 0); @@ -135,9 +135,9 @@ STATIC mp_obj_t py_tfp410_deinit(mp_obj_t self_in) { omv_gpio_deinit(OMV_TFP410_RESET_PIN); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_tfp410_deinit_obj, py_tfp410_deinit); +static MP_DEFINE_CONST_FUN_OBJ_1(py_tfp410_deinit_obj, py_tfp410_deinit); -STATIC const mp_rom_map_elem_t py_tfp410_locals_dict_table[] = { +static const mp_rom_map_elem_t py_tfp410_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_tfp410) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&py_tfp410_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR_isconnected), MP_ROM_PTR(&py_dvi_is_connected_obj) }, @@ -153,11 +153,11 @@ MP_DEFINE_CONST_OBJ_TYPE( locals_dict, &py_tfp410_locals_dict ); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_tfp410) }, { MP_ROM_QSTR(MP_QSTR_TFP410), MP_ROM_PTR(&py_tfp410_type) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t tfp410_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_tof.c b/src/omv/modules/py_tof.c index ce052eee1..2b1eb474a 100644 --- a/src/omv/modules/py_tof.c +++ b/src/omv/modules/py_tof.c @@ -199,7 +199,7 @@ static mp_obj_t py_tof_deinit() { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tof_deinit_obj, py_tof_deinit); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tof_deinit_obj, py_tof_deinit); mp_obj_t py_tof_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_type }; @@ -301,7 +301,7 @@ mp_obj_t py_tof_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_init_obj, 0, py_tof_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_init_obj, 0, py_tof_init); static mp_obj_t py_tof_type() { if (tof_sensor != TOF_NONE) { @@ -309,7 +309,7 @@ static mp_obj_t py_tof_type() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TOF sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tof_type_obj, py_tof_type); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tof_type_obj, py_tof_type); static mp_obj_t py_tof_width() { if (tof_sensor != TOF_NONE) { @@ -317,7 +317,7 @@ static mp_obj_t py_tof_width() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TOF sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tof_width_obj, py_tof_width); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tof_width_obj, py_tof_width); static mp_obj_t py_tof_height() { if (tof_sensor != TOF_NONE) { @@ -325,7 +325,7 @@ static mp_obj_t py_tof_height() { } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TOF sensor is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tof_height_obj, py_tof_height); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tof_height_obj, py_tof_height); static mp_obj_t py_tof_refresh() { switch (tof_sensor) { @@ -337,7 +337,7 @@ static mp_obj_t py_tof_refresh() { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TOF sensor is not initialized")); } } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tof_refresh_obj, py_tof_refresh); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tof_refresh_obj, py_tof_refresh); mp_obj_t py_tof_read_depth(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_hmirror, ARG_vflip, ARG_transpose, ARG_timeout }; @@ -372,7 +372,7 @@ mp_obj_t py_tof_read_depth(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_a return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_read_depth_obj, 0, py_tof_read_depth); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_read_depth_obj, 0, py_tof_read_depth); mp_obj_t py_tof_draw_depth(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { @@ -446,7 +446,7 @@ mp_obj_t py_tof_draw_depth(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_a fb_alloc_free_till_mark(); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_draw_depth_obj, 2, py_tof_draw_depth); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_draw_depth_obj, 2, py_tof_draw_depth); mp_obj_t py_tof_snapshot(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { @@ -554,9 +554,9 @@ mp_obj_t py_tof_snapshot(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_arg } return py_image_from_struct(&dst_img); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_snapshot_obj, 0, py_tof_snapshot); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tof_snapshot_obj, 0, py_tof_snapshot); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_tof) }, { MP_ROM_QSTR(MP_QSTR_TOF_NONE), MP_ROM_INT(TOF_NONE) }, #if (OMV_TOF_VL53L5CX_ENABLE == 1) @@ -577,7 +577,7 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_snapshot), MP_ROM_PTR(&py_tof_snapshot_obj) } }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t tof_module = { .base = { &mp_type_module }, diff --git a/src/omv/modules/py_tv.c b/src/omv/modules/py_tv.c index f6fe151bc..29e647fe6 100644 --- a/src/omv/modules/py_tv.c +++ b/src/omv/modules/py_tv.c @@ -744,7 +744,7 @@ static void spi_tv_display(image_t *src_img, int dst_x_start, int dst_y_start, f } #endif -STATIC mp_obj_t py_tv_deinit() { +static mp_obj_t py_tv_deinit() { switch (tv_type) { #ifdef OMV_SPI_DISPLAY_CONTROLLER case TV_SHIELD: { @@ -761,9 +761,9 @@ STATIC mp_obj_t py_tv_deinit() { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_deinit_obj, py_tv_deinit); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_deinit_obj, py_tv_deinit); -STATIC mp_obj_t py_tv_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_tv_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_type, ARG_triple_buffer }; static const mp_arg_t allowed_args[] = { { MP_QSTR_type, MP_ARG_INT, {.u_int = TV_SHIELD } }, @@ -790,50 +790,50 @@ STATIC mp_obj_t py_tv_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_a return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tv_init_obj, 0, py_tv_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tv_init_obj, 0, py_tv_init); -STATIC mp_obj_t py_tv_width() { +static mp_obj_t py_tv_width() { if (tv_type != TV_NONE) { return mp_obj_new_int(TV_WIDTH); } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_width_obj, py_tv_width); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_width_obj, py_tv_width); -STATIC mp_obj_t py_tv_height() { +static mp_obj_t py_tv_height() { if (tv_type != TV_NONE) { return mp_obj_new_int(TV_HEIGHT); } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_height_obj, py_tv_height); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_height_obj, py_tv_height); -STATIC mp_obj_t py_tv_type() { +static mp_obj_t py_tv_type() { if (tv_type != TV_NONE) { return mp_obj_new_int(tv_type); } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_type_obj, py_tv_type); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_type_obj, py_tv_type); -STATIC mp_obj_t py_tv_triple_buffer() { +static mp_obj_t py_tv_triple_buffer() { if (tv_type != TV_NONE) { return mp_obj_new_int(tv_triple_buffer); } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_triple_buffer_obj, py_tv_triple_buffer); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_triple_buffer_obj, py_tv_triple_buffer); -STATIC mp_obj_t py_tv_refresh() { +static mp_obj_t py_tv_refresh() { if (tv_type != TV_NONE) { return mp_obj_new_int(TV_REFRESH); } mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_refresh_obj, py_tv_refresh); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_refresh_obj, py_tv_refresh); -STATIC mp_obj_t py_tv_channel(uint n_args, const mp_obj_t *args) { +static mp_obj_t py_tv_channel(uint n_args, const mp_obj_t *args) { if (tv_type == TV_NONE) { mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("TV controller is not initialized")); } @@ -866,9 +866,9 @@ STATIC mp_obj_t py_tv_channel(uint n_args, const mp_obj_t *args) { } #endif } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_tv_channel_obj, 0, 1, py_tv_channel); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_tv_channel_obj, 0, 1, py_tv_channel); -STATIC mp_obj_t py_tv_display(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +static mp_obj_t py_tv_display(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_x, ARG_y, ARG_x_scale, ARG_y_scale, ARG_roi, ARG_channel, ARG_alpha, ARG_color_palette, ARG_alpha_palette, ARG_hint @@ -925,9 +925,9 @@ STATIC mp_obj_t py_tv_display(uint n_args, const mp_obj_t *pos_args, mp_map_t *k return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_tv_display_obj, 1, py_tv_display); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_tv_display_obj, 1, py_tv_display); -STATIC mp_obj_t py_tv_clear() { +static mp_obj_t py_tv_clear() { switch (tv_type) { #ifdef OMV_SPI_DISPLAY_CONTROLLER case TV_SHIELD: { @@ -945,9 +945,9 @@ STATIC mp_obj_t py_tv_clear() { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_tv_clear_obj, py_tv_clear); +static MP_DEFINE_CONST_FUN_OBJ_0(py_tv_clear_obj, py_tv_clear); -STATIC const mp_rom_map_elem_t globals_dict_table[] = { +static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_tv) }, { MP_ROM_QSTR(MP_QSTR_TV_NONE), MP_ROM_INT(TV_NONE) }, { MP_ROM_QSTR(MP_QSTR_TV_SHIELD), MP_ROM_INT(TV_SHIELD) }, @@ -963,7 +963,7 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&py_tv_clear_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t tv_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/nrf/main.c b/src/omv/ports/nrf/main.c index 4d0c774a5..a72160692 100644 --- a/src/omv/ports/nrf/main.c +++ b/src/omv/ports/nrf/main.c @@ -101,7 +101,7 @@ extern uint32_t _heap_start; extern uint32_t _heap_end; #if MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE -STATIC int vfs_mount_and_chdir(mp_obj_t bdev, mp_obj_t mount_point) { +static int vfs_mount_and_chdir(mp_obj_t bdev, mp_obj_t mount_point) { nlr_buf_t nlr; mp_int_t ret = -MP_EIO; if (nlr_push(&nlr) == 0) { diff --git a/src/omv/ports/nrf/modules/py_audio.c b/src/omv/ports/nrf/modules/py_audio.c index 3fc561551..4373108eb 100644 --- a/src/omv/ports/nrf/modules/py_audio.c +++ b/src/omv/ports/nrf/modules/py_audio.c @@ -133,7 +133,7 @@ static mp_obj_t py_audio_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *k nrfx_pdm_init(&nrfx_pdm_config, nrfx_pdm_event_handler); return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); void py_audio_deinit() { // Disable PDM and IRQ @@ -172,7 +172,7 @@ static mp_obj_t py_audio_start_streaming(mp_obj_t callback_obj) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); +static MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); static mp_obj_t py_audio_stop_streaming() { // Stop PDM. @@ -180,7 +180,7 @@ static mp_obj_t py_audio_stop_streaming() { g_audio_callback = mp_const_none; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); +static MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audio) }, @@ -189,7 +189,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_stop_streaming), MP_ROM_PTR(&py_audio_stop_streaming_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t audio_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/rp2/modules/py_audio.c b/src/omv/ports/rp2/modules/py_audio.c index e2f589039..4a1ec0bb5 100644 --- a/src/omv/ports/rp2/modules/py_audio.c +++ b/src/omv/ports/rp2/modules/py_audio.c @@ -284,17 +284,17 @@ static mp_obj_t py_audio_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *k audio_initialized = true; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); static mp_obj_t py_audio_samples() { return mp_obj_new_int(audio_data->t_samples); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_samples_obj, py_audio_samples); +static MP_DEFINE_CONST_FUN_OBJ_0(py_audio_samples_obj, py_audio_samples); static mp_obj_t py_audio_overflow() { return mp_obj_new_bool(audio_data->overflow); } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_overflow_obj, py_audio_overflow); +static MP_DEFINE_CONST_FUN_OBJ_0(py_audio_overflow_obj, py_audio_overflow); static mp_obj_t py_audio_start_streaming(mp_obj_t callback_obj) { audio_data->head = 0; @@ -321,7 +321,7 @@ static mp_obj_t py_audio_start_streaming(mp_obj_t callback_obj) { audio_data->streaming = true; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); +static MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); static mp_obj_t py_audio_stop_streaming() { if (audio_data->streaming) { @@ -354,7 +354,7 @@ static mp_obj_t py_audio_stop_streaming() { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); +static MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); static mp_obj_t py_audio_get_buffer(uint n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { @@ -395,7 +395,7 @@ static mp_obj_t py_audio_get_buffer(uint n_args, const mp_obj_t *pos_args, mp_ma // Return PCM buffer. return MP_OBJ_FROM_PTR(audio_data->pcm_buffer_user); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_get_buffer_obj, 0, py_audio_get_buffer); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_get_buffer_obj, 0, py_audio_get_buffer); void py_audio_deinit() { if (audio_initialized) { @@ -432,7 +432,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_buffer), MP_ROM_PTR(&py_audio_get_buffer_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t audio_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/stm32/modules/py_audio.c b/src/omv/ports/stm32/modules/py_audio.c index f410a760c..e579839c3 100644 --- a/src/omv/ports/stm32/modules/py_audio.c +++ b/src/omv/ports/stm32/modules/py_audio.c @@ -361,7 +361,7 @@ static mp_obj_t py_audio_init(uint n_args, const mp_obj_t *pos_args, mp_map_t *k return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); +static MP_DEFINE_CONST_FUN_OBJ_KW(py_audio_init_obj, 0, py_audio_init); void py_audio_deinit() { #if defined(OMV_SAI) @@ -472,7 +472,7 @@ static mp_obj_t py_audio_start_streaming(mp_obj_t callback_obj) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); +static MP_DEFINE_CONST_FUN_OBJ_1(py_audio_start_streaming_obj, py_audio_start_streaming); static mp_obj_t py_audio_stop_streaming() { #if defined(OMV_SAI) @@ -488,7 +488,7 @@ static mp_obj_t py_audio_stop_streaming() { MP_STATE_PORT(audio_callback) = mp_const_none; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); +static MP_DEFINE_CONST_FUN_OBJ_0(py_audio_stop_streaming_obj, py_audio_stop_streaming); #if defined(OMV_SAI) static mp_obj_t py_audio_read_pdm(mp_obj_t buf_in) { @@ -542,7 +542,7 @@ static mp_obj_t py_audio_read_pdm(mp_obj_t buf_in) { return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_audio_read_pdm_obj, py_audio_read_pdm); +static MP_DEFINE_CONST_FUN_OBJ_1(py_audio_read_pdm_obj, py_audio_read_pdm); #endif static const mp_rom_map_elem_t globals_dict_table[] = { @@ -555,7 +555,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { #endif }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t audio_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/stm32/modules/py_buzzer.c b/src/omv/ports/stm32/modules/py_buzzer.c index 572135094..804e60e60 100644 --- a/src/omv/ports/stm32/modules/py_buzzer.c +++ b/src/omv/ports/stm32/modules/py_buzzer.c @@ -62,7 +62,7 @@ static void buzzer_setup(int freq, int duty) { buzzer_duty = duty; } -STATIC mp_obj_t py_buzzer_freq(uint n_args, const mp_obj_t *args) { +static mp_obj_t py_buzzer_freq(uint n_args, const mp_obj_t *args) { if (!n_args) { return mp_obj_new_int(buzzer_freq); } else { @@ -70,9 +70,9 @@ STATIC mp_obj_t py_buzzer_freq(uint n_args, const mp_obj_t *args) { return mp_const_none; } } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_buzzer_freq_obj, 0, 1, py_buzzer_freq); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_buzzer_freq_obj, 0, 1, py_buzzer_freq); -STATIC mp_obj_t py_buzzer_duty(uint n_args, const mp_obj_t *args) { +static mp_obj_t py_buzzer_duty(uint n_args, const mp_obj_t *args) { if (!n_args) { return mp_obj_new_int(buzzer_duty); } else { @@ -80,7 +80,7 @@ STATIC mp_obj_t py_buzzer_duty(uint n_args, const mp_obj_t *args) { return mp_const_none; } } -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_buzzer_duty_obj, 0, 1, py_buzzer_duty); +static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(py_buzzer_duty_obj, 0, 1, py_buzzer_duty); static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_buzzer) }, @@ -89,7 +89,7 @@ static const mp_rom_map_elem_t globals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_duty), MP_ROM_PTR(&py_buzzer_duty_obj) } }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t buzzer_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/stm32/modules/py_cpufreq.c b/src/omv/ports/stm32/modules/py_cpufreq.c index dc55c1f7e..6e0f529cf 100644 --- a/src/omv/ports/stm32/modules/py_cpufreq.c +++ b/src/omv/ports/stm32/modules/py_cpufreq.c @@ -223,9 +223,9 @@ mp_obj_t py_cpufreq_set_frequency(mp_obj_t cpufreq_obj) { return mp_const_true; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(py_cpufreq_set_frequency_obj, py_cpufreq_set_frequency); -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_cpufreq_get_current_frequencies_obj, py_cpufreq_get_current_frequencies); -STATIC MP_DEFINE_CONST_FUN_OBJ_0(py_cpufreq_get_supported_frequencies_obj, py_cpufreq_get_supported_frequencies); +static MP_DEFINE_CONST_FUN_OBJ_1(py_cpufreq_set_frequency_obj, py_cpufreq_set_frequency); +static MP_DEFINE_CONST_FUN_OBJ_0(py_cpufreq_get_current_frequencies_obj, py_cpufreq_get_current_frequencies); +static MP_DEFINE_CONST_FUN_OBJ_0(py_cpufreq_get_supported_frequencies_obj, py_cpufreq_get_supported_frequencies); #endif // defined(STM32F7) || defined(STM32H7) static const mp_map_elem_t globals_dict_table[] = { @@ -241,7 +241,7 @@ static const mp_map_elem_t globals_dict_table[] = { #endif { NULL, NULL }, }; -STATIC MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); +static MP_DEFINE_CONST_DICT(globals_dict, globals_dict_table); const mp_obj_module_t cpufreq_module = { .base = { &mp_type_module }, diff --git a/src/omv/ports/stm32/modules/py_display.c b/src/omv/ports/stm32/modules/py_display.c index 5f3e8b363..963ad4cfc 100644 --- a/src/omv/ports/stm32/modules/py_display.c +++ b/src/omv/ports/stm32/modules/py_display.c @@ -629,7 +629,7 @@ mp_obj_t display_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, return MP_OBJ_FROM_PTR(self); } -STATIC const py_display_p_t py_display_p = { +static const py_display_p_t py_display_p = { .deinit = display_deinit, .clear = display_clear, .write = display_write, diff --git a/src/omv/ports/stm32/modules/py_winc.c b/src/omv/ports/stm32/modules/py_winc.c index 168ea798b..332005391 100644 --- a/src/omv/ports/stm32/modules/py_winc.c +++ b/src/omv/ports/stm32/modules/py_winc.c @@ -583,7 +583,7 @@ static const mp_rom_map_elem_t winc_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(winc_locals_dict, winc_locals_dict_table); -STATIC const mod_network_nic_protocol_t mod_network_nic_protocol_winc = { +static const mod_network_nic_protocol_t mod_network_nic_protocol_winc = { .gethostbyname = py_winc_gethostbyname, .socket = py_winc_socket_socket, .close = py_winc_socket_close,