micropython: Update all modules to use new MP_REGISTER_MODULE.

This commit is contained in:
iabdalkader 2022-09-18 12:11:18 +02:00
parent 8542c9c882
commit 1e18ecb256
18 changed files with 18 additions and 20 deletions

View File

@ -31,6 +31,4 @@ const mp_obj_module_t example_user_cmodule = {
};
// Register the module to make it available in Python.
// Note: This module is disabled, set the thrid argument to 1 to enable it, or
// use a macro like MODULE_CEXAMPLE_ENABLED to conditionally enable this module.
MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule, 0);
//MP_REGISTER_MODULE(MP_QSTR_cexample, example_user_cmodule);

View File

@ -1277,4 +1277,4 @@ void py_fir_init0()
py_fir_deinit();
}
MP_REGISTER_MODULE(MP_QSTR_fir, fir_module, 1);
MP_REGISTER_MODULE(MP_QSTR_fir, fir_module);

View File

@ -156,4 +156,4 @@ const mp_obj_module_t gif_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_gif, gif_module, 1);
MP_REGISTER_MODULE(MP_QSTR_gif, gif_module);

View File

@ -7059,4 +7059,4 @@ const mp_obj_module_t image_module = {
.globals = (mp_obj_t) &globals_dict
};
MP_REGISTER_MODULE(MP_QSTR_image, image_module, 1);
MP_REGISTER_MODULE(MP_QSTR_image, image_module);

View File

@ -137,4 +137,4 @@ const mp_obj_module_t mjpeg_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_mjpeg, mjpeg_module, 1);
MP_REGISTER_MODULE(MP_QSTR_mjpeg, mjpeg_module);

View File

@ -81,4 +81,4 @@ const mp_obj_module_t omv_module = {
.globals = (mp_obj_t) &globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_omv, omv_module, 1);
MP_REGISTER_MODULE(MP_QSTR_omv, omv_module);

View File

@ -1170,5 +1170,5 @@ const mp_obj_module_t sensor_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_sensor, sensor_module, MICROPY_PY_SENSOR);
MP_REGISTER_MODULE(MP_QSTR_sensor, sensor_module);
#endif // MICROPY_PY_SENSOR

View File

@ -828,4 +828,4 @@ const mp_obj_module_t tf_module = {
.globals = (mp_obj_t) &globals_dict
};
MP_REGISTER_MODULE(MP_QSTR_tf, tf_module, 1);
MP_REGISTER_MODULE(MP_QSTR_tf, tf_module);

View File

@ -698,5 +698,5 @@ const mp_obj_module_t tof_module = {
.globals = (mp_obj_t) &globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_tof, tof_module, MICROPY_PY_TOF);
MP_REGISTER_MODULE(MP_QSTR_tof, tof_module);
#endif

View File

@ -194,5 +194,5 @@ const mp_obj_module_t audio_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module, MICROPY_PY_AUDIO);
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module);
#endif //MICROPY_PY_AUDIO

View File

@ -454,5 +454,5 @@ const mp_obj_module_t audio_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module, MICROPY_PY_AUDIO);
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module);
#endif //MICROPY_PY_AUDIO

View File

@ -533,5 +533,5 @@ const mp_obj_module_t audio_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module, MICROPY_PY_AUDIO);
MP_REGISTER_MODULE(MP_QSTR_audio, audio_module);
#endif //MICROPY_PY_AUDIO

View File

@ -109,5 +109,5 @@ void py_buzzer_init0()
buzzer_setup(OMV_BUZZER_FREQ, 0);
}
MP_REGISTER_MODULE(MP_QSTR_buzzer, buzzer_module, MICROPY_PY_BUZZER);
MP_REGISTER_MODULE(MP_QSTR_buzzer, buzzer_module);
#endif // MICROPY_PY_BUZZER

View File

@ -252,4 +252,4 @@ const mp_obj_module_t cpufreq_module = {
.globals = (mp_obj_t)&globals_dict,
};
MP_REGISTER_MODULE(MP_QSTR_cpufreq, cpufreq_module, 1);
MP_REGISTER_MODULE(MP_QSTR_cpufreq, cpufreq_module);

View File

@ -403,5 +403,5 @@ float py_imu_pitch_rotation()
return 0.0f;
}
MP_REGISTER_MODULE(MP_QSTR_imu, imu_module, MICROPY_PY_IMU);
MP_REGISTER_MODULE(MP_QSTR_imu, imu_module);
#endif // MICROPY_PY_IMU

View File

@ -1844,5 +1844,5 @@ void py_lcd_init0()
py_lcd_deinit();
}
MP_REGISTER_MODULE(MP_QSTR_lcd, lcd_module, MICROPY_PY_LCD);
MP_REGISTER_MODULE(MP_QSTR_lcd, lcd_module);
#endif // MICROPY_PY_LCD

View File

@ -286,6 +286,6 @@ const mp_obj_module_t micro_speech_module = {
.globals = (mp_obj_dict_t*)&module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_micro_speech, micro_speech_module, MICROPY_PY_MICRO_SPEECH);
MP_REGISTER_MODULE(MP_QSTR_micro_speech, micro_speech_module);
#endif // MICROPY_PY_MICRO_SPEECH

View File

@ -1109,5 +1109,5 @@ void py_tv_init0()
py_tv_deinit();
}
MP_REGISTER_MODULE(MP_QSTR_tv, tv_module, MICROPY_PY_TV);
MP_REGISTER_MODULE(MP_QSTR_tv, tv_module);
#endif // MICROPY_PY_TV