1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 5 #include "py/obj.h" 6 #include "py/runtime.h" 7 #include "py/builtin.h" 8 #include "ulog/ulog.h" 9 10 extern const mp_obj_type_t minicv_datainput_type; 11 extern const mp_obj_type_t minicv_imagecodec_type; 12 extern const mp_obj_type_t minicv_imageproc_type; 13 #if PY_BUILD_AI 14 extern const mp_obj_type_t minicv_ml_type; 15 #endif 16 extern const mp_obj_type_t minicv_ui_type; 17 extern const mp_obj_type_t minicv_videocodec_type; 18 19 STATIC const mp_rom_map_elem_t minicv_module_globals_table[] = { 20 {MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_minicv)}, 21 {MP_OBJ_NEW_QSTR(MP_QSTR_DataInput), MP_ROM_PTR(&minicv_datainput_type)}, 22 {MP_OBJ_NEW_QSTR(MP_QSTR_ImageCodec), MP_ROM_PTR(&minicv_imagecodec_type)}, 23 {MP_OBJ_NEW_QSTR(MP_QSTR_ImageProc), MP_ROM_PTR(&minicv_imageproc_type)}, 24 #if PY_BUILD_AI 25 {MP_OBJ_NEW_QSTR(MP_QSTR_ML), MP_ROM_PTR(&minicv_ml_type)}, 26 #endif 27 {MP_OBJ_NEW_QSTR(MP_QSTR_UI), MP_ROM_PTR(&minicv_ui_type)}, 28 {MP_OBJ_NEW_QSTR(MP_QSTR_VideoCodec), MP_ROM_PTR(&minicv_videocodec_type)}, 29 }; 30 31 STATIC MP_DEFINE_CONST_DICT(minicv_module_globals, minicv_module_globals_table); 32 33 const mp_obj_module_t minicv_module = { 34 .base = {&mp_type_module}, 35 .globals = (mp_obj_dict_t *)&minicv_module_globals, 36 }; 37 38 39