Merge pull request #12707 from s-hadinger/berry_i2s_audio

Berry add support for I2S audio mp3 playback
This commit is contained in:
s-hadinger 2021-07-20 21:28:49 +02:00 committed by GitHub
commit f7fbfce236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 2776 additions and 2111 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Command ``SetSensor1..127 0|1`` to globally disable individual sensor driver
- Support for CAN bus and Freedom Won Battery Management System by Marius Bezuidenhout (#12651)
- Disable PSRAM on unsupported hardware
- Berry add support for I2S audio mp3 playback
## [9.5.0.2] 20210714
### Added

View File

@ -125,6 +125,7 @@ void be_load_driverlib(bvm *vm) {
#if !BE_USE_PRECOMPILED_OBJECT
static const bnfuncinfo members[] = {
{ "every_second", NULL },
{ "every_50ms", NULL },
{ "every_100ms", NULL },
{ "web_add_handler", NULL },
{ "web_add_button", NULL },
@ -155,6 +156,7 @@ void be_load_driverlib(bvm *vm) {
class be_class_tasmota_driver (scope: global, name: Driver) {
every_second, var
every_50ms, var
every_100ms, var
web_add_handler, var
web_add_button, var

View File

@ -275,7 +275,18 @@ be_native_module_attr_table(gpio) {
be_native_module_int("HALLEFFECT", 237),
be_native_module_int("EPD_DATA", 238),
be_native_module_int("INPUT", 239),
be_native_module_int("SENSOR_END", 240),
be_native_module_int("KEY1_PD", 240),
be_native_module_int("KEY1_INV_PD", 241),
be_native_module_int("SWT1_PD", 242),
be_native_module_int("I2S_OUT_DATA", 243),
be_native_module_int("I2S_OUT_CLK", 244),
be_native_module_int("I2S_OUT_SLCT", 245),
be_native_module_int("I2S_IN_DATA", 246),
be_native_module_int("I2S_IN_CLK", 247),
be_native_module_int("I2S_IN_SLCT", 248),
be_native_module_int("INTERRUPT", 249),
be_native_module_int("SENSOR_END", 250),
be_native_module_function("pin_mode", gp_pin_mode),
be_native_module_function("digital_write", gp_digital_write),
@ -546,7 +557,18 @@ module gpio (scope: global) {
HALLEFFECT, int(237)
EPD_DATA, int(238)
INPUT, int(239)
SENSOR_END, int(240)
KEY1_PD, int(240)
KEY1_INV_PD, int(241)
SWT1_PD, int(242)
I2S_OUT_DATA, int(243)
I2S_OUT_CLK, int(244)
I2S_OUT_SLCT, int(245)
I2S_IN_DATA, int(246)
I2S_IN_CLK, int(247)
I2S_IN_SLCT, int(248)
INTERRUPT, int(249)
SENSOR_END, int(250)
pin_mode, func(gp_pin_mode)
digital_write, func(gp_digital_write)

View File

@ -0,0 +1,98 @@
/********************************************************************
* Tasmota I2S audio classes
*
*
*******************************************************************/
#include "be_constobj.h"
#ifdef USE_I2S
#ifdef USE_I2S_AUDIO_BERRY
// extern bclass* be_class_tasmota_driver; // Parent class
extern int i2s_output_i2s_init(bvm *vm);
extern int i2s_output_i2s_deinit(bvm *vm);
extern int i2s_generator_mp3_init(bvm *vm);
extern int i2s_generator_mp3_deinit(bvm *vm);
extern int i2s_generator_mp3_begin(bvm *vm);
extern int i2s_generator_mp3_loop(bvm *vm);
extern int i2s_generator_mp3_stop(bvm *vm);
extern int i2s_generator_mp3_isrunning(bvm *vm);
#ifdef USE_UFILESYS
extern int i2s_file_source_fs_init(bvm *vm);
extern int i2s_file_source_fs_deinit(bvm *vm);
#endif // USE_UFILESYS
#if BE_USE_PRECOMPILED_OBJECT
#include "../generate/be_fixed_be_class_audio_output.h"
#include "../generate/be_fixed_be_class_audio_output_i2s.h"
#include "../generate/be_fixed_be_class_audio_generator.h"
#include "../generate/be_fixed_be_class_audio_generator_mp3.h"
#include "../generate/be_fixed_be_class_audio_file_source.h"
#include "../generate/be_fixed_be_class_audio_file_source_fs.h"
#endif
void be_load_driver_audio_lib(bvm *vm) {
be_pushntvclass(vm, &be_class_audio_output);
be_setglobal(vm, "AudioOutput");
be_pop(vm, 1);
be_pushntvclass(vm, &be_class_audio_output_i2s);
be_setglobal(vm, "AudioOutputI2S");
be_pop(vm, 1);
be_pushntvclass(vm, &be_class_audio_generator_mp3);
be_setglobal(vm, "AudioGeneratorMP3");
be_pop(vm, 1);
#ifdef USE_UFILESYS
be_pushntvclass(vm, &be_class_audio_file_source_fs);
be_setglobal(vm, "AudioFileSourceFS");
be_pop(vm, 1);
#endif // USE_UFILESYS
}
/* @const_object_info_begin
class be_class_audio_output (scope: global, name: AudioOutput) {
.p, var
}
class be_class_audio_generator (scope: global, name: AudioGenerator) {
.p, var
}
class be_class_audio_file_source (scope: global, name: AudioFileSource) {
.p, var
}
class be_class_audio_output_i2s (scope: global, name: AudioOutputI2S, super: be_class_audio_output) {
init, func(i2s_output_i2s_init)
deinit, func(i2s_output_i2s_deinit)
close, func(i2s_output_i2s_deinit)
}
class be_class_audio_generator_mp3 (scope: global, name: AudioGeneratorMP3, super: be_class_audio_generator) {
init, func(i2s_generator_mp3_init)
deinit, func(i2s_generator_mp3_deinit)
close, func(i2s_generator_mp3_deinit)
begin, func(i2s_generator_mp3_begin)
loop, func(i2s_generator_mp3_loop)
stop, func(i2s_generator_mp3_stop)
isrunning, func(i2s_generator_mp3_isrunning)
}
class be_class_audio_file_source_fs (scope: global, name: AudioFileSourceFS, super: be_class_audio_file_source) {
init, func(i2s_file_source_fs_init)
deinit, func(i2s_file_source_fs_deinit)
close, func(i2s_file_source_fs_deinit)
}
@const_object_info_end */
#endif // USE_I2S_AUDIO_BERRY
#endif // USE_I2S

View File

@ -100,6 +100,10 @@ extern void be_load_driverlib(bvm *vm);
extern void be_load_driver_i2c_lib(bvm *vm);
extern void be_load_md5_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);
@ -126,6 +130,9 @@ BERRY_API void be_load_custom_libs(bvm *vm)
be_load_wirelib(vm);
be_load_driver_i2c_lib(vm);
#endif // USE_I2C
#ifdef USE_I2S_AUDIO_BERRY
be_load_driver_audio_lib(vm);
#endif
#ifdef USE_LVGL
// LVGL
be_load_lvgl_color_lib(vm);

View File

@ -1368,193 +1368,200 @@ be_local_closure(event, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[29]) { /* upvals */
{ { .s=be_nested_const_str("cmd", -158181397, 3) }, BE_STRING},
{ { .s=be_nested_const_str("exec_cmd", 493567399, 8) }, BE_STRING},
{ { .s=be_nested_const_str("rule", -64077613, 4) }, BE_STRING},
{ { .s=be_nested_const_str("exec_rules", 1445221092, 10) }, BE_STRING},
{ { .s=be_nested_const_str("mqtt_data", -1756753932, 9) }, BE_STRING},
{ { .s=be_nested_const_str("gc", 1042313471, 2) }, BE_STRING},
{ { .s=be_nested_const_str("every_50ms", -1911083288, 10) }, BE_STRING},
{ { .s=be_nested_const_str("run_deferred", 371594696, 12) }, BE_STRING},
{ { .s=be_nested_const_str("_drivers", -1034638311, 8) }, BE_STRING},
{ { .s=be_nested_const_str("every_second", 2075451465, 12) }, BE_STRING},
{ { .s=be_nested_const_str("every_100ms", 1546407804, 11) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_button", -757092238, 14) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_main_button", -334599632, 19) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_management_button", -1556090110, 25) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_config_button", 639674325, 21) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_console_button", -813531104, 22) }, BE_STRING},
{ { .s=be_nested_const_str("save_before_restart", 1253239338, 19) }, BE_STRING},
{ { .s=be_nested_const_str("web_add_handler", -304792334, 15) }, BE_STRING},
{ { .s=be_nested_const_str("web_sensor", -1394870324, 10) }, BE_STRING},
{ { .s=be_nested_const_str("json_append", -1292948012, 11) }, BE_STRING},
{ { .s=be_nested_const_str("button_pressed", 1694209616, 14) }, BE_STRING},
{ { .s=be_nested_const_str("button_preselif", 491115394, 15) }, BE_STRING},
{ { .s=be_nested_const_str("display", 1164572437, 7) }, BE_STRING},
{ { .s=be_nested_const_str("string", 398550328, 6) }, BE_STRING},
{ { .s=be_nested_const_str("log", 1062293841, 3) }, BE_STRING},
{ { .s=be_nested_const_str("format", -1180859054, 6) }, BE_STRING},
{ { .s=be_nested_const_str("BRY: exception %s - %m", -1290966132, 22) }, BE_STRING},
{ { .i=3 }, BE_INT},
{ { .s=be_nested_const_str("stop_iteration", -121173395, 14) }, BE_STRING},
( &(const bvalue[26]) { /* constants */
be_nested_string("every_50ms", -1911083288, 10),
be_nested_string("run_deferred", 371594696, 12),
be_nested_string("cmd", -158181397, 3),
be_nested_string("exec_cmd", 493567399, 8),
be_nested_string("rule", -64077613, 4),
be_nested_string("exec_rules", 1445221092, 10),
be_nested_string("mqtt_data", -1756753932, 9),
be_nested_string("gc", 1042313471, 2),
be_nested_string("_drivers", -1034638311, 8),
be_nested_string("every_second", 2075451465, 12),
be_nested_string("every_100ms", 1546407804, 11),
be_nested_string("web_add_button", -757092238, 14),
be_nested_string("web_add_main_button", -334599632, 19),
be_nested_string("web_add_management_button", -1556090110, 25),
be_nested_string("web_add_config_button", 639674325, 21),
be_nested_string("web_add_console_button", -813531104, 22),
be_nested_string("save_before_restart", 1253239338, 19),
be_nested_string("web_add_handler", -304792334, 15),
be_nested_string("web_sensor", -1394870324, 10),
be_nested_string("json_append", -1292948012, 11),
be_nested_string("button_pressed", 1694209616, 14),
be_nested_string("display", 1164572437, 7),
be_nested_string("string", 398550328, 6),
be_nested_string("format", -1180859054, 6),
be_nested_string("BRY: Exception> '%s' - %s", -2047976332, 25),
be_nested_string("stop_iteration", -121173395, 14),
}),
(be_nested_const_str("event", -30355297, 5)),
(be_nested_const_str("input", -103256197, 5)),
( &(const binstruction[153]) { /* code */
( &(const binstruction[163]) { /* code */
0x1C140300, // 0000 EQ R5 R1 R256
0x78160006, // 0001 JMPF R5 #0009
0x78160001, // 0001 JMPF R5 #0004
0x8C140101, // 0002 GETMET R5 R0 R257
0x5C1C0400, // 0003 MOVE R7 R2
0x5C200600, // 0004 MOVE R8 R3
0x5C240800, // 0005 MOVE R9 R4
0x7C140800, // 0006 CALL R5 4
0x80040A00, // 0007 RET 1 R5
0x7002008E, // 0008 JMP #0098
0x1C140302, // 0009 EQ R5 R1 R258
0x78160004, // 000A JMPF R5 #0010
0x8C140103, // 000B GETMET R5 R0 R259
0x5C1C0800, // 000C MOVE R7 R4
0x7C140400, // 000D CALL R5 2
0x80040A00, // 000E RET 1 R5
0x70020087, // 000F JMP #0098
0x1C140304, // 0010 EQ R5 R1 R260
0x78160002, // 0011 JMPF R5 #0015
0x4C140000, // 0012 LDNIL 5
0x80040A00, // 0013 RET 1 R5
0x70020082, // 0014 JMP #0098
0x1C140305, // 0015 EQ R5 R1 R261
0x78160003, // 0016 JMPF R5 #001B
0x8C140105, // 0017 GETMET R5 R0 R261
0x7C140200, // 0018 CALL R5 1
0x80040A00, // 0019 RET 1 R5
0x7002007C, // 001A JMP #0098
0x1C140306, // 001B EQ R5 R1 R262
0x78160003, // 001C JMPF R5 #0021
0x8C140107, // 001D GETMET R5 R0 R263
0x7C140200, // 001E CALL R5 1
0x80040A00, // 001F RET 1 R5
0x70020076, // 0020 JMP #0098
0x88140108, // 0021 GETMBR R5 R0 R264
0x78160074, // 0022 JMPF R5 #0098
0x60140000, // 0023 GETGBL R5 G0
0x88180108, // 0024 GETMBR R6 R0 R264
0x7C140200, // 0025 CALL R5 1
0xA802006D, // 0026 EXBLK 0 #0095
0x5C180A00, // 0027 MOVE R6 R5
0x7C180000, // 0028 CALL R6 0
0xA802005E, // 0029 EXBLK 0 #0089
0x1C1C0309, // 002A EQ R7 R1 R265
0x781E0004, // 002B JMPF R7 #0031
0x881C0D09, // 002C GETMBR R7 R6 R265
0x781E0002, // 002D JMPF R7 #0031
0x8C1C0D09, // 002E GETMET R7 R6 R265
0x7C1C0200, // 002F CALL R7 1
0x70020055, // 0030 JMP #0087
0x1C1C030A, // 0031 EQ R7 R1 R266
0x781E0004, // 0032 JMPF R7 #0038
0x881C0D0A, // 0033 GETMBR R7 R6 R266
0x781E0002, // 0034 JMPF R7 #0038
0x8C1C0D0A, // 0035 GETMET R7 R6 R266
0x7C1C0200, // 0036 CALL R7 1
0x7002004E, // 0037 JMP #0087
0x1C1C030B, // 0038 EQ R7 R1 R267
0x781E0004, // 0039 JMPF R7 #003F
0x881C0D0B, // 003A GETMBR R7 R6 R267
0x781E0002, // 003B JMPF R7 #003F
0x8C1C0D0B, // 003C GETMET R7 R6 R267
0x7C1C0200, // 003D CALL R7 1
0x70020047, // 003E JMP #0087
0x1C1C030C, // 003F EQ R7 R1 R268
0x781E0004, // 0040 JMPF R7 #0046
0x881C0D0C, // 0041 GETMBR R7 R6 R268
0x781E0002, // 0042 JMPF R7 #0046
0x8C1C0D0C, // 0043 GETMET R7 R6 R268
0x7C1C0200, // 0044 CALL R7 1
0x70020040, // 0045 JMP #0087
0x1C1C030D, // 0046 EQ R7 R1 R269
0x781E0004, // 0047 JMPF R7 #004D
0x881C0D0D, // 0048 GETMBR R7 R6 R269
0x781E0002, // 0049 JMPF R7 #004D
0x8C1C0D0D, // 004A GETMET R7 R6 R269
0x7C1C0200, // 004B CALL R7 1
0x70020039, // 004C JMP #0087
0x1C1C030E, // 004D EQ R7 R1 R270
0x781E0004, // 004E JMPF R7 #0054
0x881C0D0E, // 004F GETMBR R7 R6 R270
0x781E0002, // 0050 JMPF R7 #0054
0x8C1C0D0E, // 0051 GETMET R7 R6 R270
0x7C1C0200, // 0052 CALL R7 1
0x70020032, // 0053 JMP #0087
0x1C1C030F, // 0054 EQ R7 R1 R271
0x781E0004, // 0055 JMPF R7 #005B
0x881C0D0F, // 0056 GETMBR R7 R6 R271
0x781E0002, // 0057 JMPF R7 #005B
0x8C1C0D0F, // 0058 GETMET R7 R6 R271
0x7C1C0200, // 0059 CALL R7 1
0x7002002B, // 005A JMP #0087
0x1C1C0310, // 005B EQ R7 R1 R272
0x781E0004, // 005C JMPF R7 #0062
0x881C0D10, // 005D GETMBR R7 R6 R272
0x781E0002, // 005E JMPF R7 #0062
0x8C1C0D10, // 005F GETMET R7 R6 R272
0x7C1C0200, // 0060 CALL R7 1
0x70020024, // 0061 JMP #0087
0x1C1C0311, // 0062 EQ R7 R1 R273
0x781E0004, // 0063 JMPF R7 #0069
0x881C0D11, // 0064 GETMBR R7 R6 R273
0x781E0002, // 0065 JMPF R7 #0069
0x8C1C0D11, // 0066 GETMET R7 R6 R273
0x7C1C0200, // 0067 CALL R7 1
0x7002001D, // 0068 JMP #0087
0x1C1C0312, // 0069 EQ R7 R1 R274
0x781E0004, // 006A JMPF R7 #0070
0x881C0D12, // 006B GETMBR R7 R6 R274
0x781E0002, // 006C JMPF R7 #0070
0x8C1C0D12, // 006D GETMET R7 R6 R274
0x7C1C0200, // 006E CALL R7 1
0x70020016, // 006F JMP #0087
0x1C1C0313, // 0070 EQ R7 R1 R275
0x781E0004, // 0071 JMPF R7 #0077
0x881C0D13, // 0072 GETMBR R7 R6 R275
0x781E0002, // 0073 JMPF R7 #0077
0x8C1C0D13, // 0074 GETMET R7 R6 R275
0x7C1C0200, // 0075 CALL R7 1
0x7002000F, // 0076 JMP #0087
0x1C1C0314, // 0077 EQ R7 R1 R276
0x781E0007, // 0078 JMPF R7 #0081
0x881C0D14, // 0079 GETMBR R7 R6 R276
0x781E0005, // 007A JMPF R7 #0081
0x1C1C0311, // 007B EQ R7 R1 R273
0x781DFFFE, // 007C JMPF R7 #007C
0x881C0D16, // 007D GETMBR R7 R6 R278
0x8C1C0D16, // 007E GETMET R7 R6 R278
0x7C1C0200, // 007F CALL R7 1
0x70020005, // 0080 JMP #0087
0x1C1C0316, // 0081 EQ R7 R1 R278
0x781E0003, // 0082 JMPF R7 #0087
0x881C0D16, // 0083 GETMBR R7 R6 R278
0x781E0001, // 0084 JMPF R7 #0087
0x8C1C0D16, // 0085 GETMET R7 R6 R278
0x7C1C0200, // 0086 CALL R7 1
0xA8040001, // 0087 EXBLK 1 1
0x7002000A, // 0088 JMP #0094
0xAC1C0002, // 0089 CATCH R7 0 2
0x70020007, // 008A JMP #0093
0xA4262E00, // 008B IMPORT R9 R279
0x8C280118, // 008C GETMET R10 R0 R280
0x8C301319, // 008D GETMET R12 R9 R281
0x5838001A, // 008E LDCONST R14 K26
0x583C001B, // 008F LDCONST R15 K27
0x7C300600, // 0090 CALL R12 3
0x7C280400, // 0091 CALL R10 2
0x70020000, // 0092 JMP #0094
0xB0080000, // 0093 RAISE 2 R0 R0
0x7001FF91, // 0094 JMP #0027
0x5814001C, // 0095 LDCONST R5 K28
0xAC140200, // 0096 CATCH R5 1 0
0xB0080000, // 0097 RAISE 2 R0 R0
0x80000000, // 0098 RET 0 R0
0x7C140200, // 0003 CALL R5 1
0x1C140302, // 0004 EQ R5 R1 R258
0x78160006, // 0005 JMPF R5 #000D
0x8C140103, // 0006 GETMET R5 R0 R259
0x5C1C0400, // 0007 MOVE R7 R2
0x5C200600, // 0008 MOVE R8 R3
0x5C240800, // 0009 MOVE R9 R4
0x7C140800, // 000A CALL R5 4
0x80040A00, // 000B RET 1 R5
0x70020094, // 000C JMP #00A2
0x1C140304, // 000D EQ R5 R1 R260
0x78160004, // 000E JMPF R5 #0014
0x8C140105, // 000F GETMET R5 R0 R261
0x5C1C0800, // 0010 MOVE R7 R4
0x7C140400, // 0011 CALL R5 2
0x80040A00, // 0012 RET 1 R5
0x7002008D, // 0013 JMP #00A2
0x1C140306, // 0014 EQ R5 R1 R262
0x78160002, // 0015 JMPF R5 #0019
0x4C140000, // 0016 LDNIL 5
0x80040A00, // 0017 RET 1 R5
0x70020088, // 0018 JMP #00A2
0x1C140307, // 0019 EQ R5 R1 R263
0x78160003, // 001A JMPF R5 #001F
0x8C140107, // 001B GETMET R5 R0 R263
0x7C140200, // 001C CALL R5 1
0x80040A00, // 001D RET 1 R5
0x70020082, // 001E JMP #00A2
0x88140108, // 001F GETMBR R5 R0 R264
0x78160080, // 0020 JMPF R5 #00A2
0x60140000, // 0021 GETGBL R5 G0
0x88180108, // 0022 GETMBR R6 R0 R264
0x7C140200, // 0023 CALL R5 1
0xA8020079, // 0024 EXBLK 0 #009F
0x5C180A00, // 0025 MOVE R6 R5
0x7C180000, // 0026 CALL R6 0
0xA8020069, // 0027 EXBLK 0 #0092
0x1C1C0309, // 0028 EQ R7 R1 R265
0x781E0004, // 0029 JMPF R7 #002F
0x881C0D09, // 002A GETMBR R7 R6 R265
0x781E0002, // 002B JMPF R7 #002F
0x8C1C0D09, // 002C GETMET R7 R6 R265
0x7C1C0200, // 002D CALL R7 1
0x70020060, // 002E JMP #0090
0x1C1C0300, // 002F EQ R7 R1 R256
0x781E0004, // 0030 JMPF R7 #0036
0x881C0D00, // 0031 GETMBR R7 R6 R256
0x781E0002, // 0032 JMPF R7 #0036
0x8C1C0D00, // 0033 GETMET R7 R6 R256
0x7C1C0200, // 0034 CALL R7 1
0x70020059, // 0035 JMP #0090
0x1C1C030A, // 0036 EQ R7 R1 R266
0x781E0004, // 0037 JMPF R7 #003D
0x881C0D0A, // 0038 GETMBR R7 R6 R266
0x781E0002, // 0039 JMPF R7 #003D
0x8C1C0D0A, // 003A GETMET R7 R6 R266
0x7C1C0200, // 003B CALL R7 1
0x70020052, // 003C JMP #0090
0x1C1C030B, // 003D EQ R7 R1 R267
0x781E0004, // 003E JMPF R7 #0044
0x881C0D0B, // 003F GETMBR R7 R6 R267
0x781E0002, // 0040 JMPF R7 #0044
0x8C1C0D0B, // 0041 GETMET R7 R6 R267
0x7C1C0200, // 0042 CALL R7 1
0x7002004B, // 0043 JMP #0090
0x1C1C030C, // 0044 EQ R7 R1 R268
0x781E0004, // 0045 JMPF R7 #004B
0x881C0D0C, // 0046 GETMBR R7 R6 R268
0x781E0002, // 0047 JMPF R7 #004B
0x8C1C0D0C, // 0048 GETMET R7 R6 R268
0x7C1C0200, // 0049 CALL R7 1
0x70020044, // 004A JMP #0090
0x1C1C030D, // 004B EQ R7 R1 R269
0x781E0004, // 004C JMPF R7 #0052
0x881C0D0D, // 004D GETMBR R7 R6 R269
0x781E0002, // 004E JMPF R7 #0052
0x8C1C0D0D, // 004F GETMET R7 R6 R269
0x7C1C0200, // 0050 CALL R7 1
0x7002003D, // 0051 JMP #0090
0x1C1C030E, // 0052 EQ R7 R1 R270
0x781E0004, // 0053 JMPF R7 #0059
0x881C0D0E, // 0054 GETMBR R7 R6 R270
0x781E0002, // 0055 JMPF R7 #0059
0x8C1C0D0E, // 0056 GETMET R7 R6 R270
0x7C1C0200, // 0057 CALL R7 1
0x70020036, // 0058 JMP #0090
0x1C1C030F, // 0059 EQ R7 R1 R271
0x781E0004, // 005A JMPF R7 #0060
0x881C0D0F, // 005B GETMBR R7 R6 R271
0x781E0002, // 005C JMPF R7 #0060
0x8C1C0D0F, // 005D GETMET R7 R6 R271
0x7C1C0200, // 005E CALL R7 1
0x7002002F, // 005F JMP #0090
0x1C1C0310, // 0060 EQ R7 R1 R272
0x781E0004, // 0061 JMPF R7 #0067
0x881C0D10, // 0062 GETMBR R7 R6 R272
0x781E0002, // 0063 JMPF R7 #0067
0x8C1C0D10, // 0064 GETMET R7 R6 R272
0x7C1C0200, // 0065 CALL R7 1
0x70020028, // 0066 JMP #0090
0x1C1C0311, // 0067 EQ R7 R1 R273
0x781E0004, // 0068 JMPF R7 #006E
0x881C0D11, // 0069 GETMBR R7 R6 R273
0x781E0002, // 006A JMPF R7 #006E
0x8C1C0D11, // 006B GETMET R7 R6 R273
0x7C1C0200, // 006C CALL R7 1
0x70020021, // 006D JMP #0090
0x1C1C0312, // 006E EQ R7 R1 R274
0x781E0004, // 006F JMPF R7 #0075
0x881C0D12, // 0070 GETMBR R7 R6 R274
0x781E0002, // 0071 JMPF R7 #0075
0x8C1C0D12, // 0072 GETMET R7 R6 R274
0x7C1C0200, // 0073 CALL R7 1
0x7002001A, // 0074 JMP #0090
0x1C1C0313, // 0075 EQ R7 R1 R275
0x781E0004, // 0076 JMPF R7 #007C
0x881C0D13, // 0077 GETMBR R7 R6 R275
0x781E0002, // 0078 JMPF R7 #007C
0x8C1C0D13, // 0079 GETMET R7 R6 R275
0x7C1C0200, // 007A CALL R7 1
0x70020013, // 007B JMP #0090
0x1C1C0314, // 007C EQ R7 R1 R276
0x781E0004, // 007D JMPF R7 #0083
0x881C0D14, // 007E GETMBR R7 R6 R276
0x781E0002, // 007F JMPF R7 #0083
0x8C1C0D14, // 0080 GETMET R7 R6 R276
0x7C1C0200, // 0081 CALL R7 1
0x7002000C, // 0082 JMP #0090
0x1C1C0311, // 0083 EQ R7 R1 R273
0x781E0004, // 0084 JMPF R7 #008A
0x881C0D15, // 0085 GETMBR R7 R6 R277
0x781E0002, // 0086 JMPF R7 #008A
0x8C1C0D15, // 0087 GETMET R7 R6 R277
0x7C1C0200, // 0088 CALL R7 1
0x70020005, // 0089 JMP #0090
0x1C1C0315, // 008A EQ R7 R1 R277
0x781E0003, // 008B JMPF R7 #0090
0x881C0D15, // 008C GETMBR R7 R6 R277
0x781E0001, // 008D JMPF R7 #0090
0x8C1C0D15, // 008E GETMET R7 R6 R277
0x7C1C0200, // 008F CALL R7 1
0xA8040001, // 0090 EXBLK 1 1
0x7002000B, // 0091 JMP #009E
0xAC1C0002, // 0092 CATCH R7 0 2
0x70020008, // 0093 JMP #009D
0xA4262C00, // 0094 IMPORT R9 R278
0x6028000F, // 0095 GETGBL R10 G15
0x8C2C1317, // 0096 GETMET R11 R9 R279
0x58340018, // 0097 LDCONST R13 K24
0x5C380E00, // 0098 MOVE R14 R7
0x5C3C1000, // 0099 MOVE R15 R8
0x7C2C0800, // 009A CALL R11 4
0x7C280200, // 009B CALL R10 1
0x70020000, // 009C JMP #009E
0xB0080000, // 009D RAISE 2 R0 R0
0x7001FF85, // 009E JMP #0025
0x58140019, // 009F LDCONST R5 K25
0xAC140200, // 00A0 CATCH R5 1 0
0xB0080000, // 00A1 RAISE 2 R0 R0
0x80000000, // 00A2 RET 0 R0
})
)
);

View File

@ -242,15 +242,17 @@ class Tasmota2 : Tasmota
end
def event(type, cmd, idx, payload)
if type=='every_50ms' self.run_deferred() end #- first run deferred events -#
if type=='cmd' return self.exec_cmd(cmd, idx, payload)
elif type=='rule' return self.exec_rules(payload)
elif type=='mqtt_data' return nil
elif type=='gc' return self.gc()
elif type=='every_50ms' return self.run_deferred()
elif self._drivers
for d:self._drivers
try
if type=='every_second' && d.every_second d.every_second()
elif type=='every_50ms' && d.every_50ms d.every_50ms()
elif type=='every_100ms' && d.every_100ms d.every_100ms()
elif type=='web_add_button' && d.web_add_button d.web_add_button()
elif type=='web_add_main_button' && d.web_add_main_button d.web_add_main_button()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_file_source_map) {
{ be_const_key(dot_p, -1), be_const_index(0) },
};
static be_define_const_map(
be_class_audio_file_source_map,
1
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_file_source,
1,
NULL,
AudioFileSource
);

View File

@ -0,0 +1,19 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_file_source_fs_map) {
{ be_const_key(init, 2), be_const_func(i2s_file_source_fs_init) },
{ be_const_key(deinit, -1), be_const_func(i2s_file_source_fs_deinit) },
{ be_const_key(close, -1), be_const_func(i2s_file_source_fs_deinit) },
};
static be_define_const_map(
be_class_audio_file_source_fs_map,
3
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_file_source_fs,
0,
(bclass *)&be_class_audio_file_source,
AudioFileSourceFS
);

View File

@ -0,0 +1,17 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_generator_map) {
{ be_const_key(dot_p, -1), be_const_index(0) },
};
static be_define_const_map(
be_class_audio_generator_map,
1
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_generator,
1,
NULL,
AudioGenerator
);

View File

@ -0,0 +1,23 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_generator_mp3_map) {
{ be_const_key(close, -1), be_const_func(i2s_generator_mp3_deinit) },
{ be_const_key(stop, -1), be_const_func(i2s_generator_mp3_stop) },
{ be_const_key(loop, 0), be_const_func(i2s_generator_mp3_loop) },
{ be_const_key(isrunning, 1), be_const_func(i2s_generator_mp3_isrunning) },
{ be_const_key(begin, -1), be_const_func(i2s_generator_mp3_begin) },
{ be_const_key(deinit, 6), be_const_func(i2s_generator_mp3_deinit) },
{ be_const_key(init, -1), be_const_func(i2s_generator_mp3_init) },
};
static be_define_const_map(
be_class_audio_generator_mp3_map,
7
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_generator_mp3,
0,
(bclass *)&be_class_audio_generator,
AudioGeneratorMP3
);

View File

@ -0,0 +1,17 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_output_map) {
{ be_const_key(dot_p, -1), be_const_index(0) },
};
static be_define_const_map(
be_class_audio_output_map,
1
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_output,
1,
NULL,
AudioOutput
);

View File

@ -0,0 +1,19 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_audio_output_i2s_map) {
{ be_const_key(init, 2), be_const_func(i2s_output_i2s_init) },
{ be_const_key(deinit, -1), be_const_func(i2s_output_i2s_deinit) },
{ be_const_key(close, -1), be_const_func(i2s_output_i2s_deinit) },
};
static be_define_const_map(
be_class_audio_output_i2s_map,
3
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_audio_output_i2s,
0,
(bclass *)&be_class_audio_output,
AudioOutputI2S
);

View File

@ -7,7 +7,7 @@ static be_define_const_map_slots(be_class_bytes_map) {
{ be_const_key(seti, -1), be_const_func(m_set) },
{ be_const_key(setitem, -1), be_const_func(m_setitem) },
{ be_const_key(item, 18), be_const_func(m_item) },
{ be_const_key(dot_p, 3), be_const_var(0) },
{ be_const_key(dot_p, 3), be_const_index(0) },
{ be_const_key(geti, -1), be_const_func(m_geti) },
{ be_const_key(opt_connect, -1), be_const_func(m_connect) },
{ be_const_key(tostring, -1), be_const_func(m_tostring) },

View File

@ -14,7 +14,7 @@ static be_define_const_map_slots(be_class_list_map) {
{ be_const_key(tostring, 3), be_const_func(m_tostring) },
{ be_const_key(opt_eq, -1), be_const_func(m_equal) },
{ be_const_key(init, -1), be_const_func(m_init) },
{ be_const_key(dot_p, 17), be_const_var(0) },
{ be_const_key(dot_p, 17), be_const_index(0) },
{ be_const_key(setitem, -1), be_const_func(m_setitem) },
{ be_const_key(opt_connect, 4), be_const_func(m_connect) },
{ be_const_key(opt_neq, -1), be_const_func(m_nequal) },

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_arc_map) {
{ be_const_key(init, 2), be_const_func(lvbe_arc_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_bar_map) {
{ be_const_key(init, 2), be_const_func(lvbe_bar_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_btn_map) {
{ be_const_key(init, 2), be_const_func(lvbe_btn_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_btnmatrix_map) {
{ be_const_key(init, 2), be_const_func(lvbe_btnmatrix_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_calendar_map) {
{ be_const_key(init, 2), be_const_func(lvbe_calendar_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_canvas_map) {
{ be_const_key(init, 2), be_const_func(lvbe_canvas_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_chart_map) {
{ be_const_key(init, 2), be_const_func(lvbe_chart_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_checkbox_map) {
{ be_const_key(init, 2), be_const_func(lvbe_checkbox_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_color_map) {
{ be_const_key(init, -1), be_const_func(lco_init) },
{ be_const_key(tostring, 2), be_const_func(lco_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
};
static be_define_const_map(

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_cont_map) {
{ be_const_key(init, 2), be_const_func(lvbe_cont_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_cpicker_map) {
{ be_const_key(init, 2), be_const_func(lvbe_cpicker_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -1,7 +1,7 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_lv_ctypes_map) {
{ be_const_key(dot_def, -1), be_const_var(0) },
{ be_const_key(dot_def, -1), be_const_index(0) },
{ be_const_key(setmember, -1), be_const_func(be_ctypes_setmember) },
{ be_const_key(init, -1), be_const_func(be_ctypes_init) },
{ be_const_key(member, 2), be_const_func(be_ctypes_member) },

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_dropdown_map) {
{ be_const_key(init, 2), be_const_func(lvbe_dropdown_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_font_map) {
{ be_const_key(init, -1), be_const_func(lvx_init) },
{ be_const_key(tostring, 2), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
};
static be_define_const_map(

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_gauge_map) {
{ be_const_key(init, 2), be_const_func(lvbe_gauge_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_group_map) {
{ be_const_key(init, 2), be_const_func(lvbe_group_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_img_map) {
{ be_const_key(init, 2), be_const_func(lvbe_img_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_imgbtn_map) {
{ be_const_key(init, 2), be_const_func(lvbe_imgbtn_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_indev_map) {
{ be_const_key(init, 2), be_const_func(lv0_init) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_keyboard_map) {
{ be_const_key(init, 2), be_const_func(lvbe_keyboard_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_label_map) {
{ be_const_key(init, 2), be_const_func(lvbe_label_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_led_map) {
{ be_const_key(init, 2), be_const_func(lvbe_led_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_line_map) {
{ be_const_key(init, 2), be_const_func(lvbe_line_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_linemeter_map) {
{ be_const_key(init, 2), be_const_func(lvbe_linemeter_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_list_map) {
{ be_const_key(init, 2), be_const_func(lvbe_list_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_msgbox_map) {
{ be_const_key(init, 2), be_const_func(lvbe_msgbox_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_obj_map) {
{ be_const_key(init, 2), be_const_func(lvbe_obj_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_objmask_map) {
{ be_const_key(init, 2), be_const_func(lvbe_objmask_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_page_map) {
{ be_const_key(init, 2), be_const_func(lvbe_page_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_roller_map) {
{ be_const_key(init, 2), be_const_func(lvbe_roller_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_slider_map) {
{ be_const_key(init, 2), be_const_func(lvbe_slider_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_spinbox_map) {
{ be_const_key(init, 2), be_const_func(lvbe_spinbox_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_spinner_map) {
{ be_const_key(init, 2), be_const_func(lvbe_spinner_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_style_map) {
{ be_const_key(init, 2), be_const_func(lvs_init) },
{ be_const_key(tostring, -1), be_const_func(lvs_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_switch_map) {
{ be_const_key(init, 2), be_const_func(lvbe_switch_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_table_map) {
{ be_const_key(init, 2), be_const_func(lvbe_table_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_tabview_map) {
{ be_const_key(init, 2), be_const_func(lvbe_tabview_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_textarea_map) {
{ be_const_key(init, 2), be_const_func(lvbe_textarea_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_tileview_map) {
{ be_const_key(init, 2), be_const_func(lvbe_tileview_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -3,7 +3,7 @@
static be_define_const_map_slots(be_class_lv_win_map) {
{ be_const_key(init, 2), be_const_func(lvbe_win_create) },
{ be_const_key(tostring, -1), be_const_func(lvx_tostring) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(member, 0), be_const_func(lvx_member) },
};

View File

@ -1,7 +1,7 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_map_map) {
{ be_const_key(dot_p, 2), be_const_var(0) },
{ be_const_key(dot_p, 2), be_const_index(0) },
{ be_const_key(insert, -1), be_const_func(m_insert) },
{ be_const_key(remove, -1), be_const_func(m_remove) },
{ be_const_key(tostring, -1), be_const_func(m_tostring) },

View File

@ -2,7 +2,7 @@
static be_define_const_map_slots(be_class_md5_map) {
{ be_const_key(update, -1), be_const_func(m_md5_update) },
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(finish, -1), be_const_func(m_md5_finish) },
{ be_const_key(init, 1), be_const_func(m_md5_init) },
};

View File

@ -5,9 +5,9 @@ static be_define_const_map_slots(be_class_range_map) {
{ be_const_key(iter, -1), be_const_func(m_iter) },
{ be_const_key(lower, -1), be_const_func(m_lower) },
{ be_const_key(init, 4), be_const_func(m_init) },
{ be_const_key(__upper__, -1), be_const_var(0) },
{ be_const_key(__upper__, -1), be_const_index(0) },
{ be_const_key(tostring, -1), be_const_func(m_tostring) },
{ be_const_key(__lower__, -1), be_const_var(1) },
{ be_const_key(__lower__, -1), be_const_index(1) },
{ be_const_key(upper, 1), be_const_func(m_upper) },
};

View File

@ -10,14 +10,14 @@ static be_define_const_map_slots(be_class_tasmota_map) {
{ be_const_key(_cmd, -1), be_const_func(l_cmd) },
{ be_const_key(web_send, 16), be_const_func(l_webSend) },
{ be_const_key(set_timer, -1), be_const_closure(set_timer_closure) },
{ be_const_key(_cb, -1), be_const_var(0) },
{ be_const_key(_cb, -1), be_const_index(0) },
{ be_const_key(exec_cmd, -1), be_const_closure(exec_cmd_closure) },
{ be_const_key(i2c_enabled, 42), be_const_func(l_i2cenabled) },
{ be_const_key(cmd, -1), be_const_closure(cmd_closure) },
{ be_const_key(resp_cmnd_done, 28), be_const_func(l_respCmndDone) },
{ be_const_key(set_light, 1), be_const_closure(set_light_closure) },
{ be_const_key(get_light, -1), be_const_closure(get_light_closure) },
{ be_const_key(_rules, 50), be_const_var(1) },
{ be_const_key(_rules, 50), be_const_index(1) },
{ be_const_key(time_reached, -1), be_const_func(l_timereached) },
{ be_const_key(web_send_decimal, -1), be_const_func(l_webSendDecimal) },
{ be_const_key(load, 22), be_const_closure(load_closure) },
@ -32,14 +32,14 @@ static be_define_const_map_slots(be_class_tasmota_map) {
{ be_const_key(get_option, -1), be_const_func(l_getoption) },
{ be_const_key(resp_cmnd_str, -1), be_const_func(l_respCmndStr) },
{ be_const_key(response_append, -1), be_const_func(l_respAppend) },
{ be_const_key(_timers, -1), be_const_var(2) },
{ be_const_key(_timers, -1), be_const_index(2) },
{ be_const_key(try_rule, -1), be_const_closure(try_rule_closure) },
{ be_const_key(set_power, 45), be_const_func(l_setpower) },
{ be_const_key(resp_cmnd_error, -1), be_const_func(l_respCmndError) },
{ be_const_key(publish, -1), be_const_func(l_publish) },
{ be_const_key(_ccmd, 13), be_const_var(3) },
{ be_const_key(_ccmd, 13), be_const_index(3) },
{ be_const_key(_get_cb, -1), be_const_func(l_get_cb) },
{ be_const_key(wire1, 15), be_const_var(4) },
{ be_const_key(wire1, 15), be_const_index(4) },
{ be_const_key(gen_cb, 6), be_const_closure(gen_cb_closure) },
{ be_const_key(rtc, -1), be_const_func(l_rtc) },
{ be_const_key(time_dump, -1), be_const_func(l_time_dump) },
@ -50,13 +50,13 @@ static be_define_const_map_slots(be_class_tasmota_map) {
{ be_const_key(find_op, 25), be_const_closure(find_op_closure) },
{ be_const_key(chars_in_string, -1), be_const_closure(chars_in_string_closure) },
{ be_const_key(get_power, -1), be_const_func(l_getpower) },
{ be_const_key(wire2, 8), be_const_var(5) },
{ be_const_key(wire2, 8), be_const_index(5) },
{ be_const_key(wire_scan, 55), be_const_closure(wire_scan_closure) },
{ be_const_key(resp_cmnd_failed, -1), be_const_func(l_respCmndFailed) },
{ be_const_key(exec_rules, -1), be_const_closure(exec_rules_closure) },
{ be_const_key(cb_dispatch, -1), be_const_closure(cb_dispatch_closure) },
{ be_const_key(resp_cmnd, -1), be_const_func(l_respCmnd) },
{ be_const_key(_drivers, -1), be_const_var(6) },
{ be_const_key(_drivers, -1), be_const_index(6) },
{ be_const_key(add_driver, -1), be_const_closure(add_driver_closure) },
};

View File

@ -1,31 +1,32 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_class_tasmota_driver_map) {
{ be_const_key(every_second, 1), be_const_var(0) },
{ be_const_key(web_add_config_button, -1), be_const_var(1) },
{ be_const_key(web_sensor, 5), be_const_var(2) },
{ be_const_key(web_add_button, 10), be_const_var(3) },
{ be_const_key(button_pressed, 6), be_const_index(0) },
{ be_const_key(web_add_management_button, -1), be_const_index(1) },
{ be_const_key(web_add_button, 13), be_const_index(2) },
{ be_const_key(web_add_config_button, -1), be_const_index(3) },
{ be_const_key(json_append, -1), be_const_index(4) },
{ be_const_key(display, 3), be_const_index(5) },
{ be_const_key(web_add_console_button, 14), be_const_index(6) },
{ be_const_key(every_100ms, -1), be_const_index(7) },
{ be_const_key(every_50ms, -1), be_const_index(8) },
{ be_const_key(every_second, -1), be_const_index(9) },
{ be_const_key(save_before_restart, -1), be_const_index(10) },
{ be_const_key(get_tasmota, -1), be_const_closure(get_tasmota_closure) },
{ be_const_key(web_sensor, 7), be_const_index(11) },
{ be_const_key(web_add_handler, 1), be_const_index(12) },
{ be_const_key(web_add_main_button, -1), be_const_index(13) },
{ be_const_key(add_cmd, -1), be_const_closure(add_cmd_closure) },
{ be_const_key(web_add_console_button, 12), be_const_var(4) },
{ be_const_key(web_add_management_button, -1), be_const_var(5) },
{ be_const_key(display, -1), be_const_var(6) },
{ be_const_key(get_tasmota, 13), be_const_closure(get_tasmota_closure) },
{ be_const_key(every_100ms, -1), be_const_var(7) },
{ be_const_key(save_before_restart, -1), be_const_var(8) },
{ be_const_key(button_pressed, -1), be_const_var(9) },
{ be_const_key(web_add_handler, -1), be_const_var(10) },
{ be_const_key(web_add_main_button, -1), be_const_var(11) },
{ be_const_key(json_append, 8), be_const_var(12) },
};
static be_define_const_map(
be_class_tasmota_driver_map,
15
16
);
BE_EXPORT_VARIABLE be_define_const_class(
be_class_tasmota_driver,
13,
14,
NULL,
Driver
);

View File

@ -3,13 +3,13 @@
static be_define_const_map_slots(be_class_tasmota_i2c_driver_map) {
{ be_const_key(read32, -1), be_const_closure(read32_closure) },
{ be_const_key(write8, 6), be_const_closure(write8_closure) },
{ be_const_key(name, -1), be_const_var(0) },
{ be_const_key(addr, 10), be_const_var(1) },
{ be_const_key(name, -1), be_const_index(0) },
{ be_const_key(addr, 10), be_const_index(1) },
{ be_const_key(read12, -1), be_const_closure(read12_closure) },
{ be_const_key(write_bit, 8), be_const_closure(write_bit_closure) },
{ be_const_key(read13, -1), be_const_closure(read13_closure) },
{ be_const_key(read24, -1), be_const_closure(read24_closure) },
{ be_const_key(wire, -1), be_const_var(2) },
{ be_const_key(wire, -1), be_const_index(2) },
{ be_const_key(init, -1), be_const_closure(init_closure) },
{ be_const_key(read8, -1), be_const_closure(read8_closure) },
};

View File

@ -2,7 +2,7 @@
static be_define_const_map_slots(be_class_tasmota_wire_map) {
{ be_const_key(_end_transmission, 10), be_const_func(b_wire_endtransmission) },
{ be_const_key(bus, -1), be_const_var(0) },
{ be_const_key(bus, -1), be_const_index(0) },
{ be_const_key(_read, 7), be_const_func(b_wire_read) },
{ be_const_key(read, -1), be_const_func(b_wire_validread) },
{ be_const_key(_request_from, -1), be_const_func(b_wire_requestfrom) },

View File

@ -1,7 +1,7 @@
#include "be_constobj.h"
static be_define_const_map_slots(be_lvgl_cb_map) {
{ be_const_key(dot_p, -1), be_const_var(0) },
{ be_const_key(dot_p, -1), be_const_index(0) },
{ be_const_key(tostring, 2), be_const_func(lvx_tostring) },
{ be_const_key(call, -1), be_const_func(lv_cb_call) },
{ be_const_key(init, 0), be_const_func(lv0_init) },

View File

@ -1,269 +1,279 @@
#include "be_constobj.h"
static be_define_const_map_slots(m_libgpio_map) {
{ be_const_key(MAX31855CLK, -1), be_const_int(79) },
{ be_const_key(DHT11_OUT, 197), be_const_int(40) },
{ be_const_key(PZEM004_RX, 113), be_const_int(47) },
{ be_const_key(BS814_DAT, 115), be_const_int(215) },
{ be_const_key(ROT1B_NP, -1), be_const_int(212) },
{ be_const_key(WEBCAM_HREF, -1), be_const_int(161) },
{ be_const_key(SPI_CLK, 233), be_const_int(23) },
{ be_const_key(TCP_TX, -1), be_const_int(171) },
{ be_const_key(SM16716_DAT, 72), be_const_int(92) },
{ be_const_key(AZ_RXD, 136), be_const_int(77) },
{ be_const_key(PWM1, -1), be_const_int(13) },
{ be_const_key(EXS_ENABLE, -1), be_const_int(129) },
{ be_const_key(ETH_PHY_POWER, -1), be_const_int(173) },
{ be_const_key(HIGH, -1), be_const_int(1) },
{ be_const_key(ETH_PHY_MDIO, -1), be_const_int(175) },
{ be_const_key(MP3_DFR562, 11), be_const_int(67) },
{ be_const_key(HM10_RX, -1), be_const_int(138) },
{ be_const_key(SSPI_MOSI, -1), be_const_int(27) },
{ be_const_key(KEY1_INV_NP, -1), be_const_int(4) },
{ be_const_key(NONE, -1), be_const_int(0) },
{ be_const_key(DDS2382_RX, 18), be_const_int(123) },
{ be_const_key(DSB_OUT, -1), be_const_int(42) },
{ be_const_key(FTC532, -1), be_const_int(195) },
{ be_const_key(ARIRFSEL, 222), be_const_int(99) },
{ be_const_key(pin, -1), be_const_func(gp_pin) },
{ be_const_key(RFRECV, -1), be_const_int(36) },
{ be_const_key(HRXL_RX, -1), be_const_int(144) },
{ be_const_key(HRE_CLOCK, -1), be_const_int(106) },
{ be_const_key(AS608_RX, -1), be_const_int(188) },
{ be_const_key(SDS0X1_TX, -1), be_const_int(54) },
{ be_const_key(TM1637DIO, 112), be_const_int(223) },
{ be_const_key(ILI9488_CS, 138), be_const_int(201) },
{ be_const_key(WEBCAM_VSYNC, 184), be_const_int(160) },
{ be_const_key(TASMOTACLIENT_RST, 224), be_const_int(132) },
{ be_const_key(INPUT, 57), be_const_int(239) },
{ be_const_key(SBR_TX, -1), be_const_int(56) },
{ be_const_key(HPMA_TX, -1), be_const_int(135) },
{ be_const_key(MCP39F5_RX, 41), be_const_int(87) },
{ be_const_key(OUTPUT, 69), be_const_int(2) },
{ be_const_key(AZ_TXD, -1), be_const_int(76) },
{ be_const_key(ADC_BUTTON, -1), be_const_int(150) },
{ be_const_key(ETH_PHY_MDC, -1), be_const_int(174) },
{ be_const_key(ZEROCROSS, -1), be_const_int(236) },
{ be_const_key(AS3935, 147), be_const_int(146) },
{ be_const_key(SSPI_MAX31865_CS1, -1), be_const_int(105) },
{ be_const_key(LEDLNK_INV, 56), be_const_int(18) },
{ be_const_key(RDM6300_RX, -1), be_const_int(113) },
{ be_const_key(TM1638STB, -1), be_const_int(66) },
{ be_const_key(SR04_TRIG, 166), be_const_int(58) },
{ be_const_key(CSE7761_RX, -1), be_const_int(229) },
{ be_const_key(HM10_TX, -1), be_const_int(139) },
{ be_const_key(SM16716_CLK, 111), be_const_int(91) },
{ be_const_key(ADC_TEMP, 120), be_const_int(148) },
{ be_const_key(NRG_SEL_INV, -1), be_const_int(82) },
{ be_const_key(OPEN_DRAIN, -1), be_const_int(16) },
{ be_const_key(ST7789_DC, 196), be_const_int(207) },
{ be_const_key(INPUT_PULLDOWN, 122), be_const_int(9) },
{ be_const_key(SM2135_CLK, 219), be_const_int(126) },
{ be_const_key(WEBCAM_PSCLK, 32), be_const_int(163) },
{ be_const_key(ADC_CT_POWER, 82), be_const_int(153) },
{ be_const_key(OUTPUT_OPEN_DRAIN, -1), be_const_int(18) },
{ be_const_key(CC1101_GDO2, -1), be_const_int(143) },
{ be_const_key(SM2135_DAT, 28), be_const_int(127) },
{ be_const_key(digital_write, -1), be_const_func(gp_digital_write) },
{ be_const_key(GPS_TX, 68), be_const_int(137) },
{ be_const_key(TFMINIPLUS_RX, -1), be_const_int(235) },
{ be_const_key(RC522_CS, -1), be_const_int(196) },
{ be_const_key(PMS5003_TX, -1), be_const_int(52) },
{ be_const_key(DDS2382_TX, -1), be_const_int(122) },
{ be_const_key(IEM3000_RX, 133), be_const_int(180) },
{ be_const_key(ZIGBEE_RX, -1), be_const_int(112) },
{ be_const_key(ZIGBEE_RST, -1), be_const_int(181) },
{ be_const_key(HPMA_RX, -1), be_const_int(134) },
{ be_const_key(SDS0X1_RX, -1), be_const_int(55) },
{ be_const_key(WEBCAM_RESET, -1), be_const_int(155) },
{ be_const_key(CNTR1, 249), be_const_int(11) },
{ be_const_key(ADC_LIGHT, 231), be_const_int(149) },
{ be_const_key(HRE_DATA, 34), be_const_int(107) },
{ be_const_key(OUTPUT_HI, -1), be_const_int(120) },
{ be_const_key(LED1_INV, 176), be_const_int(10) },
{ be_const_key(LMT01, -1), be_const_int(178) },
{ be_const_key(DSB, -1), be_const_int(41) },
{ be_const_key(CSE7766_RX, -1), be_const_int(97) },
{ be_const_key(SBR_RX, -1), be_const_int(57) },
{ be_const_key(PROJECTOR_CTRL_TX, 148), be_const_int(224) },
{ be_const_key(DI, 211), be_const_int(94) },
{ be_const_key(PZEM0XX_TX, -1), be_const_int(46) },
{ be_const_key(SENSOR_END, -1), be_const_int(240) },
{ be_const_key(A4988_ENA, 97), be_const_int(118) },
{ be_const_key(WEBCAM_PSRCS, 46), be_const_int(165) },
{ be_const_key(ELECTRIQ_MOODL_TX, -1), be_const_int(145) },
{ be_const_key(WEBCAM_XCLK, -1), be_const_int(156) },
{ be_const_key(PN532_RXD, -1), be_const_int(90) },
{ be_const_key(BL0940_RX, 195), be_const_int(170) },
{ be_const_key(PMS5003_RX, -1), be_const_int(53) },
{ be_const_key(HALLEFFECT, -1), be_const_int(237) },
{ be_const_key(PWM1_INV, 172), be_const_int(14) },
{ be_const_key(TASMOTACLIENT_RXD, -1), be_const_int(131) },
{ be_const_key(WEBCAM_SIOD, 110), be_const_int(157) },
{ be_const_key(TM1637CLK, 33), be_const_int(222) },
{ be_const_key(IRRECV, -1), be_const_int(34) },
{ be_const_key(SPI_MOSI, -1), be_const_int(22) },
{ be_const_key(TELEINFO_RX, 182), be_const_int(176) },
{ be_const_key(TASMOTACLIENT_RST_INV, -1), be_const_int(133) },
{ be_const_key(PROJECTOR_CTRL_RX, -1), be_const_int(225) },
{ be_const_key(WIEGAND_D0, -1), be_const_int(216) },
{ be_const_key(ADE7953_IRQ, -1), be_const_int(108) },
{ be_const_key(SPI_DC, -1), be_const_int(25) },
{ be_const_key(IRSEND, -1), be_const_int(33) },
{ be_const_key(TFMINIPLUS_TX, 87), be_const_int(234) },
{ be_const_key(I2C_SCL, -1), be_const_int(19) },
{ be_const_key(MAX7219DIN, -1), be_const_int(232) },
{ be_const_key(ROT1A_NP, -1), be_const_int(211) },
{ be_const_key(PZEM017_RX, 156), be_const_int(49) },
{ be_const_key(WINDMETER_SPEED, -1), be_const_int(168) },
{ be_const_key(RC522_RST, -1), be_const_int(191) },
{ be_const_key(SR04_ECHO, 89), be_const_int(59) },
{ be_const_key(BOILER_OT_TX, -1), be_const_int(167) },
{ be_const_key(ZIGBEE_TX, 104), be_const_int(111) },
{ be_const_key(REL1_INV, -1), be_const_int(8) },
{ be_const_key(WS2812, -1), be_const_int(43) },
{ be_const_key(BUZZER, 0), be_const_int(15) },
{ be_const_key(CC1101_GDO0, -1), be_const_int(142) },
{ be_const_key(SWT1_NP, -1), be_const_int(6) },
{ be_const_key(SSPI_DC, 49), be_const_int(30) },
{ be_const_key(ADC_RANGE, 128), be_const_int(152) },
{ be_const_key(OPTION_A, 174), be_const_int(194) },
{ be_const_key(SHELLY_DIMMER_RST_INV, -1), be_const_int(190) },
{ be_const_key(MGC3130_XFER, -1), be_const_int(73) },
{ be_const_key(VL53L0X_XSHUT1, 140), be_const_int(230) },
{ be_const_key(SSD1351_CS, -1), be_const_int(204) },
{ be_const_key(LEDLNK, 63), be_const_int(17) },
{ be_const_key(P9813_DAT, 67), be_const_int(193) },
{ be_const_key(pin_mode, 218), be_const_func(gp_pin_mode) },
{ be_const_key(RF_SENSOR, -1), be_const_int(75) },
{ be_const_key(TELEINFO_ENABLE, -1), be_const_int(177) },
{ be_const_key(RISING, -1), be_const_int(1) },
{ be_const_key(DHT11, -1), be_const_int(37) },
{ be_const_key(SDCARD_CS, -1), be_const_int(210) },
{ be_const_key(ROT1B, 169), be_const_int(103) },
{ be_const_key(TUYA_RX, -1), be_const_int(72) },
{ be_const_key(SSPI_CS, -1), be_const_int(29) },
{ be_const_key(DCKI, -1), be_const_int(95) },
{ be_const_key(XPT2046_CS, -1), be_const_int(227) },
{ be_const_key(DDSU666_RX, -1), be_const_int(125) },
{ be_const_key(A4988_STP, -1), be_const_int(117) },
{ be_const_key(SOLAXX1_RX, -1), be_const_int(110) },
{ be_const_key(NRG_SEL, -1), be_const_int(81) },
{ be_const_key(HX711_DAT, -1), be_const_int(69) },
{ be_const_key(SSPI_MISO, -1), be_const_int(26) },
{ be_const_key(WEBCAM_HSD, -1), be_const_int(164) },
{ be_const_key(GPS_RX, -1), be_const_int(136) },
{ be_const_key(NEOPOOL_RX, -1), be_const_int(219) },
{ be_const_key(PZEM016_RX, -1), be_const_int(48) },
{ be_const_key(CSE7761_TX, -1), be_const_int(228) },
{ be_const_key(OLED_RESET, -1), be_const_int(32) },
{ be_const_key(ADC_INPUT, 101), be_const_int(147) },
{ be_const_key(LE01MR_TX, 80), be_const_int(141) },
{ be_const_key(EPAPER29_CS, 238), be_const_int(202) },
{ be_const_key(DHT22, -1), be_const_int(38) },
{ be_const_key(BACKLIGHT, -1), be_const_int(31) },
{ be_const_key(NRG_CF1, -1), be_const_int(83) },
{ be_const_key(MCP39F5_RST, 1), be_const_int(88) },
{ be_const_key(SDM120_TX, -1), be_const_int(60) },
{ be_const_key(HLW_CF, -1), be_const_int(84) },
{ be_const_key(BOILER_OT_RX, -1), be_const_int(166) },
{ be_const_key(TUYA_TX, -1), be_const_int(71) },
{ be_const_key(NRF24_DC, -1), be_const_int(198) },
{ be_const_key(TM1638DIO, -1), be_const_int(65) },
{ be_const_key(IBEACON_RX, 179), be_const_int(115) },
{ be_const_key(DEEPSLEEP, -1), be_const_int(128) },
{ be_const_key(HJL_CF, -1), be_const_int(85) },
{ be_const_key(DDSU666_TX, 154), be_const_int(124) },
{ be_const_key(MHZ_TXD, -1), be_const_int(44) },
{ be_const_key(MIEL_HVAC_TX, 22), be_const_int(183) },
{ be_const_key(BS814_CLK, 209), be_const_int(214) },
{ be_const_key(SM16716_SEL, -1), be_const_int(93) },
{ be_const_key(KEY1_TC, 48), be_const_int(169) },
{ be_const_key(SWT1, 5), be_const_int(5) },
{ be_const_key(WEBCAM_DATA, 217), be_const_int(159) },
{ be_const_key(PULLDOWN, -1), be_const_int(8) },
{ be_const_key(A4988_MS1, -1), be_const_int(119) },
{ be_const_key(pin_used, -1), be_const_func(gp_pin_used) },
{ be_const_key(IBEACON_TX, 220), be_const_int(114) },
{ be_const_key(NRF24_CS, -1), be_const_int(197) },
{ be_const_key(RXD, -1), be_const_int(101) },
{ be_const_key(NEOPOOL_TX, -1), be_const_int(218) },
{ be_const_key(WEBCAM_SIOC, -1), be_const_int(158) },
{ be_const_key(TASMOTACLIENT_TXD, -1), be_const_int(130) },
{ be_const_key(MAX31855CS, -1), be_const_int(78) },
{ be_const_key(TM1638CLK, -1), be_const_int(64) },
{ be_const_key(ILI9341_CS, -1), be_const_int(199) },
{ be_const_key(PN532_TXD, -1), be_const_int(89) },
{ be_const_key(LOW, -1), be_const_int(0) },
{ be_const_key(SOLAXX1_TX, -1), be_const_int(109) },
{ be_const_key(SDM72_RX, -1), be_const_int(221) },
{ be_const_key(PULLUP, -1), be_const_int(4) },
{ be_const_key(MIEL_HVAC_RX, -1), be_const_int(184) },
{ be_const_key(MAX31855DO, 216), be_const_int(80) },
{ be_const_key(REL1, -1), be_const_int(7) },
{ be_const_key(HX711_SCK, -1), be_const_int(68) },
{ be_const_key(WEBCAM_PCLK, -1), be_const_int(162) },
{ be_const_key(ARIRFRCV, 175), be_const_int(98) },
{ be_const_key(SAIR_TX, -1), be_const_int(50) },
{ be_const_key(digital_read, -1), be_const_func(gp_digital_read) },
{ be_const_key(LE01MR_RX, 125), be_const_int(140) },
{ be_const_key(TX2X_TXD_BLACK, -1), be_const_int(70) },
{ be_const_key(KEY1_INV, -1), be_const_int(3) },
{ be_const_key(ADC_JOY, -1), be_const_int(104) },
{ be_const_key(ST7789_CS, -1), be_const_int(206) },
{ be_const_key(SSD1331_CS, -1), be_const_int(208) },
{ be_const_key(FALLING, -1), be_const_int(2) },
{ be_const_key(SPI_CS, -1), be_const_int(24) },
{ be_const_key(BUZZER_INV, -1), be_const_int(16) },
{ be_const_key(RFSEND, -1), be_const_int(35) },
{ be_const_key(WE517_RX, -1), be_const_int(186) },
{ be_const_key(INPUT_PULLUP, -1), be_const_int(5) },
{ be_const_key(A4988_DIR, 223), be_const_int(116) },
{ be_const_key(SSPI_SCLK, -1), be_const_int(28) },
{ be_const_key(EPAPER42_CS, 252), be_const_int(203) },
{ be_const_key(SDM120_RX, -1), be_const_int(61) },
{ be_const_key(DYP_RX, -1), be_const_int(182) },
{ be_const_key(EPD_DATA, -1), be_const_int(238) },
{ be_const_key(TXD, -1), be_const_int(100) },
{ be_const_key(P9813_CLK, -1), be_const_int(192) },
{ be_const_key(SPI_CLK, 231), be_const_int(23) },
{ be_const_key(MHZ_RXD, -1), be_const_int(45) },
{ be_const_key(WIEGAND_D1, -1), be_const_int(217) },
{ be_const_key(SSD1331_DC, 90), be_const_int(209) },
{ be_const_key(ADC_PH, -1), be_const_int(213) },
{ be_const_key(CSE7766_TX, -1), be_const_int(96) },
{ be_const_key(ADC_BUTTON_INV, 81), be_const_int(151) },
{ be_const_key(SDM72_RX, -1), be_const_int(221) },
{ be_const_key(A4988_MS1, -1), be_const_int(119) },
{ be_const_key(DEEPSLEEP, -1), be_const_int(128) },
{ be_const_key(WIEGAND_D1, 192), be_const_int(217) },
{ be_const_key(WEBCAM_HSD, -1), be_const_int(164) },
{ be_const_key(TM1637DIO, -1), be_const_int(223) },
{ be_const_key(KEY1_INV_NP, 252), be_const_int(4) },
{ be_const_key(IBEACON_RX, -1), be_const_int(115) },
{ be_const_key(OUTPUT_LO, 243), be_const_int(121) },
{ be_const_key(RISING, 87), be_const_int(1) },
{ be_const_key(WEBCAM_PWDN, 10), be_const_int(154) },
{ be_const_key(BOILER_OT_TX, 32), be_const_int(167) },
{ be_const_key(CNTR1_NP, -1), be_const_int(12) },
{ be_const_key(OUTPUT_LO, 85), be_const_int(121) },
{ be_const_key(SHELLY_DIMMER_BOOT0, -1), be_const_int(189) },
{ be_const_key(WEBCAM_PWDN, -1), be_const_int(154) },
{ be_const_key(KEY1, 246), be_const_int(1) },
{ be_const_key(RA8876_CS, 204), be_const_int(205) },
{ be_const_key(SDM630_RX, 171), be_const_int(63) },
{ be_const_key(ILI9341_DC, -1), be_const_int(200) },
{ be_const_key(LED1, 257), be_const_int(9) },
{ be_const_key(SPI_MISO, -1), be_const_int(21) },
{ be_const_key(SSD1351_DC, 30), be_const_int(226) },
{ be_const_key(MAX7219CLK, -1), be_const_int(231) },
{ be_const_key(MCP39F5_TX, -1), be_const_int(86) },
{ be_const_key(ROT1A, -1), be_const_int(102) },
{ be_const_key(TCP_RX, 42), be_const_int(172) },
{ be_const_key(WE517_TX, -1), be_const_int(185) },
{ be_const_key(SAIR_RX, 214), be_const_int(51) },
{ be_const_key(IEM3000_TX, 143), be_const_int(179) },
{ be_const_key(SDM630_TX, -1), be_const_int(62) },
{ be_const_key(KEY1_NP, 251), be_const_int(2) },
{ be_const_key(I2C_SDA, -1), be_const_int(20) },
{ be_const_key(MGC3130_RESET, -1), be_const_int(74) },
{ be_const_key(SI7021, -1), be_const_int(39) },
{ be_const_key(MAX7219CS, 151), be_const_int(233) },
{ be_const_key(SDM72_TX, -1), be_const_int(220) },
{ be_const_key(AS608_TX, 6), be_const_int(187) },
{ be_const_key(MAX7219DIN, -1), be_const_int(232) },
{ be_const_key(I2C_SDA, 42), be_const_int(20) },
{ be_const_key(DCKI, 188), be_const_int(95) },
{ be_const_key(I2S_IN_CLK, -1), be_const_int(247) },
{ be_const_key(CHANGE, -1), be_const_int(4) },
{ be_const_key(pin_used, -1), be_const_func(gp_pin_used) },
{ be_const_key(HALLEFFECT, -1), be_const_int(237) },
{ be_const_key(ADC_TEMP, 112), be_const_int(148) },
{ be_const_key(SSPI_MOSI, 254), be_const_int(27) },
{ be_const_key(TASMOTACLIENT_RST, -1), be_const_int(132) },
{ be_const_key(ZIGBEE_RX, -1), be_const_int(112) },
{ be_const_key(ROT1B_NP, 107), be_const_int(212) },
{ be_const_key(SSD1351_CS, 149), be_const_int(204) },
{ be_const_key(MAX7219CLK, -1), be_const_int(231) },
{ be_const_key(SSD1331_DC, -1), be_const_int(209) },
{ be_const_key(SR04_TRIG, -1), be_const_int(58) },
{ be_const_key(TCP_RX, 187), be_const_int(172) },
{ be_const_key(SM16716_DAT, 91), be_const_int(92) },
{ be_const_key(OLED_RESET, 264), be_const_int(32) },
{ be_const_key(RDM6300_RX, -1), be_const_int(113) },
{ be_const_key(LOW, -1), be_const_int(0) },
{ be_const_key(ADC_BUTTON_INV, 79), be_const_int(151) },
{ be_const_key(SM16716_CLK, 76), be_const_int(91) },
{ be_const_key(SSPI_DC, -1), be_const_int(30) },
{ be_const_key(TFMINIPLUS_RX, -1), be_const_int(235) },
{ be_const_key(TM1638CLK, -1), be_const_int(64) },
{ be_const_key(BL0940_RX, -1), be_const_int(170) },
{ be_const_key(WEBCAM_PSCLK, -1), be_const_int(163) },
{ be_const_key(RFRECV, -1), be_const_int(36) },
{ be_const_key(GPS_RX, 124), be_const_int(136) },
{ be_const_key(DSB_OUT, -1), be_const_int(42) },
{ be_const_key(HPMA_TX, -1), be_const_int(135) },
{ be_const_key(SHELLY_DIMMER_RST_INV, -1), be_const_int(190) },
{ be_const_key(SDM72_TX, -1), be_const_int(220) },
{ be_const_key(HJL_CF, -1), be_const_int(85) },
{ be_const_key(IEM3000_RX, 24), be_const_int(180) },
{ be_const_key(KEY1_NP, -1), be_const_int(2) },
{ be_const_key(DDS2382_RX, -1), be_const_int(123) },
{ be_const_key(INPUT_PULLDOWN, -1), be_const_int(9) },
{ be_const_key(SSPI_MISO, -1), be_const_int(26) },
{ be_const_key(DDS2382_TX, -1), be_const_int(122) },
{ be_const_key(SDM630_RX, -1), be_const_int(63) },
{ be_const_key(SDS0X1_TX, 63), be_const_int(54) },
{ be_const_key(HPMA_RX, -1), be_const_int(134) },
{ be_const_key(DYP_RX, -1), be_const_int(182) },
{ be_const_key(NRG_CF1, 138), be_const_int(83) },
{ be_const_key(REL1_INV, 169), be_const_int(8) },
{ be_const_key(MCP39F5_RST, 131), be_const_int(88) },
{ be_const_key(I2S_OUT_SLCT, 170), be_const_int(245) },
{ be_const_key(ADE7953_IRQ, -1), be_const_int(108) },
{ be_const_key(REL1, -1), be_const_int(7) },
{ be_const_key(SOLAXX1_TX, 154), be_const_int(109) },
{ be_const_key(CSE7766_RX, -1), be_const_int(97) },
{ be_const_key(PROJECTOR_CTRL_TX, 29), be_const_int(224) },
{ be_const_key(PULLUP, -1), be_const_int(4) },
{ be_const_key(SPI_DC, 90), be_const_int(25) },
{ be_const_key(IBEACON_TX, -1), be_const_int(114) },
{ be_const_key(IEM3000_TX, 157), be_const_int(179) },
{ be_const_key(WEBCAM_PSRCS, -1), be_const_int(165) },
{ be_const_key(ELECTRIQ_MOODL_TX, -1), be_const_int(145) },
{ be_const_key(LED1_INV, -1), be_const_int(10) },
{ be_const_key(TASMOTACLIENT_RXD, 109), be_const_int(131) },
{ be_const_key(PN532_RXD, -1), be_const_int(90) },
{ be_const_key(ROT1A, 197), be_const_int(102) },
{ be_const_key(PROJECTOR_CTRL_RX, -1), be_const_int(225) },
{ be_const_key(EPAPER29_CS, -1), be_const_int(202) },
{ be_const_key(VL53L0X_XSHUT1, -1), be_const_int(230) },
{ be_const_key(DDSU666_RX, 22), be_const_int(125) },
{ be_const_key(SSPI_CS, -1), be_const_int(29) },
{ be_const_key(BACKLIGHT, 60), be_const_int(31) },
{ be_const_key(CC1101_GDO0, 225), be_const_int(142) },
{ be_const_key(INTERRUPT, -1), be_const_int(249) },
{ be_const_key(MP3_DFR562, -1), be_const_int(67) },
{ be_const_key(ROT1A_NP, -1), be_const_int(211) },
{ be_const_key(PZEM017_RX, -1), be_const_int(49) },
{ be_const_key(RC522_CS, 81), be_const_int(196) },
{ be_const_key(TASMOTACLIENT_RST_INV, -1), be_const_int(133) },
{ be_const_key(ETH_PHY_MDIO, -1), be_const_int(175) },
{ be_const_key(WE517_RX, -1), be_const_int(186) },
{ be_const_key(LMT01, -1), be_const_int(178) },
{ be_const_key(ILI9488_CS, -1), be_const_int(201) },
{ be_const_key(I2C_SCL, 0), be_const_int(19) },
{ be_const_key(TM1638STB, -1), be_const_int(66) },
{ be_const_key(ETH_PHY_MDC, -1), be_const_int(174) },
{ be_const_key(WE517_TX, 96), be_const_int(185) },
{ be_const_key(IRSEND, -1), be_const_int(33) },
{ be_const_key(I2S_OUT_CLK, -1), be_const_int(244) },
{ be_const_key(SPI_CS, -1), be_const_int(24) },
{ be_const_key(SWT1, -1), be_const_int(5) },
{ be_const_key(HM10_RX, -1), be_const_int(138) },
{ be_const_key(WEBCAM_HREF, -1), be_const_int(161) },
{ be_const_key(OPEN_DRAIN, -1), be_const_int(16) },
{ be_const_key(AS608_TX, -1), be_const_int(187) },
{ be_const_key(SSPI_SCLK, -1), be_const_int(28) },
{ be_const_key(A4988_DIR, -1), be_const_int(116) },
{ be_const_key(SHELLY_DIMMER_BOOT0, -1), be_const_int(189) },
{ be_const_key(I2S_OUT_DATA, -1), be_const_int(243) },
{ be_const_key(MIEL_HVAC_TX, -1), be_const_int(183) },
{ be_const_key(WEBCAM_SIOC, 41), be_const_int(158) },
{ be_const_key(RF_SENSOR, 57), be_const_int(75) },
{ be_const_key(AZ_TXD, -1), be_const_int(76) },
{ be_const_key(A4988_ENA, -1), be_const_int(118) },
{ be_const_key(DHT22, -1), be_const_int(38) },
{ be_const_key(TASMOTACLIENT_TXD, -1), be_const_int(130) },
{ be_const_key(TELEINFO_ENABLE, 62), be_const_int(177) },
{ be_const_key(NRF24_CS, -1), be_const_int(197) },
{ be_const_key(HRE_CLOCK, -1), be_const_int(106) },
{ be_const_key(NEOPOOL_RX, 158), be_const_int(219) },
{ be_const_key(HIGH, 237), be_const_int(1) },
{ be_const_key(HLW_CF, 53), be_const_int(84) },
{ be_const_key(AZ_RXD, -1), be_const_int(77) },
{ be_const_key(HM10_TX, 167), be_const_int(139) },
{ be_const_key(LEDLNK, 155), be_const_int(17) },
{ be_const_key(PWM1, -1), be_const_int(13) },
{ be_const_key(BS814_CLK, -1), be_const_int(214) },
{ be_const_key(TFMINIPLUS_TX, 99), be_const_int(234) },
{ be_const_key(WEBCAM_PCLK, -1), be_const_int(162) },
{ be_const_key(DSB, -1), be_const_int(41) },
{ be_const_key(NONE, -1), be_const_int(0) },
{ be_const_key(pin, 19), be_const_func(gp_pin) },
{ be_const_key(PN532_TXD, -1), be_const_int(89) },
{ be_const_key(SENSOR_END, 222), be_const_int(250) },
{ be_const_key(SM2135_CLK, -1), be_const_int(126) },
{ be_const_key(TX2X_TXD_BLACK, -1), be_const_int(70) },
{ be_const_key(ZEROCROSS, -1), be_const_int(236) },
{ be_const_key(ADC_INPUT, -1), be_const_int(147) },
{ be_const_key(RC522_RST, -1), be_const_int(191) },
{ be_const_key(SSD1331_CS, -1), be_const_int(208) },
{ be_const_key(BS814_DAT, -1), be_const_int(215) },
{ be_const_key(PULLDOWN, -1), be_const_int(8) },
{ be_const_key(I2S_IN_SLCT, 105), be_const_int(248) },
{ be_const_key(OPTION_A, -1), be_const_int(194) },
{ be_const_key(DI, -1), be_const_int(94) },
{ be_const_key(PZEM004_RX, -1), be_const_int(47) },
{ be_const_key(SDCARD_CS, -1), be_const_int(210) },
{ be_const_key(ZIGBEE_TX, 94), be_const_int(111) },
{ be_const_key(ST7789_DC, 50), be_const_int(207) },
{ be_const_key(P9813_DAT, 214), be_const_int(193) },
{ be_const_key(EXS_ENABLE, 56), be_const_int(129) },
{ be_const_key(SSPI_MAX31865_CS1, 147), be_const_int(105) },
{ be_const_key(PMS5003_RX, -1), be_const_int(53) },
{ be_const_key(pin_mode, -1), be_const_func(gp_pin_mode) },
{ be_const_key(SAIR_TX, 4), be_const_int(50) },
{ be_const_key(CSE7761_RX, 102), be_const_int(229) },
{ be_const_key(SBR_RX, 47), be_const_int(57) },
{ be_const_key(SOLAXX1_RX, -1), be_const_int(110) },
{ be_const_key(KEY1, 5), be_const_int(1) },
{ be_const_key(GPS_TX, 227), be_const_int(137) },
{ be_const_key(EPD_DATA, -1), be_const_int(238) },
{ be_const_key(WS2812, -1), be_const_int(43) },
{ be_const_key(PZEM0XX_TX, -1), be_const_int(46) },
{ be_const_key(WINDMETER_SPEED, -1), be_const_int(168) },
{ be_const_key(TUYA_RX, 199), be_const_int(72) },
{ be_const_key(NRG_SEL, -1), be_const_int(81) },
{ be_const_key(PZEM016_RX, 13), be_const_int(48) },
{ be_const_key(KEY1_PD, -1), be_const_int(240) },
{ be_const_key(LE01MR_RX, -1), be_const_int(140) },
{ be_const_key(ADC_PH, -1), be_const_int(213) },
{ be_const_key(SDM120_TX, -1), be_const_int(60) },
{ be_const_key(HX711_DAT, -1), be_const_int(69) },
{ be_const_key(CNTR1, 132), be_const_int(11) },
{ be_const_key(PWM1_INV, 184), be_const_int(14) },
{ be_const_key(RFSEND, 182), be_const_int(35) },
{ be_const_key(RXD, 194), be_const_int(101) },
{ be_const_key(SDM120_RX, -1), be_const_int(61) },
{ be_const_key(SWT1_NP, -1), be_const_int(6) },
{ be_const_key(MAX31855CLK, -1), be_const_int(79) },
{ be_const_key(DDSU666_TX, -1), be_const_int(124) },
{ be_const_key(MHZ_TXD, -1), be_const_int(44) },
{ be_const_key(OUTPUT_HI, -1), be_const_int(120) },
{ be_const_key(SM16716_SEL, -1), be_const_int(93) },
{ be_const_key(KEY1_INV_PD, -1), be_const_int(241) },
{ be_const_key(BOILER_OT_RX, 9), be_const_int(166) },
{ be_const_key(WEBCAM_SIOD, 78), be_const_int(157) },
{ be_const_key(SI7021, -1), be_const_int(39) },
{ be_const_key(MIEL_HVAC_RX, -1), be_const_int(184) },
{ be_const_key(P9813_CLK, -1), be_const_int(192) },
{ be_const_key(NRG_SEL_INV, 232), be_const_int(82) },
{ be_const_key(INPUT, 85), be_const_int(239) },
{ be_const_key(AS608_RX, -1), be_const_int(188) },
{ be_const_key(SR04_ECHO, -1), be_const_int(59) },
{ be_const_key(CSE7761_TX, -1), be_const_int(228) },
{ be_const_key(digital_write, -1), be_const_func(gp_digital_write) },
{ be_const_key(MAX31855DO, -1), be_const_int(80) },
{ be_const_key(CC1101_GDO2, -1), be_const_int(143) },
{ be_const_key(ETH_PHY_POWER, -1), be_const_int(173) },
{ be_const_key(ILI9341_CS, -1), be_const_int(199) },
{ be_const_key(OUTPUT_OPEN_DRAIN, -1), be_const_int(18) },
{ be_const_key(TM1637CLK, -1), be_const_int(222) },
{ be_const_key(SPI_MISO, 176), be_const_int(21) },
{ be_const_key(KEY1_INV, -1), be_const_int(3) },
{ be_const_key(PMS5003_TX, 75), be_const_int(52) },
{ be_const_key(A4988_STP, -1), be_const_int(117) },
{ be_const_key(WEBCAM_VSYNC, -1), be_const_int(160) },
{ be_const_key(SWT1_PD, -1), be_const_int(242) },
{ be_const_key(AS3935, -1), be_const_int(146) },
{ be_const_key(CSE7766_TX, 100), be_const_int(96) },
{ be_const_key(NEOPOOL_TX, 148), be_const_int(218) },
{ be_const_key(ADC_RANGE, 72), be_const_int(152) },
{ be_const_key(ILI9341_DC, -1), be_const_int(200) },
{ be_const_key(DHT11, -1), be_const_int(37) },
{ be_const_key(SM2135_DAT, 238), be_const_int(127) },
{ be_const_key(MCP39F5_RX, 211), be_const_int(87) },
{ be_const_key(HX711_SCK, 7), be_const_int(68) },
{ be_const_key(SAIR_RX, -1), be_const_int(51) },
{ be_const_key(SDS0X1_RX, -1), be_const_int(55) },
{ be_const_key(ARIRFSEL, 266), be_const_int(99) },
{ be_const_key(WEBCAM_RESET, -1), be_const_int(155) },
{ be_const_key(BUZZER_INV, -1), be_const_int(16) },
{ be_const_key(DHT11_OUT, -1), be_const_int(40) },
{ be_const_key(FALLING, -1), be_const_int(2) },
{ be_const_key(MAX7219CS, -1), be_const_int(233) },
{ be_const_key(ARIRFRCV, -1), be_const_int(98) },
{ be_const_key(ADC_CT_POWER, -1), be_const_int(153) },
{ be_const_key(HRXL_RX, -1), be_const_int(144) },
{ be_const_key(WEBCAM_DATA, 58), be_const_int(159) },
{ be_const_key(TUYA_TX, -1), be_const_int(71) },
{ be_const_key(SPI_MOSI, -1), be_const_int(22) },
{ be_const_key(WIEGAND_D0, 33), be_const_int(216) },
{ be_const_key(digital_read, 137), be_const_func(gp_digital_read) },
{ be_const_key(ROT1B, -1), be_const_int(103) },
{ be_const_key(FTC532, -1), be_const_int(195) },
{ be_const_key(HRE_DATA, 35), be_const_int(107) },
{ be_const_key(I2S_IN_DATA, -1), be_const_int(246) },
{ be_const_key(TCP_TX, 26), be_const_int(171) },
{ be_const_key(ST7789_CS, -1), be_const_int(206) },
{ be_const_key(ADC_JOY, -1), be_const_int(104) },
{ be_const_key(OUTPUT, 229), be_const_int(2) },
{ be_const_key(NRF24_DC, -1), be_const_int(198) },
{ be_const_key(IRRECV, 27), be_const_int(34) },
{ be_const_key(MCP39F5_TX, 230), be_const_int(86) },
{ be_const_key(TELEINFO_RX, 52), be_const_int(176) },
{ be_const_key(SSD1351_DC, -1), be_const_int(226) },
{ be_const_key(TM1638DIO, -1), be_const_int(65) },
{ be_const_key(TXD, 139), be_const_int(100) },
{ be_const_key(XPT2046_CS, -1), be_const_int(227) },
{ be_const_key(LED1, 212), be_const_int(9) },
{ be_const_key(LEDLNK_INV, -1), be_const_int(18) },
{ be_const_key(SBR_TX, -1), be_const_int(56) },
{ be_const_key(RA8876_CS, -1), be_const_int(205) },
{ be_const_key(KEY1_TC, 180), be_const_int(169) },
{ be_const_key(INPUT_PULLUP, -1), be_const_int(5) },
{ be_const_key(EPAPER42_CS, -1), be_const_int(203) },
{ be_const_key(BUZZER, -1), be_const_int(15) },
{ be_const_key(WEBCAM_XCLK, -1), be_const_int(156) },
{ be_const_key(ADC_LIGHT, 134), be_const_int(149) },
{ be_const_key(SDM630_TX, 69), be_const_int(62) },
{ be_const_key(MGC3130_XFER, 260), be_const_int(73) },
{ be_const_key(MGC3130_RESET, 219), be_const_int(74) },
{ be_const_key(MAX31855CS, -1), be_const_int(78) },
{ be_const_key(LE01MR_TX, -1), be_const_int(141) },
};
static be_define_const_map(
m_libgpio_map,
258
268
);
static be_define_const_module(

View File

@ -37,12 +37,17 @@ extern "C" {
.type = BE_FUNCTION \
}
#define be_const_nil() { \
.v.i = 0, \
.type = BE_NIL \
}
#define be_const_int(_val) { \
.v.i = (bint)(_val), \
.type = BE_INT \
}
#define be_const_var(_val) { \
#define be_const_index(_val) { \
.v.i = (bint)(_val), \
.type = BE_INDEX \
}
@ -52,6 +57,16 @@ extern "C" {
.type = BE_REAL \
}
#define be_const_real_hex(_val) { \
.v.p = (void*)(_val), \
.type = BE_REAL \
}
#define be_const_bool(_val) { \
.v.b = (bbool)(_val), \
.type = BE_BOOL \
}
#define be_const_str(_str) { \
.v.s = (bstring*)(_str), \
.type = BE_STRING \
@ -88,7 +103,7 @@ const bmap _name = { \
const bclass _name = { \
be_const_header(BE_CLASS), \
.nvar = _nvar, \
.super = (bclass*)_super, \
.super = _super, \
.members = (bmap*)&_name##_map, \
.name = (bstring*)&be_const_str_##_name_ \
}
@ -127,6 +142,39 @@ const bntvmodule be_native_module(_module) = { \
.init = _init \
}
/* defines needed for solidified classes */
#define be_local_class(_name, _nvar, _super, _map, _cname) \
const bclass be_##_name##_class = { \
be_const_header(BE_CLASS), \
.nvar = _nvar, \
.super = (bclass*)_super, \
.members = (bmap*)_map, \
.name = _cname \
}
#define be_nested_map(_size, _slots) \
& (const bmap) { \
be_const_header(BE_MAP), \
.slots = _slots, \
.lastfree = NULL, \
.size = _size, \
.count = _size \
}
#define be_nested_string(_str, _hash, _len) \
{ \
{ .s=(be_nested_const_str(_str, _hash, _len )) \
}, \
BE_STRING \
}
#define be_nested_key(_str, _hash, _len, _next) \
{ \
{ .s=(be_nested_const_str(_str, _hash, _len )) }, \
BE_STRING, \
(uint32_t)(_next) & 0xFFFFFF \
}
#else
#define be_const_key(_str, _next) { \
@ -140,12 +188,22 @@ const bntvmodule be_native_module(_module) = { \
BE_FUNCTION \
}
#define be_const_nil() { \
bvaldata(0), \
BE_NIL \
}
#define be_const_int(_val) { \
bvaldata(bint(_val)), \
BE_INT \
}
#define be_const_var(_val) { \
#define be_const_bool(_val) { \
bvaldata(bbool(_val)), \
BE_BOOL \
}
#define be_const_index(_val) { \
bvaldata(bint(_val)), \
BE_INDEX \
}
@ -155,6 +213,11 @@ const bntvmodule be_native_module(_module) = { \
BE_REAL \
}
#define be_const_real_hex(_val) { \
bvaldata((void*)(_val)), \
BE_REAL \
}
#define be_const_str(_string) { \
bvaldata(bstring(_string)), \
BE_STRING \

View File

@ -1235,7 +1235,24 @@ static void classvar_stmt(bparser *parser, bclass *c)
}
}
static void classstatic_stmt(bparser *parser, bclass *c)
static void class_static_assignment_expr(bparser *parser, bexpdesc *e, bstring *name)
{
if (match_skip(parser, OptAssign)) { /* '=' */
bexpdesc e1, e2;
/* parse the right expression */
expr(parser, &e2);
e1 = *e; /* copy the class description */
bexpdesc key; /* build the member key */
init_exp(&key, ETSTRING, 0);
key.v.s = name;
be_code_member(parser->finfo, &e1, &key); /* compute member accessor */
be_code_setvar(parser->finfo, &e1, &e2); /* set member */
}
}
static void classstatic_stmt(bparser *parser, bclass *c, bexpdesc *e)
{
bstring *name;
/* 'static' ID {',' ID} */
@ -1243,10 +1260,13 @@ static void classstatic_stmt(bparser *parser, bclass *c)
if (match_id(parser, name) != NULL) {
check_class_attr(parser, c, name);
be_member_bind(parser->vm, c, name, bfalse);
class_static_assignment_expr(parser, e, name);
while (match_skip(parser, OptComma)) { /* ',' */
if (match_id(parser, name) != NULL) {
check_class_attr(parser, c, name);
be_member_bind(parser->vm, c, name, bfalse);
class_static_assignment_expr(parser, e, name);
} else {
parser_error(parser, "class static error");
}
@ -1281,13 +1301,13 @@ static void class_inherit(bparser *parser, bexpdesc *e)
}
}
static void class_block(bparser *parser, bclass *c)
static void class_block(bparser *parser, bclass *c, bexpdesc *e)
{
/* { [;] } */
while (block_follow(parser)) {
switch (next_type(parser)) {
case KeyVar: classvar_stmt(parser, c); break;
case KeyStatic: classstatic_stmt(parser, c); break;
case KeyStatic: classstatic_stmt(parser, c, e); break;
case KeyDef: classdef_stmt(parser, c); break;
case OptSemic: scan_next_token(parser); break;
default: push_error(parser,
@ -1307,7 +1327,7 @@ static void class_stmt(bparser *parser)
new_var(parser, name, &e);
be_code_class(parser->finfo, &e, c);
class_inherit(parser, &e);
class_block(parser, c);
class_block(parser, c, &e);
be_class_compress(parser->vm, c); /* compress class size */
match_token(parser, KeyEnd); /* skip 'end' */
} else {

View File

@ -32,17 +32,49 @@
be_writestring(__lbuf); \
} while (0)
/* output only valid types for ktab, or NULL */
static const char * m_type_ktab(int type)
static void m_solidify_bvalue(bvm *vm, bvalue * value)
{
switch (type){
case BE_NIL: return "BE_NIL";
case BE_INT: return "BE_INT";
case BE_INDEX: return "BE_INDEX";
case BE_REAL: return "BE_REAL";
case BE_BOOL: return "BE_BOOL";
case BE_STRING: return "BE_STRING";
default: return NULL;
int type = var_type(value);
switch (type) {
case BE_NIL:
logfmt("be_const_nil()");
break;
case BE_BOOL:
logfmt("be_const_bool(%i)", var_tobool(value));
break;
case BE_INT:
logfmt("be_const_int(%lli)", var_toint(value));
break;
case BE_INDEX:
logfmt("be_const_index(%lli)", var_toint(value));
break;
case BE_REAL:
#if BE_USE_SINGLE_FLOAT
logfmt("be_const_real_hex(0x%08X)", (uint32_t) var_toobj(value));
#else
logfmt("be_const_real_hex(0x%016llX)", (uint64_t) var_toobj(value));
#endif
break;
case BE_STRING:
{
logfmt("be_nested_string(\"");
be_writestring(str(var_tostr(value)));
size_t len = strlen(str(var_tostr(value)));
if (len >= 255) {
be_raise(vm, "internal_error", "Strings greater than 255 chars not supported yet");
}
logfmt("\", %i, %zu)", be_strhash(var_tostr(value)), len >= 255 ? 255 : len);
}
break;
case BE_CLOSURE:
logfmt("be_const_closure(%s_closure)", str(((bclosure*) var_toobj(value))->proto->name));
break;
default:
{
char error[64];
snprintf(error, sizeof(error), "Unsupported type in function constants: %i", type);
be_raise(vm, "internal_error", error);
}
}
}
@ -85,32 +117,9 @@ static void m_solidify_proto(bvm *vm, bproto *pr, const char * func_name, int bu
if (pr->nconst > 0) {
logfmt("%*s( &(const bvalue[%2d]) { /* constants */\n", indent, "", pr->nconst);
for (int k = 0; k < pr->nconst; k++) {
int type = pr->ktab[k].type;
const char *type_name = m_type_ktab(type);
if (type_name == NULL) {
char error[64];
snprintf(error, sizeof(error), "Unsupported type in function constants: %i", type);
be_raise(vm, "internal_error", error);
}
if (type == BE_STRING) {
logfmt("%*s { { .s=be_nested_const_str(\"", indent, "");
be_writestring(str(pr->ktab[k].v.s));
size_t len = strlen(str(pr->ktab[k].v.s));
if (len >= 255) {
be_raise(vm, "internal_error", "Strings greater than 255 chars not supported yet");
}
logfmt("\", %i, %zu) }, %s},\n", be_strhash(pr->ktab[k].v.s), len >= 255 ? 255 : len, type_name);
} else if (type == BE_INT || type == BE_INDEX) {
logfmt("%*s { { .i=%" BE_INT_FMTLEN "i }, %s},\n", indent, "", pr->ktab[k].v.i, type_name);
} else if (type == BE_REAL) {
#if BE_USE_SINGLE_FLOAT
logfmt("%*s { { .p=(void*)0x%08X }, %s},\n", indent, "", (uint32_t) pr->ktab[k].v.p, type_name);
#else
logfmt("%*s { { .p=(void*)0x%016llX }, %s},\n", indent, "", (uint64_t) pr->ktab[k].v.p, type_name);
#endif
} else if (type == BE_BOOL) {
logfmt("%*s { { .b=%i }, %s},\n", indent, "", pr->ktab[k].v.b, type_name);
}
logfmt("%*s ", indent, "");
m_solidify_bvalue(vm, &pr->ktab[k]);
logfmt(",\n");
}
logfmt("%*s}),\n", indent, "");
} else {
@ -167,6 +176,75 @@ static void m_solidify_closure(bvm *vm, bclosure *cl, int builtins)
logfmt("/*******************************************************************/\n\n");
}
static void m_solidify_class(bvm *vm, bclass *cl, int builtins)
{
const char * class_name = str(cl->name);
/* iterate on members to dump closures */
if (cl->members) {
bmapnode *node;
bmapiter iter = be_map_iter();
while ((node = be_map_next(cl->members, &iter)) != NULL) {
if (var_isstr(&node->key) && var_isclosure(&node->value)) {
bclosure *f = var_toobj(&node->value);
m_solidify_closure(vm, f, builtins);
}
}
}
logfmt("\n");
logfmt("/********************************************************************\n");
logfmt("** Solidified class: %s\n", class_name);
logfmt("********************************************************************/\n");
logfmt("be_local_class(%s,\n", class_name);
logfmt(" %i,\n", cl->nvar);
if (cl->super) {
logfmt(" &be_%s_class,\n", str(cl->super->name));
} else {
logfmt(" NULL,\n");
}
if (cl->members) {
logfmt(" be_nested_map(%i,\n", cl->members->count);
logfmt(" ( (struct bmapnode*) &(const bmapnode[]) {\n");
for (int i = 0; i < cl->members->count; i++) {
bmapnode * node = &cl->members->slots[i];
if (node->key.type != BE_STRING) {
char error[64];
snprintf(error, sizeof(error), "Unsupported type in key: %i", node->key.type);
be_raise(vm, "internal_error", error);
}
int key_next = node->key.next;
size_t len = strlen(str(node->key.v.s));
if (0xFFFFFF == key_next) {
key_next = -1; /* more readable */
}
logfmt(" { be_nested_key(\"%s\", %i, %zu, %i), ", str(node->key.v.s), be_strhash(node->key.v.s), len >= 255 ? 255 : len, key_next);
m_solidify_bvalue(vm, &node->value);
logfmt(" },\n");
}
logfmt(" })),\n");
} else {
logfmt(" NULL,\n");
}
logfmt(" (be_nested_const_str(\"%s\", %i, %i))\n", class_name, be_strhash(cl->name), str_len(cl->name));
logfmt(");\n");
logfmt("/*******************************************************************/\n\n");
logfmt("void be_load_%s_class(bvm *vm) {\n", class_name);
logfmt(" be_pushntvclass(vm, &be_%s_class);\n", class_name);
logfmt(" be_setglobal(vm, \"%s\");\n", class_name);
logfmt(" be_pop(vm, 1);\n");
logfmt("}\n");
}
#define be_builtin_count(vm) \
be_vector_count(&(vm)->gbldesc.builtin.vlist)
@ -176,6 +254,8 @@ static int m_dump(bvm *vm)
bvalue *v = be_indexof(vm, 1);
if (var_isclosure(v)) {
m_solidify_closure(vm, var_toobj(v), be_builtin_count(vm));
} else if (var_isclass(v)) {
m_solidify_class(vm, var_toobj(v), be_builtin_count(vm));
}
}
be_return_nil(vm);

View File

@ -128,7 +128,7 @@ hash_map::entry hash_map::entry_modify(entry entry, int *var_count)
{
entry.key = coc::escape_operator(entry.key);
if (entry.value == "var") {
entry.value = "be_const_var("
entry.value = "be_const_index("
+ std::to_string(*var_count) + ")";
++(*var_count);
} else {

View File

@ -67,7 +67,7 @@
"keywords": {
"patterns": [{
"name": "keyword.berry",
"match": "\\b(var|def|class|true|false|nil|self|super|import|as)\\b"
"match": "\\b(var|static|def|class|true|false|nil|self|super|import|as)\\b"
}]
},
"identifier": {

View File

@ -0,0 +1,185 @@
/*
xdrv_52_3_berry_audio.ino - Berry scripting language, support for I2S audio
Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_BERRY
#ifdef USE_I2S_AUDIO_BERRY
// #include "AudioFileSourceSPIFFS.h"
// #include "AudioFileSourceID3.h"
#include "AudioOutputI2S.h"
#include "AudioGeneratorMP3.h"
#include "AudioFileSourceFS.h"
#include <berry.h>
/*********************************************************************************************\
* AudioOutput class
*
\*********************************************************************************************/
extern "C" {
//
// AudioOutputI2S(bclkPin: int, wclkPin: int, doutPin: int[, port:int, dmabuf:int, mode: int])
//
int i2s_output_i2s_init(bvm *vm) {
int argc = be_top(vm);
if (argc > 3) {
int bclkPin = be_toint(vm, 2);
int wclkPin = be_toint(vm, 3);
int doutPin = be_toint(vm, 4);
int port = 0;
if (argc > 4) {
port = be_toint(vm, 5);
}
int dma_buf_count = 8; // number of dma buffers of 64 bytes
if (argc > 5) {
dma_buf_count = be_toint(vm, 6);
}
int mode = 0; // EXTERNAL_I2S
if (argc > 6) {
mode = be_toint(vm, 7);
}
// AudioOutputI2S(int port=0, int output_mode=EXTERNAL_I2S, int dma_buf_count = 8, int use_apll=APLL_DISABLE);
AudioOutputI2S * audio = new AudioOutputI2S(port, mode, dma_buf_count);
audio->SetPinout(bclkPin, wclkPin, doutPin); // return value has no useful information for us
be_pushcomptr(vm, (void*) audio);
be_setmember(vm, 1, ".p");
be_return_nil(vm);
}
be_raise(vm, kTypeError, nullptr);
}
int i2s_output_i2s_deinit(bvm *vm) {
int argc = be_top(vm);
be_getmember(vm, 1, ".p");
AudioOutputI2S * audio = (AudioOutputI2S *) be_tocomptr(vm, -1);
if (audio) {
delete audio;
// clear
be_pushcomptr(vm, (void*) NULL);
be_setmember(vm, 1, ".p");
}
be_return_nil(vm);
}
//
// AudioGeneratorMP3()
//
int i2s_generator_mp3_init(bvm *vm) {
AudioGeneratorMP3 * mp3 = new AudioGeneratorMP3();
be_pushcomptr(vm, (void*) mp3);
be_setmember(vm, 1, ".p");
be_return_nil(vm);
}
AudioGeneratorMP3 * i2s_generator_mp3_get(bvm *vm) {
be_getmember(vm, 1, ".p");
AudioGeneratorMP3 * mp3 = (AudioGeneratorMP3 *) be_tocomptr(vm, -1);
return mp3;
}
int i2s_generator_mp3_deinit(bvm *vm) {
int argc = be_top(vm);
AudioGeneratorMP3 * mp3 = i2s_generator_mp3_get(vm);
if (mp3) {
delete mp3;
// clear
be_pushcomptr(vm, (void*) NULL);
be_setmember(vm, 1, ".p");
}
be_return_nil(vm);
}
int i2s_generator_mp3_begin(bvm *vm) {
int argc = be_top(vm);
if (argc > 2) {
AudioGeneratorMP3 * mp3 = i2s_generator_mp3_get(vm);
be_getmember(vm, 2, ".p");
AudioFileSource * source = (AudioFileSource*) be_tocomptr(vm, -1);
be_getmember(vm, 3, ".p");
AudioOutput * output = (AudioOutput*) be_tocomptr(vm, -1);
be_pop(vm, 2);
bool ret = mp3->begin(source, output);
be_pushbool(vm, ret);
be_return(vm);
}
be_return_nil(vm);
}
int i2s_generator_mp3_loop(bvm *vm) {
AudioGeneratorMP3 * mp3 = i2s_generator_mp3_get(vm);
bool ret = mp3->loop();
be_pushbool(vm, ret);
be_return(vm);
}
int i2s_generator_mp3_stop(bvm *vm) {
AudioGeneratorMP3 * mp3 = i2s_generator_mp3_get(vm);
bool ret = mp3->stop();
be_pushbool(vm, ret);
be_return(vm);
}
int i2s_generator_mp3_isrunning(bvm *vm) {
AudioGeneratorMP3 * mp3 = i2s_generator_mp3_get(vm);
bool ret = mp3->isRunning();
be_pushbool(vm, ret);
be_return(vm);
}
// File Source FS
//
#ifdef USE_UFILESYS
int i2s_file_source_fs_init(bvm *vm) {
int argc = be_top(vm);
if (argc > 1 && be_isstring(vm, 2)) {
const char * file_name = be_tostring(vm, 2);
AudioFileSourceFS * file_source = new AudioFileSourceFS(*ufsp, file_name);
be_pushcomptr(vm, (void*) file_source);
be_setmember(vm, 1, ".p");
be_return_nil(vm);
}
be_raise(vm, kTypeError, nullptr);
}
int i2s_file_source_fs_deinit(bvm *vm) {
int argc = be_top(vm);
be_getmember(vm, 1, ".p");
AudioFileSourceFS * file_source = (AudioFileSourceFS *) be_tocomptr(vm, -1);
if (file_source) {
delete file_source;
// clear
be_pushcomptr(vm, (void*) NULL);
be_setmember(vm, 1, ".p");
}
be_return_nil(vm);
}
#endif // USE_UFILESYS
}
#endif // USE_I2S_AUDIO_BERRY
#endif // USE_BERRY