Tasmota/lib/libesp32/Berry/default/be_modtab.c

177 lines
4.6 KiB
C
Raw Normal View History

/********************************************************************
** Copyright (c) 2018-2020 Guan Wenliang
** This file is part of the Berry default interpreter.
** skiars@qq.com, https://github.com/Skiars/berry
** See Copyright Notice in the LICENSE file or at
** https://github.com/Skiars/berry/blob/master/LICENSE
********************************************************************/
#include "berry.h"
/* this file contains the declaration of the module table. */
/* default modules declare */
be_extern_native_module(string);
be_extern_native_module(json);
be_extern_native_module(math);
be_extern_native_module(time);
be_extern_native_module(os);
2021-05-26 14:53:53 +01:00
be_extern_native_module(global);
be_extern_native_module(sys);
be_extern_native_module(debug);
be_extern_native_module(gc);
be_extern_native_module(solidify);
be_extern_native_module(introspect);
be_extern_native_module(strict);
/* Tasmota specific */
2021-04-04 18:36:25 +01:00
be_extern_native_module(light);
2021-04-03 17:06:40 +01:00
be_extern_native_module(gpio);
2021-03-13 21:42:24 +00:00
be_extern_native_module(energy);
2021-05-28 21:37:06 +01:00
be_extern_native_module(webserver);
2021-06-03 12:23:25 +01:00
be_extern_native_module(flash);
2021-07-18 21:39:59 +01:00
be_extern_native_module(path);
#ifdef USE_LVGL
be_extern_native_module(lvgl);
#endif // USE_LVGL
/* user-defined modules declare start */
/* user-defined modules declare end */
/* module list declaration */
BERRY_LOCAL const bntvmodule* const be_module_table[] = {
/* default modules register */
#if BE_USE_STRING_MODULE
&be_native_module(string),
#endif
#if BE_USE_JSON_MODULE
&be_native_module(json),
#endif
#if BE_USE_MATH_MODULE
&be_native_module(math),
#endif
#if BE_USE_TIME_MODULE
&be_native_module(time),
#endif
#if BE_USE_OS_MODULE
&be_native_module(os),
#endif
2021-05-26 14:53:53 +01:00
#if BE_USE_GLOBAL_MODULE
&be_native_module(global),
#endif
#if BE_USE_SYS_MODULE
&be_native_module(sys),
#endif
#if BE_USE_DEBUG_MODULE
&be_native_module(debug),
#endif
#if BE_USE_GC_MODULE
&be_native_module(gc),
#endif
#if BE_USE_SOLIDIFY_MODULE
&be_native_module(solidify),
#endif
#if BE_USE_INTROSPECT_MODULE
&be_native_module(introspect),
#endif
#if BE_USE_STRICT_MODULE
&be_native_module(strict),
#endif
/* user-defined modules register start */
2021-04-24 11:11:06 +01:00
2021-07-18 21:39:59 +01:00
&be_native_module(path),
2021-04-03 17:06:40 +01:00
&be_native_module(gpio),
2021-04-24 11:11:06 +01:00
#ifdef USE_LIGHT
2021-04-04 18:36:25 +01:00
&be_native_module(light),
2021-04-24 11:11:06 +01:00
#endif
#ifdef USE_LVGL
&be_native_module(lvgl),
#endif // USE_LVGL
2021-04-24 11:11:06 +01:00
#ifdef USE_ENERGY_SENSOR
2021-03-13 21:42:24 +00:00
&be_native_module(energy),
2021-04-24 11:11:06 +01:00
#endif // USE_ENERGY_SENSOR
2021-05-28 21:37:06 +01:00
#ifdef USE_WEBSERVER
&be_native_module(webserver),
#endif // USE_WEBSERVER
2021-06-03 12:23:25 +01:00
&be_native_module(flash),
2021-04-24 11:11:06 +01:00
/* user-defined modules register end */
NULL /* do not remove */
};
2021-04-03 18:53:52 +01:00
#ifdef ESP32
extern void be_load_tasmota_ntvlib(bvm *vm);
extern void be_load_wirelib(bvm *vm);
2021-08-23 19:32:32 +01:00
extern void be_load_onewirelib(bvm *vm);
extern void be_load_Driver_class(bvm *vm);
2021-08-16 12:10:19 +01:00
extern void be_load_Timer_class(bvm *vm);
2021-05-25 17:53:10 +01:00
extern void be_load_driver_i2c_lib(bvm *vm);
extern void be_load_md5_lib(bvm *vm);
extern void be_load_webclient_lib(bvm *vm);
extern void be_load_crypto_lib(bvm *vm);
#ifdef USE_I2S_AUDIO_BERRY
extern void be_load_driver_audio_lib(bvm *vm);
#endif
#ifdef USE_LVGL
extern void be_load_lvgl_color_lib(bvm *vm);
extern void be_load_lvgl_font_lib(bvm *vm);
extern void be_load_lv_all_lib(bvm *vm);
extern void be_load_lvgl_cb_lib(bvm *vm);
extern void be_load_lvgl_cb_all_lib(bvm *vm);
2021-07-03 09:40:08 +01:00
extern void be_load_lvgl_ctypes_lib(bvm *vm);
extern void be_load_ctypes_definitions_lib(bvm *vm);
// custom widgets
extern void be_load_lv_signal_bars_class(bvm *vm);
extern void be_load_lv_wifi_bars_class(bvm *vm);
#endif// USE_LVGL
/* this code loads the native class definitions */
BERRY_API void be_load_custom_libs(bvm *vm)
{
(void)vm; /* prevent a compiler warning */
/* add here custom libs */
#if !BE_USE_PRECOMPILED_OBJECT
/* be_load_xxxlib(vm); */
#endif
2021-08-16 12:10:19 +01:00
be_load_Timer_class(vm);
be_load_tasmota_ntvlib(vm);
be_load_Driver_class(vm);
be_load_md5_lib(vm);
#ifdef USE_ALEXA_AVS
be_load_crypto_lib(vm);
#endif
2021-04-24 11:11:06 +01:00
#ifdef USE_I2C
be_load_wirelib(vm);
2021-05-25 17:53:10 +01:00
be_load_driver_i2c_lib(vm);
2021-04-24 11:11:06 +01:00
#endif // USE_I2C
#ifdef USE_WEBCLIENT
be_load_webclient_lib(vm);
#endif // USE_WEBCLIENT
2021-08-23 19:32:32 +01:00
#if defined(USE_ONEWIRE) || defined(USE_DS18x20)
be_load_onewirelib(vm);
#endif
#ifdef USE_I2S_AUDIO_BERRY
be_load_driver_audio_lib(vm);
#endif
#ifdef USE_LVGL
// LVGL
be_load_lvgl_color_lib(vm);
be_load_lvgl_font_lib(vm);
be_load_lv_all_lib(vm);
be_load_lvgl_cb_lib(vm);
be_load_lvgl_cb_all_lib(vm);
2021-07-03 09:40:08 +01:00
be_load_lvgl_ctypes_lib(vm);
be_load_ctypes_definitions_lib(vm);
// custom widgets
be_load_lv_signal_bars_class(vm);
be_load_lv_wifi_bars_class(vm);
#endif // USE_LVGL
}
2021-04-03 18:53:52 +01:00
#endif