2021-04-04 18:36:25 +01:00
|
|
|
/********************************************************************
|
|
|
|
* Tasmota lib
|
|
|
|
*
|
|
|
|
* To use: `import tasmota`
|
|
|
|
*******************************************************************/
|
2021-04-28 18:30:19 +01:00
|
|
|
#include "be_constobj.h"
|
2021-04-04 18:36:25 +01:00
|
|
|
|
2021-04-24 11:11:06 +01:00
|
|
|
#ifdef USE_LIGHT
|
2021-04-04 18:36:25 +01:00
|
|
|
extern int l_getlight(bvm *vm);
|
|
|
|
extern int l_setlight(bvm *vm);
|
|
|
|
|
|
|
|
extern int l_gamma8(bvm *vm);
|
|
|
|
extern int l_gamma10(bvm *vm);
|
|
|
|
extern int l_rev_gamma10(bvm *vm);
|
|
|
|
|
2021-04-28 18:30:19 +01:00
|
|
|
#if !BE_USE_PRECOMPILED_OBJECT
|
2021-04-04 18:36:25 +01:00
|
|
|
|
|
|
|
be_native_module_attr_table(light) {
|
|
|
|
|
|
|
|
be_native_module_function("get", l_getlight),
|
|
|
|
be_native_module_function("set", l_setlight),
|
|
|
|
|
|
|
|
be_native_module_function("gamma8", l_gamma8),
|
|
|
|
be_native_module_function("gamma10", l_gamma10),
|
|
|
|
be_native_module_function("reverse_gamma10", l_rev_gamma10),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
be_define_native_module(light, NULL);
|
|
|
|
|
|
|
|
#else
|
|
|
|
/* @const_object_info_begin
|
2021-04-28 18:30:19 +01:00
|
|
|
module light (scope: global) {
|
|
|
|
get, func(l_getlight)
|
|
|
|
set, func(l_setlight)
|
|
|
|
|
|
|
|
gamma8, func(l_gamma8)
|
|
|
|
gamma10, func(l_gamma10)
|
|
|
|
reverse_gamma10, func(l_rev_gamma10)
|
2021-04-04 18:36:25 +01:00
|
|
|
}
|
|
|
|
@const_object_info_end */
|
2021-04-28 18:30:19 +01:00
|
|
|
#include "../generate/be_fixed_light.h"
|
2021-04-04 18:36:25 +01:00
|
|
|
#endif
|
2021-04-24 11:11:06 +01:00
|
|
|
|
|
|
|
#endif // USE_LIGHT
|