mirror of https://github.com/arendst/Tasmota.git
Merge pull request #16568 from s-hadinger/berry_auto_solidify_3
Berry more auto-solidification
This commit is contained in:
commit
178c21b600
|
@ -190,6 +190,7 @@ be_extern_native_class(light_state);
|
|||
be_extern_native_class(Wire);
|
||||
be_extern_native_class(I2C_Driver);
|
||||
be_extern_native_class(AXP192);
|
||||
be_extern_native_class(AXP202);
|
||||
be_extern_native_class(OneWire);
|
||||
be_extern_native_class(Leds_ntv);
|
||||
be_extern_native_class(Leds);
|
||||
|
@ -245,6 +246,7 @@ BERRY_LOCAL bclass_array be_class_table = {
|
|||
&be_native_class(Wire),
|
||||
&be_native_class(I2C_Driver),
|
||||
&be_native_class(AXP192),
|
||||
&be_native_class(AXP202),
|
||||
#endif // USE_I2C
|
||||
&be_native_class(md5),
|
||||
#ifdef USE_WEBCLIENT
|
||||
|
|
|
@ -190,7 +190,7 @@ static void m_solidify_bvalue(bvm *vm, bbool str_literal, bvalue * value, const
|
|||
break;
|
||||
case BE_REAL:
|
||||
#if BE_USE_SINGLE_FLOAT
|
||||
logfmt("be_const_real_hex(%08" PRIX32 ")", (uint32_t)(uintptr_t)var_toobj(value));
|
||||
logfmt("be_const_real_hex(0x%08" PRIX32 ")", (uint32_t)(uintptr_t)var_toobj(value));
|
||||
#else
|
||||
logfmt("be_const_real_hex(0x%016" PRIx64 ")", (uint64_t)var_toobj(value));
|
||||
#endif
|
||||
|
@ -537,8 +537,12 @@ static int m_dump(bvm *vm)
|
|||
}
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
const char *classname = NULL; /* allow to specify an explicit prefix */
|
||||
if (top >= 4 && be_isstring(vm, 4)) {
|
||||
classname = be_tostring(vm, 4);
|
||||
}
|
||||
if (var_isclosure(v)) {
|
||||
m_solidify_closure(vm, str_literal, var_toobj(v), NULL, fout);
|
||||
m_solidify_closure(vm, str_literal, var_toobj(v), classname, fout);
|
||||
} else if (var_isclass(v)) {
|
||||
m_solidify_class(vm, str_literal, var_toobj(v), fout);
|
||||
} else if (var_ismodule(v)) {
|
||||
|
|
|
@ -14,10 +14,10 @@ import re
|
|||
# sys.path().push('src/embedded') # allow to import from src/embedded
|
||||
|
||||
# globals that need to exist to make compilation succeed
|
||||
var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state"
|
||||
|
||||
var files = ['tasmota_class.be', 'leds.be', 'animate_module.be', 'autoconf_module.be','driver_class.be',
|
||||
'partition_core.be','i2c_driver.be','hue_bridge.be','persist.be','uuid.be']
|
||||
var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,"
|
||||
"lv_clock,lv_clock_icon,lv_signal_arcs,lv_signal_bars,lv_wifi_arcs_icon,lv_wifi_arcs,"
|
||||
"lv_wifi_bars_icon,lv_wifi_bars,"
|
||||
"_lvgl"
|
||||
|
||||
for g:string.split(globs, ",")
|
||||
global.(g) = nil
|
||||
|
@ -34,7 +34,7 @@ def clean_directory(dir)
|
|||
end
|
||||
end
|
||||
|
||||
var pattern = "#@\\s*solidify:([A-Za-z0-9_,]+)"
|
||||
var pattern = "#@\\s*solidify:([A-Za-z0-9_.,]+)"
|
||||
|
||||
def parse_file(fname)
|
||||
print("Parsing: ", fname)
|
||||
|
@ -60,8 +60,15 @@ def parse_file(fname)
|
|||
var object_list = string.split(directive[1], ',')
|
||||
var object_name = object_list[0]
|
||||
var weak = (object_list.find('weak') != nil) # do we solidify with weak strings?
|
||||
var o = global.(object_name)
|
||||
solidify.dump(o, weak, fout)
|
||||
var o = global
|
||||
var cl_name = nil
|
||||
var obj_name = nil
|
||||
for subname : string.split(object_name, '.')
|
||||
o = o.(subname)
|
||||
cl_name = obj_name
|
||||
obj_name = subname
|
||||
end
|
||||
solidify.dump(o, weak, fout, cl_name)
|
||||
end
|
||||
|
||||
fout.write("/********************************************************************/\n")
|
||||
|
@ -74,9 +81,5 @@ clean_directory(prefix_out)
|
|||
var src_file_list = os.listdir(prefix_dir)
|
||||
for src_file : src_file_list
|
||||
if src_file[0] == '.' continue end
|
||||
end
|
||||
|
||||
# manual
|
||||
for f : files
|
||||
parse_file(f)
|
||||
parse_file(src_file)
|
||||
end
|
||||
|
|
|
@ -10,177 +10,21 @@
|
|||
#ifdef USE_ENERGY_SENSOR
|
||||
|
||||
extern struct ENERGY Energy;
|
||||
/*
|
||||
|
||||
_energy = nil # avoid compilation error
|
||||
energy = module("energy")
|
||||
energy._ptr = nil
|
||||
#include "solidify/solidified_energy.h"
|
||||
#include "be_fixed_energy.h"
|
||||
|
||||
def init(m)
|
||||
import global
|
||||
global._energy = energy_struct(m._ptr)
|
||||
return m
|
||||
end
|
||||
energy.init = init
|
||||
/* @const_object_info_begin
|
||||
|
||||
def read()
|
||||
return _energy.tomap()
|
||||
end
|
||||
energy.read = read
|
||||
module energy (scope: global) {
|
||||
init, closure(energy_init_closure)
|
||||
_ptr, comptr(&Energy)
|
||||
|
||||
def member(k)
|
||||
return _energy.(k)
|
||||
end
|
||||
energy.member = member
|
||||
read, closure(energy_read_closure)
|
||||
member, closure(energy_member_closure)
|
||||
setmember, closure(energy_setmember_closure)
|
||||
}
|
||||
|
||||
def setmember(k, v)
|
||||
_energy.(k) = v
|
||||
end
|
||||
energy.setmember = setmember
|
||||
|
||||
import solidify
|
||||
solidify.dump(energy)
|
||||
*/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(energy_member, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
}),
|
||||
&be_const_str_member,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x88040200, // 0001 GETMBR R1 R1 R0
|
||||
0x80040200, // 0002 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(energy_setmember, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
}),
|
||||
&be_const_str_setmember,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0xB80A0000, // 0000 GETNGBL R2 K0
|
||||
0x90080001, // 0001 SETMBR R2 R0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read
|
||||
********************************************************************/
|
||||
be_local_closure(energy_read, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
/* K1 */ be_nested_str(tomap),
|
||||
}),
|
||||
&be_const_str_read,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0xB8020000, // 0000 GETNGBL R0 K0
|
||||
0x8C000101, // 0001 GETMET R0 R0 K1
|
||||
0x7C000200, // 0002 CALL R0 1
|
||||
0x80040000, // 0003 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(energy_init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(global),
|
||||
/* K1 */ be_nested_str(_energy),
|
||||
/* K2 */ be_nested_str(energy_struct),
|
||||
/* K3 */ be_nested_str(_ptr),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xB80A0400, // 0001 GETNGBL R2 K2
|
||||
0x880C0103, // 0002 GETMBR R3 R0 K3
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x90060202, // 0004 SETMBR R1 K1 R2
|
||||
0x80040000, // 0005 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: energy
|
||||
********************************************************************/
|
||||
be_local_module(energy,
|
||||
"energy",
|
||||
be_nested_map(5,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(energy_init_closure) },
|
||||
{ be_const_key(member, 2), be_const_closure(energy_member_closure) },
|
||||
{ be_const_key(_ptr, 3), be_const_comptr(&Energy) },
|
||||
{ be_const_key(setmember, -1), be_const_closure(energy_setmember_closure) },
|
||||
{ be_const_key(read, -1), be_const_closure(energy_read_closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(energy);
|
||||
/********************************************************************/
|
||||
|
||||
|
||||
// { be_const_key(_ptr, 3), be_const_comptr(&Energy) }, /* patch */
|
||||
@const_object_info_end */
|
||||
|
||||
#endif // USE_ENERGY_SENSOR
|
|
@ -0,0 +1,5 @@
|
|||
/********************************************************************
|
||||
* Tasmota LVGL lv_signal_bars widget
|
||||
*******************************************************************/
|
||||
#include "solidify/solidified_i2c_axp192.h"
|
||||
#include "solidify/solidified_i2c_axp202.h"
|
|
@ -2,380 +2,8 @@
|
|||
* Berry class `Leds_animator`
|
||||
*
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
#ifdef USE_WS2812
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(strip),
|
||||
/* K1 */ be_nested_str(bri),
|
||||
/* K2 */ be_nested_str(running),
|
||||
/* K3 */ be_nested_str(pixel_count),
|
||||
/* K4 */ be_nested_str(animators),
|
||||
/* K5 */ be_nested_str(clear),
|
||||
/* K6 */ be_nested_str(tasmota),
|
||||
/* K7 */ be_nested_str(add_driver),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x540A0031, // 0001 LDINT R2 50
|
||||
0x90020202, // 0002 SETMBR R0 K1 R2
|
||||
0x50080000, // 0003 LDBOOL R2 0 0
|
||||
0x90020402, // 0004 SETMBR R0 K2 R2
|
||||
0x8C080303, // 0005 GETMET R2 R1 K3
|
||||
0x7C080200, // 0006 CALL R2 1
|
||||
0x90020602, // 0007 SETMBR R0 K3 R2
|
||||
0x60080012, // 0008 GETGBL R2 G18
|
||||
0x7C080000, // 0009 CALL R2 0
|
||||
0x90020802, // 000A SETMBR R0 K4 R2
|
||||
0x8C080105, // 000B GETMET R2 R0 K5
|
||||
0x7C080200, // 000C CALL R2 1
|
||||
0xB80A0C00, // 000D GETNGBL R2 K6
|
||||
0x8C080507, // 000E GETMET R2 R2 K7
|
||||
0x5C100000, // 000F MOVE R4 R0
|
||||
0x7C080400, // 0010 CALL R2 2
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_bri
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_set_bri, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(bri),
|
||||
}),
|
||||
&be_const_str_set_bri,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: stop
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_stop, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(running),
|
||||
}),
|
||||
&be_const_str_stop,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x50040000, // 0000 LDBOOL R1 0 0
|
||||
0x90020001, // 0001 SETMBR R0 K0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: animate
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_animate, /* name */
|
||||
be_nested_proto(
|
||||
1, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
&be_const_str_animate,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: remove
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_remove, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(remove_driver),
|
||||
}),
|
||||
&be_const_str_remove,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_50ms
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_every_50ms, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str(running),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(animators),
|
||||
/* K3 */ be_nested_str(is_running),
|
||||
/* K4 */ be_nested_str(animate),
|
||||
/* K5 */ be_const_int(1),
|
||||
/* K6 */ be_nested_str(remove),
|
||||
}),
|
||||
&be_const_str_every_50ms,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060015, // 0001 JMPF R1 #0018
|
||||
0x58040001, // 0002 LDCONST R1 K1
|
||||
0x6008000C, // 0003 GETGBL R2 G12
|
||||
0x880C0102, // 0004 GETMBR R3 R0 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x14080202, // 0006 LT R2 R1 R2
|
||||
0x780A000D, // 0007 JMPF R2 #0016
|
||||
0x88080102, // 0008 GETMBR R2 R0 K2
|
||||
0x94080401, // 0009 GETIDX R2 R2 R1
|
||||
0x8C0C0503, // 000A GETMET R3 R2 K3
|
||||
0x7C0C0200, // 000B CALL R3 1
|
||||
0x780E0003, // 000C JMPF R3 #0011
|
||||
0x8C0C0504, // 000D GETMET R3 R2 K4
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x00040305, // 000F ADD R1 R1 K5
|
||||
0x70020003, // 0010 JMP #0015
|
||||
0x880C0102, // 0011 GETMBR R3 R0 K2
|
||||
0x8C0C0706, // 0012 GETMET R3 R3 K6
|
||||
0x5C140200, // 0013 MOVE R5 R1
|
||||
0x7C0C0400, // 0014 CALL R3 2
|
||||
0x7001FFEC, // 0015 JMP #0003
|
||||
0x8C080104, // 0016 GETMET R2 R0 K4
|
||||
0x7C080200, // 0017 CALL R2 1
|
||||
0x80000000, // 0018 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bri
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_get_bri, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(bri),
|
||||
}),
|
||||
&be_const_str_get_bri,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x80040400, // 0001 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: start
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_start, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(running),
|
||||
}),
|
||||
&be_const_str_start,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x50040200, // 0000 LDBOOL R1 1 0
|
||||
0x90020001, // 0001 SETMBR R0 K0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: add_anim
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_add_anim, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(animators),
|
||||
/* K1 */ be_nested_str(push),
|
||||
/* K2 */ be_nested_str(run),
|
||||
}),
|
||||
&be_const_str_add_anim,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x5C100200, // 0002 MOVE R4 R1
|
||||
0x7C080400, // 0003 CALL R2 2
|
||||
0x8C080302, // 0004 GETMET R2 R1 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_clear, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(stop),
|
||||
/* K1 */ be_nested_str(strip),
|
||||
/* K2 */ be_nested_str(clear),
|
||||
}),
|
||||
&be_const_str_clear,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||
0x8C040302, // 0003 GETMET R1 R1 K2
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Leds_animator
|
||||
********************************************************************/
|
||||
be_local_class(Leds_animator,
|
||||
5,
|
||||
NULL,
|
||||
be_nested_map(15,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, 12), be_const_closure(Leds_animator_init_closure) },
|
||||
{ be_const_key(clear, -1), be_const_closure(Leds_animator_clear_closure) },
|
||||
{ be_const_key(stop, -1), be_const_closure(Leds_animator_stop_closure) },
|
||||
{ be_const_key(strip, 4), be_const_var(0) },
|
||||
{ be_const_key(pixel_count, 6), be_const_var(1) },
|
||||
{ be_const_key(animate, -1), be_const_closure(Leds_animator_animate_closure) },
|
||||
{ be_const_key(add_anim, 13), be_const_closure(Leds_animator_add_anim_closure) },
|
||||
{ be_const_key(bri, -1), be_const_var(2) },
|
||||
{ be_const_key(every_50ms, -1), be_const_closure(Leds_animator_every_50ms_closure) },
|
||||
{ be_const_key(remove, 7), be_const_closure(Leds_animator_remove_closure) },
|
||||
{ be_const_key(get_bri, -1), be_const_closure(Leds_animator_get_bri_closure) },
|
||||
{ be_const_key(start, -1), be_const_closure(Leds_animator_start_closure) },
|
||||
{ be_const_key(running, -1), be_const_var(3) },
|
||||
{ be_const_key(animators, -1), be_const_var(4) },
|
||||
{ be_const_key(set_bri, 1), be_const_closure(Leds_animator_set_bri_closure) },
|
||||
})),
|
||||
be_str_weak(Leds_animator)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Leds_animator_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Leds_animator);
|
||||
be_setglobal(vm, "Leds_animator");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
#include "solidify/solidified_leds_animator.h"
|
||||
|
||||
#endif // USE_WS2812
|
||||
|
|
|
@ -39,577 +39,4 @@ module mqtt (scope: global) {
|
|||
@const_object_info_end */
|
||||
|
||||
// private class MQTT
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_data
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_data, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_nested_str(closure),
|
||||
/* K2 */ be_nested_str(mqtt_data),
|
||||
/* K3 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_mqtt_data,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[32]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x4C180000, // 0001 LDNIL R6
|
||||
0x1C140A06, // 0002 EQ R5 R5 R6
|
||||
0x78160000, // 0003 JMPF R5 #0005
|
||||
0x80000A00, // 0004 RET 0
|
||||
0x50140000, // 0005 LDBOOL R5 0 0
|
||||
0x60180010, // 0006 GETGBL R6 G16
|
||||
0x881C0100, // 0007 GETMBR R7 R0 K0
|
||||
0x7C180200, // 0008 CALL R6 1
|
||||
0xA8020011, // 0009 EXBLK 0 #001C
|
||||
0x5C1C0C00, // 000A MOVE R7 R6
|
||||
0x7C1C0000, // 000B CALL R7 0
|
||||
0x88200F01, // 000C GETMBR R8 R7 K1
|
||||
0x4C240000, // 000D LDNIL R9
|
||||
0x20201009, // 000E NE R8 R8 R9
|
||||
0x7822000A, // 000F JMPF R8 #001B
|
||||
0x8C200F02, // 0010 GETMET R8 R7 K2
|
||||
0x5C280200, // 0011 MOVE R10 R1
|
||||
0x5C2C0400, // 0012 MOVE R11 R2
|
||||
0x5C300600, // 0013 MOVE R12 R3
|
||||
0x5C340800, // 0014 MOVE R13 R4
|
||||
0x7C200A00, // 0015 CALL R8 5
|
||||
0x74160001, // 0016 JMPT R5 #0019
|
||||
0x74220000, // 0017 JMPT R8 #0019
|
||||
0x50200001, // 0018 LDBOOL R8 0 1
|
||||
0x50200200, // 0019 LDBOOL R8 1 0
|
||||
0x5C141000, // 001A MOVE R5 R8
|
||||
0x7001FFED, // 001B JMP #000A
|
||||
0x58180003, // 001C LDCONST R6 K3
|
||||
0xAC180200, // 001D CATCH R6 1 0
|
||||
0xB0080000, // 001E RAISE 2 R0 R0
|
||||
0x80040A00, // 001F RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: lazy_init
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_lazy_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 1]) {
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
1, /* has upvals */
|
||||
( &(const bupvaldesc[ 1]) { /* upvals */
|
||||
be_local_const_upval(1, 0),
|
||||
}),
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(mqtt_connect),
|
||||
}),
|
||||
&be_const_str__X3Clambda_X3E,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x68000000, // 0000 GETUPV R0 U0
|
||||
0x8C000100, // 0001 GETMET R0 R0 K0
|
||||
0x7C000200, // 0002 CALL R0 1
|
||||
0x80040000, // 0003 RET 1 R0
|
||||
})
|
||||
),
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_nested_str(tasmota),
|
||||
/* K2 */ be_nested_str(add_driver),
|
||||
/* K3 */ be_nested_str(add_rule),
|
||||
/* K4 */ be_nested_str(Mqtt_X23Connected),
|
||||
}),
|
||||
&be_const_str_lazy_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x4C080000, // 0001 LDNIL R2
|
||||
0x1C040202, // 0002 EQ R1 R1 R2
|
||||
0x7806000B, // 0003 JMPF R1 #0010
|
||||
0x60040012, // 0004 GETGBL R1 G18
|
||||
0x7C040000, // 0005 CALL R1 0
|
||||
0x90020001, // 0006 SETMBR R0 K0 R1
|
||||
0xB8060200, // 0007 GETNGBL R1 K1
|
||||
0x8C040302, // 0008 GETMET R1 R1 K2
|
||||
0x5C0C0000, // 0009 MOVE R3 R0
|
||||
0x7C040400, // 000A CALL R1 2
|
||||
0xB8060200, // 000B GETNGBL R1 K1
|
||||
0x8C040303, // 000C GETMET R1 R1 K3
|
||||
0x580C0004, // 000D LDCONST R3 K4
|
||||
0x84100000, // 000E CLOSURE R4 P0
|
||||
0x7C040600, // 000F CALL R1 3
|
||||
0xA0000000, // 0010 CLOSE R0
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: unsubscribe
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_unsubscribe, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(fulltopic),
|
||||
/* K3 */ be_nested_str(_unsubscribe),
|
||||
/* K4 */ be_nested_str(remove),
|
||||
/* K5 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_unsubscribe,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[41]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x4C0C0000, // 0001 LDNIL R3
|
||||
0x1C080403, // 0002 EQ R2 R2 R3
|
||||
0x780A0000, // 0003 JMPF R2 #0005
|
||||
0x80000400, // 0004 RET 0
|
||||
0x58080001, // 0005 LDCONST R2 K1
|
||||
0x600C000C, // 0006 GETGBL R3 G12
|
||||
0x88100100, // 0007 GETMBR R4 R0 K0
|
||||
0x7C0C0200, // 0008 CALL R3 1
|
||||
0x140C0403, // 0009 LT R3 R2 R3
|
||||
0x780E0016, // 000A JMPF R3 #0022
|
||||
0x4C0C0000, // 000B LDNIL R3
|
||||
0x1C0C0203, // 000C EQ R3 R1 R3
|
||||
0x740E0004, // 000D JMPT R3 #0013
|
||||
0x880C0100, // 000E GETMBR R3 R0 K0
|
||||
0x940C0602, // 000F GETIDX R3 R3 R2
|
||||
0x880C0702, // 0010 GETMBR R3 R3 K2
|
||||
0x1C0C0601, // 0011 EQ R3 R3 R1
|
||||
0x780E000C, // 0012 JMPF R3 #0020
|
||||
0x4C0C0000, // 0013 LDNIL R3
|
||||
0x1C0C0203, // 0014 EQ R3 R1 R3
|
||||
0x780E0004, // 0015 JMPF R3 #001B
|
||||
0x8C0C0103, // 0016 GETMET R3 R0 K3
|
||||
0x88140100, // 0017 GETMBR R5 R0 K0
|
||||
0x94140A02, // 0018 GETIDX R5 R5 R2
|
||||
0x88140B02, // 0019 GETMBR R5 R5 K2
|
||||
0x7C0C0400, // 001A CALL R3 2
|
||||
0x880C0100, // 001B GETMBR R3 R0 K0
|
||||
0x8C0C0704, // 001C GETMET R3 R3 K4
|
||||
0x5C140400, // 001D MOVE R5 R2
|
||||
0x7C0C0400, // 001E CALL R3 2
|
||||
0x70020000, // 001F JMP #0021
|
||||
0x00080505, // 0020 ADD R2 R2 K5
|
||||
0x7001FFE3, // 0021 JMP #0006
|
||||
0x4C0C0000, // 0022 LDNIL R3
|
||||
0x200C0203, // 0023 NE R3 R1 R3
|
||||
0x780E0002, // 0024 JMPF R3 #0028
|
||||
0x8C0C0103, // 0025 GETMET R3 R0 K3
|
||||
0x5C140200, // 0026 MOVE R5 R1
|
||||
0x7C0C0400, // 0027 CALL R3 2
|
||||
0x80000000, // 0028 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_connect
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_connect, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(log),
|
||||
/* K2 */ be_nested_str(BRY_X3A_X20mqtt_X20subscribe_X20all_X20registered_X20topics),
|
||||
/* K3 */ be_const_int(3),
|
||||
/* K4 */ be_nested_str(topics),
|
||||
/* K5 */ be_nested_str(fulltopic),
|
||||
/* K6 */ be_nested_str(_subscribe),
|
||||
/* K7 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_mqtt_connect,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x580C0002, // 0002 LDCONST R3 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x7C040600, // 0004 CALL R1 3
|
||||
0x60040010, // 0005 GETGBL R1 G16
|
||||
0x88080104, // 0006 GETMBR R2 R0 K4
|
||||
0x7C040200, // 0007 CALL R1 1
|
||||
0xA8020006, // 0008 EXBLK 0 #0010
|
||||
0x5C080200, // 0009 MOVE R2 R1
|
||||
0x7C080000, // 000A CALL R2 0
|
||||
0x880C0505, // 000B GETMBR R3 R2 K5
|
||||
0x8C100106, // 000C GETMET R4 R0 K6
|
||||
0x5C180600, // 000D MOVE R6 R3
|
||||
0x7C100400, // 000E CALL R4 2
|
||||
0x7001FFF8, // 000F JMP #0009
|
||||
0x58040007, // 0010 LDCONST R1 K7
|
||||
0xAC040200, // 0011 CATCH R1 1 0
|
||||
0xB0080000, // 0012 RAISE 2 R0 R0
|
||||
0x50040000, // 0013 LDBOOL R1 0 0
|
||||
0x80040200, // 0014 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_tostring, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X27_X25s_X27_X29_X3E),
|
||||
/* K3 */ be_nested_str(fulltopic),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140005, // 0003 GETGBL R5 G5
|
||||
0x5C180000, // 0004 MOVE R6 R0
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x88180103, // 0006 GETMBR R6 R0 K3
|
||||
0x7C080800, // 0007 CALL R2 4
|
||||
0x80040400, // 0008 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_init, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(fulltopic),
|
||||
/* K2 */ be_nested_str(topic),
|
||||
/* K3 */ be_nested_str(split),
|
||||
/* K4 */ be_nested_str(_X2F),
|
||||
/* K5 */ be_nested_str(closure),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0x90020201, // 0001 SETMBR R0 K1 R1
|
||||
0x8C100703, // 0002 GETMET R4 R3 K3
|
||||
0x5C180200, // 0003 MOVE R6 R1
|
||||
0x581C0004, // 0004 LDCONST R7 K4
|
||||
0x7C100600, // 0005 CALL R4 3
|
||||
0x90020404, // 0006 SETMBR R0 K2 R4
|
||||
0x90020A02, // 0007 SETMBR R0 K5 R2
|
||||
0x80000000, // 0008 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_data
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_mqtt_data, /* name */
|
||||
be_nested_proto(
|
||||
17, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 9]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(split),
|
||||
/* K2 */ be_nested_str(_X2F),
|
||||
/* K3 */ be_nested_str(topic),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str(_X23),
|
||||
/* K6 */ be_nested_str(_X2B),
|
||||
/* K7 */ be_const_int(1),
|
||||
/* K8 */ be_nested_str(closure),
|
||||
}),
|
||||
&be_const_str_mqtt_data,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[53]) { /* code */
|
||||
0xA4160000, // 0000 IMPORT R5 K0
|
||||
0x8C180B01, // 0001 GETMET R6 R5 K1
|
||||
0x5C200200, // 0002 MOVE R8 R1
|
||||
0x58240002, // 0003 LDCONST R9 K2
|
||||
0x7C180600, // 0004 CALL R6 3
|
||||
0x601C000C, // 0005 GETGBL R7 G12
|
||||
0x5C200C00, // 0006 MOVE R8 R6
|
||||
0x7C1C0200, // 0007 CALL R7 1
|
||||
0x88200103, // 0008 GETMBR R8 R0 K3
|
||||
0x6024000C, // 0009 GETGBL R9 G12
|
||||
0x5C281000, // 000A MOVE R10 R8
|
||||
0x7C240200, // 000B CALL R9 1
|
||||
0x58280004, // 000C LDCONST R10 K4
|
||||
0x142C1409, // 000D LT R11 R10 R9
|
||||
0x782E0013, // 000E JMPF R11 #0023
|
||||
0x942C100A, // 000F GETIDX R11 R8 R10
|
||||
0x1C301705, // 0010 EQ R12 R11 K5
|
||||
0x78320001, // 0011 JMPF R12 #0014
|
||||
0x7002000F, // 0012 JMP #0023
|
||||
0x7002000C, // 0013 JMP #0021
|
||||
0x28301407, // 0014 GE R12 R10 R7
|
||||
0x78320002, // 0015 JMPF R12 #0019
|
||||
0x50300000, // 0016 LDBOOL R12 0 0
|
||||
0x80041800, // 0017 RET 1 R12
|
||||
0x70020007, // 0018 JMP #0021
|
||||
0x1C301706, // 0019 EQ R12 R11 K6
|
||||
0x78320000, // 001A JMPF R12 #001C
|
||||
0x70020004, // 001B JMP #0021
|
||||
0x94300C0A, // 001C GETIDX R12 R6 R10
|
||||
0x2030160C, // 001D NE R12 R11 R12
|
||||
0x78320001, // 001E JMPF R12 #0021
|
||||
0x50300000, // 001F LDBOOL R12 0 0
|
||||
0x80041800, // 0020 RET 1 R12
|
||||
0x00281507, // 0021 ADD R10 R10 K7
|
||||
0x7001FFE9, // 0022 JMP #000D
|
||||
0x282C1409, // 0023 GE R11 R10 R9
|
||||
0x782E0003, // 0024 JMPF R11 #0029
|
||||
0x202C1207, // 0025 NE R11 R9 R7
|
||||
0x782E0001, // 0026 JMPF R11 #0029
|
||||
0x502C0000, // 0027 LDBOOL R11 0 0
|
||||
0x80041600, // 0028 RET 1 R11
|
||||
0x882C0108, // 0029 GETMBR R11 R0 K8
|
||||
0x5C301600, // 002A MOVE R12 R11
|
||||
0x5C340200, // 002B MOVE R13 R1
|
||||
0x5C380400, // 002C MOVE R14 R2
|
||||
0x5C3C0600, // 002D MOVE R15 R3
|
||||
0x5C400800, // 002E MOVE R16 R4
|
||||
0x7C300800, // 002F CALL R12 4
|
||||
0x4C340000, // 0030 LDNIL R13
|
||||
0x1C34180D, // 0031 EQ R13 R12 R13
|
||||
0x78360000, // 0032 JMPF R13 #0034
|
||||
0x50300200, // 0033 LDBOOL R12 1 0
|
||||
0x80041800, // 0034 RET 1 R12
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: mqtt_listener
|
||||
********************************************************************/
|
||||
be_local_class(mqtt_listener,
|
||||
3,
|
||||
NULL,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(mqtt_data, -1), be_const_closure(mqtt_listener_mqtt_data_closure) },
|
||||
{ be_const_key(tostring, -1), be_const_closure(mqtt_listener_tostring_closure) },
|
||||
{ be_const_key(topic, -1), be_const_var(0) },
|
||||
{ be_const_key(init, -1), be_const_closure(mqtt_listener_init_closure) },
|
||||
{ be_const_key(closure, 0), be_const_var(2) },
|
||||
{ be_const_key(fulltopic, -1), be_const_var(1) },
|
||||
})),
|
||||
(bstring*) &be_const_str_mqtt_listener
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_listener_class
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_listener_class, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_const_class(be_class_mqtt_listener),
|
||||
}),
|
||||
&be_const_str_mqtt_listener_class,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x58040000, // 0000 LDCONST R1 K0
|
||||
0xB4000000, // 0001 CLASS K0
|
||||
0x80040200, // 0002 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: subscribe
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_subscribe, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str(lazy_init),
|
||||
/* K1 */ be_nested_str(topics),
|
||||
/* K2 */ be_nested_str(fulltopic),
|
||||
/* K3 */ be_nested_str(closure),
|
||||
/* K4 */ be_nested_str(stop_iteration),
|
||||
/* K5 */ be_nested_str(mqtt_listener_class),
|
||||
/* K6 */ be_nested_str(function),
|
||||
/* K7 */ be_nested_str(tasmota),
|
||||
/* K8 */ be_nested_str(check_not_method),
|
||||
/* K9 */ be_nested_str(push),
|
||||
/* K10 */ be_nested_str(_subscribe),
|
||||
}),
|
||||
&be_const_str_subscribe,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[50]) { /* code */
|
||||
0x8C0C0100, // 0000 GETMET R3 R0 K0
|
||||
0x7C0C0200, // 0001 CALL R3 1
|
||||
0x500C0000, // 0002 LDBOOL R3 0 0
|
||||
0x60100010, // 0003 GETGBL R4 G16
|
||||
0x88140101, // 0004 GETMBR R5 R0 K1
|
||||
0x7C100200, // 0005 CALL R4 1
|
||||
0xA802000A, // 0006 EXBLK 0 #0012
|
||||
0x5C140800, // 0007 MOVE R5 R4
|
||||
0x7C140000, // 0008 CALL R5 0
|
||||
0x88180B02, // 0009 GETMBR R6 R5 K2
|
||||
0x1C180C01, // 000A EQ R6 R6 R1
|
||||
0x781A0004, // 000B JMPF R6 #0011
|
||||
0x88180B03, // 000C GETMBR R6 R5 K3
|
||||
0x1C180C02, // 000D EQ R6 R6 R2
|
||||
0x781A0001, // 000E JMPF R6 #0011
|
||||
0xA8040001, // 000F EXBLK 1 1
|
||||
0x80000C00, // 0010 RET 0
|
||||
0x7001FFF4, // 0011 JMP #0007
|
||||
0x58100004, // 0012 LDCONST R4 K4
|
||||
0xAC100200, // 0013 CATCH R4 1 0
|
||||
0xB0080000, // 0014 RAISE 2 R0 R0
|
||||
0x8C100105, // 0015 GETMET R4 R0 K5
|
||||
0x7C100200, // 0016 CALL R4 1
|
||||
0x60140004, // 0017 GETGBL R5 G4
|
||||
0x5C180400, // 0018 MOVE R6 R2
|
||||
0x7C140200, // 0019 CALL R5 1
|
||||
0x1C140B06, // 001A EQ R5 R5 K6
|
||||
0x7816000B, // 001B JMPF R5 #0028
|
||||
0xB8160E00, // 001C GETNGBL R5 K7
|
||||
0x8C140B08, // 001D GETMET R5 R5 K8
|
||||
0x5C1C0400, // 001E MOVE R7 R2
|
||||
0x7C140400, // 001F CALL R5 2
|
||||
0x88140101, // 0020 GETMBR R5 R0 K1
|
||||
0x8C140B09, // 0021 GETMET R5 R5 K9
|
||||
0x5C1C0800, // 0022 MOVE R7 R4
|
||||
0x5C200200, // 0023 MOVE R8 R1
|
||||
0x5C240400, // 0024 MOVE R9 R2
|
||||
0x7C1C0400, // 0025 CALL R7 2
|
||||
0x7C140400, // 0026 CALL R5 2
|
||||
0x70020005, // 0027 JMP #002E
|
||||
0x88140101, // 0028 GETMBR R5 R0 K1
|
||||
0x8C140B09, // 0029 GETMET R5 R5 K9
|
||||
0x5C1C0800, // 002A MOVE R7 R4
|
||||
0x5C200200, // 002B MOVE R8 R1
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x7C140400, // 002D CALL R5 2
|
||||
0x8C14010A, // 002E GETMET R5 R0 K10
|
||||
0x5C1C0200, // 002F MOVE R7 R1
|
||||
0x7C140400, // 0030 CALL R5 2
|
||||
0x80000000, // 0031 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: MQTT
|
||||
********************************************************************/
|
||||
extern const bclass be_class_MQTT_ntv;
|
||||
be_local_class(MQTT,
|
||||
1,
|
||||
&be_class_MQTT_ntv,
|
||||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(mqtt_connect, -1), be_const_closure(MQTT_mqtt_connect_closure) },
|
||||
{ be_const_key(mqtt_data, -1), be_const_closure(MQTT_mqtt_data_closure) },
|
||||
{ be_const_key(lazy_init, -1), be_const_closure(MQTT_lazy_init_closure) },
|
||||
{ be_const_key(unsubscribe, -1), be_const_closure(MQTT_unsubscribe_closure) },
|
||||
{ be_const_key(topics, 0), be_const_var(0) },
|
||||
{ be_const_key(mqtt_listener_class, -1), be_const_closure(MQTT_mqtt_listener_class_closure) },
|
||||
{ be_const_key(subscribe, -1), be_const_closure(MQTT_subscribe_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_MQTT
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_MQTT_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_MQTT);
|
||||
be_setglobal(vm, "MQTT");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
#include "solidify/solidified_mqtt.h"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,56 +3,4 @@
|
|||
*
|
||||
* `import python_compat`
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _anonymous_
|
||||
********************************************************************/
|
||||
be_local_closure(python_compat__anonymous_, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(global),
|
||||
/* K1 */ be_nested_str(True),
|
||||
/* K2 */ be_nested_str(False),
|
||||
/* K3 */ be_nested_str(None),
|
||||
/* K4 */ be_nested_str(b),
|
||||
}),
|
||||
&be_const_str__anonymous_,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x50080200, // 0001 LDBOOL R2 1 0
|
||||
0x90060202, // 0002 SETMBR R1 K1 R2
|
||||
0x50080000, // 0003 LDBOOL R2 0 0
|
||||
0x90060402, // 0004 SETMBR R1 K2 R2
|
||||
0x4C080000, // 0005 LDNIL R2
|
||||
0x90060602, // 0006 SETMBR R1 K3 R2
|
||||
0x60080015, // 0007 GETGBL R2 G21
|
||||
0x90060802, // 0008 SETMBR R1 K4 R2
|
||||
0x80040000, // 0009 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: python_compat
|
||||
********************************************************************/
|
||||
be_local_module(python_compat,
|
||||
"python_compat",
|
||||
be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(python_compat__anonymous__closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(python_compat);
|
||||
/********************************************************************/
|
||||
#include "solidify/solidified_python_compat.h"
|
||||
|
|
|
@ -4,165 +4,4 @@
|
|||
* To use: `import tapp`
|
||||
*
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Tapp_init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(add_driver),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: autoexec
|
||||
********************************************************************/
|
||||
be_local_closure(Tapp_autoexec, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str(path),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(listdir),
|
||||
/* K3 */ be_nested_str(_X2F),
|
||||
/* K4 */ be_nested_str(find),
|
||||
/* K5 */ be_nested_str(_X2Etapp),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str(tasmota),
|
||||
/* K8 */ be_nested_str(log),
|
||||
/* K9 */ be_nested_str(format),
|
||||
/* K10 */ be_nested_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str(load),
|
||||
/* K13 */ be_nested_str(_X23autoexec_X2Ebe),
|
||||
/* K14 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_autoexec,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[34]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
||||
0x58140003, // 0003 LDCONST R5 K3
|
||||
0x7C0C0400, // 0004 CALL R3 2
|
||||
0x60100010, // 0005 GETGBL R4 G16
|
||||
0x5C140600, // 0006 MOVE R5 R3
|
||||
0x7C100200, // 0007 CALL R4 1
|
||||
0xA8020014, // 0008 EXBLK 0 #001E
|
||||
0x5C140800, // 0009 MOVE R5 R4
|
||||
0x7C140000, // 000A CALL R5 0
|
||||
0x8C180504, // 000B GETMET R6 R2 K4
|
||||
0x5C200A00, // 000C MOVE R8 R5
|
||||
0x58240005, // 000D LDCONST R9 K5
|
||||
0x7C180600, // 000E CALL R6 3
|
||||
0x24180D06, // 000F GT R6 R6 K6
|
||||
0x781A000B, // 0010 JMPF R6 #001D
|
||||
0xB81A0E00, // 0011 GETNGBL R6 K7
|
||||
0x8C180D08, // 0012 GETMET R6 R6 K8
|
||||
0x8C200509, // 0013 GETMET R8 R2 K9
|
||||
0x5828000A, // 0014 LDCONST R10 K10
|
||||
0x5C2C0A00, // 0015 MOVE R11 R5
|
||||
0x7C200600, // 0016 CALL R8 3
|
||||
0x5824000B, // 0017 LDCONST R9 K11
|
||||
0x7C180600, // 0018 CALL R6 3
|
||||
0xB81A0E00, // 0019 GETNGBL R6 K7
|
||||
0x8C180D0C, // 001A GETMET R6 R6 K12
|
||||
0x00200B0D, // 001B ADD R8 R5 K13
|
||||
0x7C180400, // 001C CALL R6 2
|
||||
0x7001FFEA, // 001D JMP #0009
|
||||
0x5810000E, // 001E LDCONST R4 K14
|
||||
0xAC100200, // 001F CATCH R4 1 0
|
||||
0xB0080000, // 0020 RAISE 2 R0 R0
|
||||
0x80000000, // 0021 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Tapp
|
||||
********************************************************************/
|
||||
be_local_class(Tapp,
|
||||
0,
|
||||
NULL,
|
||||
be_nested_map(2,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(autoexec, -1), be_const_closure(Tapp_autoexec_closure) },
|
||||
{ be_const_key(init, 0), be_const_closure(Tapp_init_closure) },
|
||||
})),
|
||||
be_str_weak(Tapp)
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _anonymous_
|
||||
********************************************************************/
|
||||
be_local_closure(tapp__anonymous_, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_const_class(be_class_Tapp),
|
||||
}),
|
||||
&be_const_str__anonymous_,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x58040000, // 0000 LDCONST R1 K0
|
||||
0xB4000000, // 0001 CLASS K0
|
||||
0x5C080200, // 0002 MOVE R2 R1
|
||||
0x7C080000, // 0003 CALL R2 0
|
||||
0x80040400, // 0004 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: tapp
|
||||
********************************************************************/
|
||||
be_local_module(tapp,
|
||||
"tapp",
|
||||
be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(tapp__anonymous__closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(tapp);
|
||||
/********************************************************************/
|
||||
#include "solidify/solidified_tapp.h"
|
||||
|
|
|
@ -1,188 +1,6 @@
|
|||
/********************************************************************
|
||||
* Tasmota lib
|
||||
* Trigger class
|
||||
*
|
||||
* class Trigger
|
||||
*******************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(trig),
|
||||
/* K1 */ be_nested_str(f),
|
||||
/* K2 */ be_nested_str(id),
|
||||
/* K3 */ be_nested_str(o),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||
0x90020604, // 0003 SETMBR R0 K3 R4
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
|
||||
/* K3 */ be_nested_str(trig),
|
||||
/* K4 */ be_nested_str(f),
|
||||
/* K5 */ be_nested_str(id),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140008, // 0003 GETGBL R5 G8
|
||||
0x60180006, // 0004 GETGBL R6 G6
|
||||
0x5C1C0000, // 0005 MOVE R7 R0
|
||||
0x7C180200, // 0006 CALL R6 1
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x60180008, // 0008 GETGBL R6 G8
|
||||
0x881C0103, // 0009 GETMBR R7 R0 K3
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x601C0008, // 000B GETGBL R7 G8
|
||||
0x88200104, // 000C GETMBR R8 R0 K4
|
||||
0x7C1C0200, // 000D CALL R7 1
|
||||
0x60200008, // 000E GETGBL R8 G8
|
||||
0x88240105, // 000F GETMBR R9 R0 K5
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x7C080C00, // 0011 CALL R2 6
|
||||
0x80040400, // 0012 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: time_reached
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_time_reached, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(trig),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(time_reached),
|
||||
}),
|
||||
&be_const_str_time_reached,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060007, // 0001 JMPF R1 #000A
|
||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||
0x24040302, // 0003 GT R1 R1 K2
|
||||
0x78060004, // 0004 JMPF R1 #000A
|
||||
0x88040100, // 0005 GETMBR R1 R0 K0
|
||||
0x8C040303, // 0006 GETMET R1 R1 K3
|
||||
0x880C0101, // 0007 GETMBR R3 R0 K1
|
||||
0x7C040400, // 0008 CALL R1 2
|
||||
0x80040200, // 0009 RET 1 R1
|
||||
0x50040000, // 000A LDBOOL R1 0 0
|
||||
0x80040200, // 000B RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: next
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_next, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(next),
|
||||
}),
|
||||
&be_const_str_next,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060003, // 0001 JMPF R1 #0006
|
||||
0x88040100, // 0002 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0003 GETMET R1 R1 K1
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80040200, // 0005 RET 1 R1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Trigger
|
||||
********************************************************************/
|
||||
be_local_class(Trigger,
|
||||
4,
|
||||
NULL,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(id, 2), be_const_var(2) },
|
||||
{ be_const_key(f, -1), be_const_var(1) },
|
||||
{ be_const_key(next, -1), be_const_closure(Trigger_next_closure) },
|
||||
{ be_const_key(trig, 7), be_const_var(0) },
|
||||
{ be_const_key(time_reached, -1), be_const_closure(Trigger_time_reached_closure) },
|
||||
{ be_const_key(tostring, 4), be_const_closure(Trigger_tostring_closure) },
|
||||
{ be_const_key(o, -1), be_const_var(3) },
|
||||
{ be_const_key(init, -1), be_const_closure(Trigger_init_closure) },
|
||||
})),
|
||||
be_str_weak(Trigger)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Trigger_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Trigger);
|
||||
be_setglobal(vm, "Trigger");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
#include "solidify/solidified_trigger_class.h"
|
||||
|
|
|
@ -25,99 +25,7 @@ extern int b_wire_validread(bvm *vm);
|
|||
extern int b_wire_detect(bvm *vm);
|
||||
extern int b_wire_enabled(bvm *vm);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: write_bytes
|
||||
********************************************************************/
|
||||
be_local_closure(write_bytes, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
4, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(_begin_transmission),
|
||||
/* K1 */ be_nested_str(_write),
|
||||
/* K2 */ be_nested_str(_end_transmission),
|
||||
}),
|
||||
&be_const_str_write_bytes,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x8C100100, // 0000 GETMET R4 R0 K0
|
||||
0x5C180200, // 0001 MOVE R6 R1
|
||||
0x7C100400, // 0002 CALL R4 2
|
||||
0x8C100101, // 0003 GETMET R4 R0 K1
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C100400, // 0005 CALL R4 2
|
||||
0x8C100101, // 0006 GETMET R4 R0 K1
|
||||
0x5C180600, // 0007 MOVE R6 R3
|
||||
0x7C100400, // 0008 CALL R4 2
|
||||
0x8C100102, // 0009 GETMET R4 R0 K2
|
||||
0x7C100200, // 000A CALL R4 1
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_bytes
|
||||
********************************************************************/
|
||||
be_local_closure(read_bytes, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
4, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(_begin_transmission),
|
||||
/* K1 */ be_nested_str(_write),
|
||||
/* K2 */ be_nested_str(_end_transmission),
|
||||
/* K3 */ be_nested_str(_request_from),
|
||||
/* K4 */ be_nested_str(_available),
|
||||
/* K5 */ be_nested_str(_read),
|
||||
}),
|
||||
&be_const_str_read_bytes,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[24]) { /* code */
|
||||
0x8C100100, // 0000 GETMET R4 R0 K0
|
||||
0x5C180200, // 0001 MOVE R6 R1
|
||||
0x7C100400, // 0002 CALL R4 2
|
||||
0x8C100101, // 0003 GETMET R4 R0 K1
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C100400, // 0005 CALL R4 2
|
||||
0x8C100102, // 0006 GETMET R4 R0 K2
|
||||
0x50180000, // 0007 LDBOOL R6 0 0
|
||||
0x7C100400, // 0008 CALL R4 2
|
||||
0x8C100103, // 0009 GETMET R4 R0 K3
|
||||
0x5C180200, // 000A MOVE R6 R1
|
||||
0x5C1C0600, // 000B MOVE R7 R3
|
||||
0x7C100600, // 000C CALL R4 3
|
||||
0x60100015, // 000D GETGBL R4 G21
|
||||
0x5C140600, // 000E MOVE R5 R3
|
||||
0x7C100200, // 000F CALL R4 1
|
||||
0x8C140104, // 0010 GETMET R5 R0 K4
|
||||
0x7C140200, // 0011 CALL R5 1
|
||||
0x78160003, // 0012 JMPF R5 #0017
|
||||
0x8C140105, // 0013 GETMET R5 R0 K5
|
||||
0x7C140200, // 0014 CALL R5 1
|
||||
0x40140805, // 0015 CONNECT R5 R4 R5
|
||||
0x7001FFF8, // 0016 JMP #0010
|
||||
0x80040800, // 0017 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
#include "solidify/solidified_Wire.h"
|
||||
#include "be_fixed_be_class_Wire.h"
|
||||
|
||||
/* @const_object_info_begin
|
||||
|
@ -138,8 +46,8 @@ class be_class_Wire (scope: global, name: Wire) {
|
|||
detect, func(b_wire_detect)
|
||||
enabled, func(b_wire_enabled)
|
||||
|
||||
read_bytes, closure(read_bytes_closure)
|
||||
write_bytes, closure(write_bytes_closure)
|
||||
read_bytes, closure(Wire_read_bytes_closure)
|
||||
write_bytes, closure(Wire_write_bytes_closure)
|
||||
}
|
||||
@const_object_info_end */
|
||||
|
||||
|
|
|
@ -66,62 +66,7 @@ extern const bclass be_class_zcl_attribute_ntv;
|
|||
extern const bclass be_class_zcl_attribute;
|
||||
extern const bclass be_class_zcl_attribute_list;
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zb_device_tostring, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(json),
|
||||
/* K1 */ be_nested_str_weak(string),
|
||||
/* K2 */ be_nested_str_weak(longaddr),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(_X3Cinstance_X3A_X20_X25s_X280x_X2504X_X2C_X200x_X2508X_X2508X_X2C_X20name_X3A_X27_X25s_X27_X2C_X20model_X3A_X27_X25s_X27_X2C_X20manufacturer_X3A_X27_X25s_X27_X29_X3E),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_const_int(0),
|
||||
/* K8 */ be_nested_str_weak(name),
|
||||
/* K9 */ be_nested_str_weak(model),
|
||||
/* K10 */ be_nested_str_weak(manufacturer),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[22]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x8C100503, // 0003 GETMET R4 R2 K3
|
||||
0x58180004, // 0004 LDCONST R6 K4
|
||||
0x601C0005, // 0005 GETGBL R7 G5
|
||||
0x5C200000, // 0006 MOVE R8 R0
|
||||
0x7C1C0200, // 0007 CALL R7 1
|
||||
0x88200105, // 0008 GETMBR R8 R0 K5
|
||||
0x8C240706, // 0009 GETMET R9 R3 K6
|
||||
0x542E0003, // 000A LDINT R11 4
|
||||
0x54320003, // 000B LDINT R12 4
|
||||
0x7C240600, // 000C CALL R9 3
|
||||
0x8C280706, // 000D GETMET R10 R3 K6
|
||||
0x58300007, // 000E LDCONST R12 K7
|
||||
0x54360003, // 000F LDINT R13 4
|
||||
0x7C280600, // 0010 CALL R10 3
|
||||
0x882C0108, // 0011 GETMBR R11 R0 K8
|
||||
0x88300109, // 0012 GETMBR R12 R0 K9
|
||||
0x8834010A, // 0013 GETMBR R13 R0 K10
|
||||
0x7C101200, // 0014 CALL R4 9
|
||||
0x80040800, // 0015 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
#include "solidify/solidified_zigbee.h"
|
||||
|
||||
// Module Zigbee
|
||||
extern const bclass be_class_zb_coord;
|
||||
|
|
|
@ -4,223 +4,6 @@
|
|||
*******************************************************************/
|
||||
#ifdef USE_ZIGBEE
|
||||
|
||||
#include "be_constobj.h"
|
||||
#include "solidify/solidified_zigbee_zb_coord.h"
|
||||
|
||||
extern const bclass be_class_zb_coord_ntv;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_init, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x8C040300, // 0003 GETMET R1 R1 K0
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: add_handler
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_add_handler, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(instance),
|
||||
/* K1 */ be_nested_str_weak(value_error),
|
||||
/* K2 */ be_nested_str_weak(instance_X20required),
|
||||
/* K3 */ be_nested_str_weak(_handlers),
|
||||
/* K4 */ be_nested_str_weak(push),
|
||||
}),
|
||||
be_str_weak(add_handler),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60080004, // 0000 GETGBL R2 G4
|
||||
0x5C0C0200, // 0001 MOVE R3 R1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x20080500, // 0003 NE R2 R2 K0
|
||||
0x780A0000, // 0004 JMPF R2 #0006
|
||||
0xB0060302, // 0005 RAISE 1 K1 K2
|
||||
0x88080103, // 0006 GETMBR R2 R0 K3
|
||||
0x780A0004, // 0007 JMPF R2 #000D
|
||||
0x88080103, // 0008 GETMBR R2 R0 K3
|
||||
0x8C080504, // 0009 GETMET R2 R2 K4
|
||||
0x5C100200, // 000A MOVE R4 R1
|
||||
0x7C080400, // 000B CALL R2 2
|
||||
0x70020003, // 000C JMP #0011
|
||||
0x60080012, // 000D GETGBL R2 G18
|
||||
0x7C080000, // 000E CALL R2 0
|
||||
0x400C0401, // 000F CONNECT R3 R2 R1
|
||||
0x90020602, // 0010 SETMBR R0 K3 R2
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: dispatch
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_dispatch, /* name */
|
||||
be_nested_proto(
|
||||
21, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(_handlers),
|
||||
/* K1 */ be_nested_str_weak(introspect),
|
||||
/* K2 */ be_nested_str_weak(string),
|
||||
/* K3 */ be_nested_str_weak(toptr),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(zcl_frame),
|
||||
/* K6 */ be_nested_str_weak(zcl_attribute_list),
|
||||
/* K7 */ be_nested_str_weak(get),
|
||||
/* K8 */ be_nested_str_weak(function),
|
||||
/* K9 */ be_nested_str_weak(format),
|
||||
/* K10 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K11 */ be_nested_str_weak(tasmota),
|
||||
/* K12 */ be_nested_str_weak(_debug_present),
|
||||
/* K13 */ be_nested_str_weak(debug),
|
||||
/* K14 */ be_nested_str_weak(traceback),
|
||||
/* K15 */ be_const_int(1),
|
||||
}),
|
||||
be_str_weak(dispatch),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x4C180000, // 0001 LDNIL R6
|
||||
0x1C140A06, // 0002 EQ R5 R5 R6
|
||||
0x78160000, // 0003 JMPF R5 #0005
|
||||
0x80000A00, // 0004 RET 0
|
||||
0xA4160200, // 0005 IMPORT R5 K1
|
||||
0xA41A0400, // 0006 IMPORT R6 K2
|
||||
0x4C1C0000, // 0007 LDNIL R7
|
||||
0x4C200000, // 0008 LDNIL R8
|
||||
0x8C240B03, // 0009 GETMET R9 R5 K3
|
||||
0x582C0004, // 000A LDCONST R11 K4
|
||||
0x7C240400, // 000B CALL R9 2
|
||||
0x20280409, // 000C NE R10 R2 R9
|
||||
0x782A0003, // 000D JMPF R10 #0012
|
||||
0x8C280105, // 000E GETMET R10 R0 K5
|
||||
0x5C300400, // 000F MOVE R12 R2
|
||||
0x7C280400, // 0010 CALL R10 2
|
||||
0x5C1C1400, // 0011 MOVE R7 R10
|
||||
0x20280609, // 0012 NE R10 R3 R9
|
||||
0x782A0003, // 0013 JMPF R10 #0018
|
||||
0x8C280106, // 0014 GETMET R10 R0 K6
|
||||
0x5C300600, // 0015 MOVE R12 R3
|
||||
0x7C280400, // 0016 CALL R10 2
|
||||
0x5C201400, // 0017 MOVE R8 R10
|
||||
0x58280004, // 0018 LDCONST R10 K4
|
||||
0x602C000C, // 0019 GETGBL R11 G12
|
||||
0x88300100, // 001A GETMBR R12 R0 K0
|
||||
0x7C2C0200, // 001B CALL R11 1
|
||||
0x142C140B, // 001C LT R11 R10 R11
|
||||
0x782E0027, // 001D JMPF R11 #0046
|
||||
0x882C0100, // 001E GETMBR R11 R0 K0
|
||||
0x942C160A, // 001F GETIDX R11 R11 R10
|
||||
0x8C300B07, // 0020 GETMET R12 R5 K7
|
||||
0x5C381600, // 0021 MOVE R14 R11
|
||||
0x5C3C0200, // 0022 MOVE R15 R1
|
||||
0x7C300600, // 0023 CALL R12 3
|
||||
0x60340004, // 0024 GETGBL R13 G4
|
||||
0x5C381800, // 0025 MOVE R14 R12
|
||||
0x7C340200, // 0026 CALL R13 1
|
||||
0x1C341B08, // 0027 EQ R13 R13 K8
|
||||
0x7836001A, // 0028 JMPF R13 #0044
|
||||
0xA8020008, // 0029 EXBLK 0 #0033
|
||||
0x5C341800, // 002A MOVE R13 R12
|
||||
0x5C381600, // 002B MOVE R14 R11
|
||||
0x5C3C0200, // 002C MOVE R15 R1
|
||||
0x5C400E00, // 002D MOVE R16 R7
|
||||
0x5C441000, // 002E MOVE R17 R8
|
||||
0x5C480800, // 002F MOVE R18 R4
|
||||
0x7C340A00, // 0030 CALL R13 5
|
||||
0xA8040001, // 0031 EXBLK 1 1
|
||||
0x70020010, // 0032 JMP #0044
|
||||
0xAC340002, // 0033 CATCH R13 0 2
|
||||
0x7002000D, // 0034 JMP #0043
|
||||
0x603C0001, // 0035 GETGBL R15 G1
|
||||
0x8C400D09, // 0036 GETMET R16 R6 K9
|
||||
0x5848000A, // 0037 LDCONST R18 K10
|
||||
0x5C4C1A00, // 0038 MOVE R19 R13
|
||||
0x5C501C00, // 0039 MOVE R20 R14
|
||||
0x7C400800, // 003A CALL R16 4
|
||||
0x7C3C0200, // 003B CALL R15 1
|
||||
0xB83E1600, // 003C GETNGBL R15 K11
|
||||
0x883C1F0C, // 003D GETMBR R15 R15 K12
|
||||
0x783E0002, // 003E JMPF R15 #0042
|
||||
0xA43E1A00, // 003F IMPORT R15 K13
|
||||
0x8C401F0E, // 0040 GETMET R16 R15 K14
|
||||
0x7C400200, // 0041 CALL R16 1
|
||||
0x70020000, // 0042 JMP #0044
|
||||
0xB0080000, // 0043 RAISE 2 R0 R0
|
||||
0x0028150F, // 0044 ADD R10 R10 K15
|
||||
0x7001FFD2, // 0045 JMP #0019
|
||||
0x80000000, // 0046 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zb_coord
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zb_coord_ntv;
|
||||
be_local_class(zb_coord,
|
||||
1,
|
||||
&be_class_zb_coord_ntv,
|
||||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(dispatch, 1), be_const_closure(zb_coord_dispatch_closure) },
|
||||
{ be_const_key_weak(add_handler, 2), be_const_closure(zb_coord_add_handler_closure) },
|
||||
{ be_const_key_weak(_handlers, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(init, 0), be_const_closure(zb_coord_init_closure) },
|
||||
})),
|
||||
be_str_weak(zb_coord)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zb_coord_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zb_coord);
|
||||
be_setglobal(vm, "zb_coord");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif // USE_LIGHT
|
||||
#endif // USE_ZIGBEE
|
||||
|
|
|
@ -4,925 +4,6 @@
|
|||
*******************************************************************/
|
||||
#ifdef USE_ZIGBEE
|
||||
|
||||
#include "be_constobj.h"
|
||||
#include "solidify/solidified_zigbee_zcl_attribute.h"
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tomap
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_tomap, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tomap),
|
||||
/* K1 */ be_nested_str_weak(cluster),
|
||||
/* K2 */ be_nested_str_weak(attr_id),
|
||||
/* K3 */ be_nested_str_weak(cmd),
|
||||
/* K4 */ be_nested_str_weak(direction),
|
||||
/* K5 */ be_nested_str_weak(key),
|
||||
/* K6 */ be_nested_str_weak(val),
|
||||
}),
|
||||
be_str_weak(tomap),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x8C040300, // 0003 GETMET R1 R1 K0
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x88080101, // 0005 GETMBR R2 R0 K1
|
||||
0x98060202, // 0006 SETIDX R1 K1 R2
|
||||
0x88080102, // 0007 GETMBR R2 R0 K2
|
||||
0x98060402, // 0008 SETIDX R1 K2 R2
|
||||
0x88080103, // 0009 GETMBR R2 R0 K3
|
||||
0x98060602, // 000A SETIDX R1 K3 R2
|
||||
0x88080104, // 000B GETMBR R2 R0 K4
|
||||
0x98060802, // 000C SETIDX R1 K4 R2
|
||||
0x88080105, // 000D GETMBR R2 R0 K5
|
||||
0x98060A02, // 000E SETIDX R1 K5 R2
|
||||
0x88080106, // 000F GETMBR R2 R0 K6
|
||||
0x98060C02, // 0010 SETIDX R1 K6 R2
|
||||
0x80040200, // 0011 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: key_tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_key_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(_X3Cundefined_X3E),
|
||||
/* K2 */ be_nested_str_weak(key),
|
||||
/* K3 */ be_nested_str_weak(key_suffix),
|
||||
/* K4 */ be_const_int(1),
|
||||
/* K5 */ be_nested_str_weak(cluster),
|
||||
/* K6 */ be_nested_str_weak(attr_id),
|
||||
/* K7 */ be_nested_str_weak(format),
|
||||
/* K8 */ be_nested_str_weak(_X2504X_X2F_X2504X),
|
||||
/* K9 */ be_nested_str_weak(_X2B),
|
||||
/* K10 */ be_nested_str_weak(cmd),
|
||||
/* K11 */ be_nested_str_weak(direction),
|
||||
/* K12 */ be_nested_str_weak(_X2504X_X25s_X2502X),
|
||||
/* K13 */ be_nested_str_weak(_X3C),
|
||||
/* K14 */ be_nested_str_weak(_X21),
|
||||
}),
|
||||
be_str_weak(key_tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[70]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x58080001, // 0001 LDCONST R2 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x4C100000, // 0003 LDNIL R4
|
||||
0x20100604, // 0004 NE R4 R3 R4
|
||||
0x78120008, // 0005 JMPF R4 #000F
|
||||
0x5C080600, // 0006 MOVE R2 R3
|
||||
0x88100103, // 0007 GETMBR R4 R0 K3
|
||||
0x24100904, // 0008 GT R4 R4 K4
|
||||
0x78120003, // 0009 JMPF R4 #000E
|
||||
0x60100008, // 000A GETGBL R4 G8
|
||||
0x88140103, // 000B GETMBR R5 R0 K3
|
||||
0x7C100200, // 000C CALL R4 1
|
||||
0x00080404, // 000D ADD R2 R2 R4
|
||||
0x70020035, // 000E JMP #0045
|
||||
0x88100105, // 000F GETMBR R4 R0 K5
|
||||
0x4C140000, // 0010 LDNIL R5
|
||||
0x20100805, // 0011 NE R4 R4 R5
|
||||
0x78120012, // 0012 JMPF R4 #0026
|
||||
0x88100106, // 0013 GETMBR R4 R0 K6
|
||||
0x4C140000, // 0014 LDNIL R5
|
||||
0x20100805, // 0015 NE R4 R4 R5
|
||||
0x7812000E, // 0016 JMPF R4 #0026
|
||||
0x8C100307, // 0017 GETMET R4 R1 K7
|
||||
0x58180008, // 0018 LDCONST R6 K8
|
||||
0x881C0105, // 0019 GETMBR R7 R0 K5
|
||||
0x88200106, // 001A GETMBR R8 R0 K6
|
||||
0x7C100800, // 001B CALL R4 4
|
||||
0x5C080800, // 001C MOVE R2 R4
|
||||
0x88100103, // 001D GETMBR R4 R0 K3
|
||||
0x24100904, // 001E GT R4 R4 K4
|
||||
0x78120004, // 001F JMPF R4 #0025
|
||||
0x60100008, // 0020 GETGBL R4 G8
|
||||
0x88140103, // 0021 GETMBR R5 R0 K3
|
||||
0x7C100200, // 0022 CALL R4 1
|
||||
0x00121204, // 0023 ADD R4 K9 R4
|
||||
0x00080404, // 0024 ADD R2 R2 R4
|
||||
0x7002001E, // 0025 JMP #0045
|
||||
0x88100105, // 0026 GETMBR R4 R0 K5
|
||||
0x4C140000, // 0027 LDNIL R5
|
||||
0x20100805, // 0028 NE R4 R4 R5
|
||||
0x7812001A, // 0029 JMPF R4 #0045
|
||||
0x8810010A, // 002A GETMBR R4 R0 K10
|
||||
0x4C140000, // 002B LDNIL R5
|
||||
0x20100805, // 002C NE R4 R4 R5
|
||||
0x78120016, // 002D JMPF R4 #0045
|
||||
0x8810010B, // 002E GETMBR R4 R0 K11
|
||||
0x4C140000, // 002F LDNIL R5
|
||||
0x20100805, // 0030 NE R4 R4 R5
|
||||
0x78120012, // 0031 JMPF R4 #0045
|
||||
0x8C100307, // 0032 GETMET R4 R1 K7
|
||||
0x5818000C, // 0033 LDCONST R6 K12
|
||||
0x881C0105, // 0034 GETMBR R7 R0 K5
|
||||
0x8820010B, // 0035 GETMBR R8 R0 K11
|
||||
0x78220001, // 0036 JMPF R8 #0039
|
||||
0x5820000D, // 0037 LDCONST R8 K13
|
||||
0x70020000, // 0038 JMP #003A
|
||||
0x5820000E, // 0039 LDCONST R8 K14
|
||||
0x8824010A, // 003A GETMBR R9 R0 K10
|
||||
0x7C100A00, // 003B CALL R4 5
|
||||
0x5C080800, // 003C MOVE R2 R4
|
||||
0x88100103, // 003D GETMBR R4 R0 K3
|
||||
0x24100904, // 003E GT R4 R4 K4
|
||||
0x78120004, // 003F JMPF R4 #0045
|
||||
0x60100008, // 0040 GETGBL R4 G8
|
||||
0x88140103, // 0041 GETMBR R5 R0 K3
|
||||
0x7C100200, // 0042 CALL R4 1
|
||||
0x00121204, // 0043 ADD R4 K9 R4
|
||||
0x00080404, // 0044 ADD R2 R2 R4
|
||||
0x80040400, // 0045 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: deinit
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_deinit, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(ismapped),
|
||||
/* K1 */ be_nested_str_weak(_deinit),
|
||||
}),
|
||||
be_str_weak(deinit),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x74060001, // 0002 JMPT R1 #0005
|
||||
0x8C040101, // 0003 GETMET R1 R0 K1
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_tostring, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(introspect),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(string),
|
||||
/* K3 */ be_nested_str_weak(dump),
|
||||
/* K4 */ be_nested_str_weak(key_tostring),
|
||||
/* K5 */ be_nested_str_weak(_X3A),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_nested_str_weak(val),
|
||||
/* K8 */ be_nested_str_weak(tojson),
|
||||
/* K9 */ be_nested_str_weak(cluster),
|
||||
/* K10 */ be_nested_str_weak(attr_id),
|
||||
/* K11 */ be_nested_str_weak(key),
|
||||
/* K12 */ be_nested_str_weak(format),
|
||||
/* K13 */ be_nested_str_weak(_X28_X25s_X29),
|
||||
/* K14 */ be_nested_str_weak(_X2C_X25s_X3A_X22_X2504X_X2F_X2504X_X22),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0xA40E0400, // 0002 IMPORT R3 K2
|
||||
0x8C100503, // 0003 GETMET R4 R2 K3
|
||||
0x8C180104, // 0004 GETMET R6 R0 K4
|
||||
0x7C180200, // 0005 CALL R6 1
|
||||
0x7C100400, // 0006 CALL R4 2
|
||||
0x00100905, // 0007 ADD R4 R4 K5
|
||||
0x8C140306, // 0008 GETMET R5 R1 K6
|
||||
0x881C0107, // 0009 GETMBR R7 R0 K7
|
||||
0x58200008, // 000A LDCONST R8 K8
|
||||
0x7C140600, // 000B CALL R5 3
|
||||
0x4C180000, // 000C LDNIL R6
|
||||
0x20140A06, // 000D NE R5 R5 R6
|
||||
0x78160004, // 000E JMPF R5 #0014
|
||||
0x88140107, // 000F GETMBR R5 R0 K7
|
||||
0x8C140B08, // 0010 GETMET R5 R5 K8
|
||||
0x7C140200, // 0011 CALL R5 1
|
||||
0x00100805, // 0012 ADD R4 R4 R5
|
||||
0x70020003, // 0013 JMP #0018
|
||||
0x8C140503, // 0014 GETMET R5 R2 K3
|
||||
0x881C0107, // 0015 GETMBR R7 R0 K7
|
||||
0x7C140400, // 0016 CALL R5 2
|
||||
0x00100805, // 0017 ADD R4 R4 R5
|
||||
0x88140109, // 0018 GETMBR R5 R0 K9
|
||||
0x4C180000, // 0019 LDNIL R6
|
||||
0x20140A06, // 001A NE R5 R5 R6
|
||||
0x78160015, // 001B JMPF R5 #0032
|
||||
0x8814010A, // 001C GETMBR R5 R0 K10
|
||||
0x4C180000, // 001D LDNIL R6
|
||||
0x20140A06, // 001E NE R5 R5 R6
|
||||
0x78160011, // 001F JMPF R5 #0032
|
||||
0x8814010B, // 0020 GETMBR R5 R0 K11
|
||||
0x4C180000, // 0021 LDNIL R6
|
||||
0x20140A06, // 0022 NE R5 R5 R6
|
||||
0x7816000D, // 0023 JMPF R5 #0032
|
||||
0x8C14070C, // 0024 GETMET R5 R3 K12
|
||||
0x581C000D, // 0025 LDCONST R7 K13
|
||||
0x8C200104, // 0026 GETMET R8 R0 K4
|
||||
0x7C200200, // 0027 CALL R8 1
|
||||
0x7C140600, // 0028 CALL R5 3
|
||||
0x8C18070C, // 0029 GETMET R6 R3 K12
|
||||
0x5820000E, // 002A LDCONST R8 K14
|
||||
0x8C240503, // 002B GETMET R9 R2 K3
|
||||
0x5C2C0A00, // 002C MOVE R11 R5
|
||||
0x7C240400, // 002D CALL R9 2
|
||||
0x88280109, // 002E GETMBR R10 R0 K9
|
||||
0x882C010A, // 002F GETMBR R11 R0 K10
|
||||
0x7C180A00, // 0030 CALL R6 5
|
||||
0x00100806, // 0031 ADD R4 R4 R6
|
||||
0x80040800, // 0032 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_setmember, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(cluster),
|
||||
/* K1 */ be_nested_str_weak(_cluster),
|
||||
/* K2 */ be_nested_str_weak(attr_id),
|
||||
/* K3 */ be_nested_str_weak(_attr_id),
|
||||
/* K4 */ be_nested_str_weak(_iscmd),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(cmd),
|
||||
/* K7 */ be_nested_str_weak(_cmd),
|
||||
/* K8 */ be_const_int(1),
|
||||
/* K9 */ be_nested_str_weak(_direction),
|
||||
/* K10 */ be_nested_str_weak(direction),
|
||||
/* K11 */ be_nested_str_weak(val),
|
||||
/* K12 */ be_nested_str_weak(_set_val),
|
||||
/* K13 */ be_nested_str_weak(key),
|
||||
/* K14 */ be_nested_str_weak(_set_key),
|
||||
/* K15 */ be_nested_str_weak(setmember),
|
||||
}),
|
||||
be_str_weak(setmember),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[72]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0007, // 0001 JMPF R3 #000A
|
||||
0x4C0C0000, // 0002 LDNIL R3
|
||||
0x1C0C0403, // 0003 EQ R3 R2 R3
|
||||
0x780E0002, // 0004 JMPF R3 #0008
|
||||
0x540EFFFE, // 0005 LDINT R3 65535
|
||||
0x90020203, // 0006 SETMBR R0 K1 R3
|
||||
0x70020000, // 0007 JMP #0009
|
||||
0x90020202, // 0008 SETMBR R0 K1 R2
|
||||
0x7002003C, // 0009 JMP #0047
|
||||
0x1C0C0302, // 000A EQ R3 R1 K2
|
||||
0x780E0008, // 000B JMPF R3 #0015
|
||||
0x4C0C0000, // 000C LDNIL R3
|
||||
0x1C0C0403, // 000D EQ R3 R2 R3
|
||||
0x780E0002, // 000E JMPF R3 #0012
|
||||
0x540EFFFE, // 000F LDINT R3 65535
|
||||
0x90020603, // 0010 SETMBR R0 K3 R3
|
||||
0x70020001, // 0011 JMP #0014
|
||||
0x90020602, // 0012 SETMBR R0 K3 R2
|
||||
0x90020905, // 0013 SETMBR R0 K4 K5
|
||||
0x70020031, // 0014 JMP #0047
|
||||
0x1C0C0306, // 0015 EQ R3 R1 K6
|
||||
0x780E000D, // 0016 JMPF R3 #0025
|
||||
0x4C0C0000, // 0017 LDNIL R3
|
||||
0x1C0C0403, // 0018 EQ R3 R2 R3
|
||||
0x780E0002, // 0019 JMPF R3 #001D
|
||||
0x540E00FE, // 001A LDINT R3 255
|
||||
0x90020E03, // 001B SETMBR R0 K7 R3
|
||||
0x70020006, // 001C JMP #0024
|
||||
0x90020E02, // 001D SETMBR R0 K7 R2
|
||||
0x90020908, // 001E SETMBR R0 K4 K8
|
||||
0x880C0109, // 001F GETMBR R3 R0 K9
|
||||
0x541200FE, // 0020 LDINT R4 255
|
||||
0x1C0C0604, // 0021 EQ R3 R3 R4
|
||||
0x780E0000, // 0022 JMPF R3 #0024
|
||||
0x90021305, // 0023 SETMBR R0 K9 K5
|
||||
0x70020021, // 0024 JMP #0047
|
||||
0x1C0C030A, // 0025 EQ R3 R1 K10
|
||||
0x780E000C, // 0026 JMPF R3 #0034
|
||||
0x4C0C0000, // 0027 LDNIL R3
|
||||
0x1C0C0403, // 0028 EQ R3 R2 R3
|
||||
0x780E0002, // 0029 JMPF R3 #002D
|
||||
0x540E00FE, // 002A LDINT R3 255
|
||||
0x90021203, // 002B SETMBR R0 K9 R3
|
||||
0x70020005, // 002C JMP #0033
|
||||
0x780A0001, // 002D JMPF R2 #0030
|
||||
0x580C0008, // 002E LDCONST R3 K8
|
||||
0x70020000, // 002F JMP #0031
|
||||
0x580C0005, // 0030 LDCONST R3 K5
|
||||
0x90021203, // 0031 SETMBR R0 K9 R3
|
||||
0x90020908, // 0032 SETMBR R0 K4 K8
|
||||
0x70020012, // 0033 JMP #0047
|
||||
0x1C0C030B, // 0034 EQ R3 R1 K11
|
||||
0x780E0003, // 0035 JMPF R3 #003A
|
||||
0x8C0C010C, // 0036 GETMET R3 R0 K12
|
||||
0x5C140400, // 0037 MOVE R5 R2
|
||||
0x7C0C0400, // 0038 CALL R3 2
|
||||
0x7002000C, // 0039 JMP #0047
|
||||
0x1C0C030D, // 003A EQ R3 R1 K13
|
||||
0x780E0003, // 003B JMPF R3 #0040
|
||||
0x8C0C010E, // 003C GETMET R3 R0 K14
|
||||
0x5C140400, // 003D MOVE R5 R2
|
||||
0x7C0C0400, // 003E CALL R3 2
|
||||
0x70020006, // 003F JMP #0047
|
||||
0x600C0003, // 0040 GETGBL R3 G3
|
||||
0x5C100000, // 0041 MOVE R4 R0
|
||||
0x7C0C0200, // 0042 CALL R3 1
|
||||
0x8C0C070F, // 0043 GETMET R3 R3 K15
|
||||
0x5C140200, // 0044 MOVE R5 R1
|
||||
0x5C180400, // 0045 MOVE R6 R2
|
||||
0x7C0C0600, // 0046 CALL R3 3
|
||||
0x80000000, // 0047 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(_init),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x60080003, // 0000 GETGBL R2 G3
|
||||
0x5C0C0000, // 0001 MOVE R3 R0
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x8C080500, // 0003 GETMET R2 R2 K0
|
||||
0x5C100200, // 0004 MOVE R4 R1
|
||||
0x7C080400, // 0005 CALL R2 2
|
||||
0x4C080000, // 0006 LDNIL R2
|
||||
0x1C080202, // 0007 EQ R2 R1 R2
|
||||
0x780A0001, // 0008 JMPF R2 #000B
|
||||
0x8C080101, // 0009 GETMET R2 R0 K1
|
||||
0x7C080200, // 000A CALL R2 1
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_member, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(cluster),
|
||||
/* K1 */ be_nested_str_weak(_cluster),
|
||||
/* K2 */ be_nested_str_weak(attr_id),
|
||||
/* K3 */ be_nested_str_weak(_attr_id),
|
||||
/* K4 */ be_nested_str_weak(_iscmd),
|
||||
/* K5 */ be_nested_str_weak(cmd),
|
||||
/* K6 */ be_nested_str_weak(_cmd),
|
||||
/* K7 */ be_nested_str_weak(direction),
|
||||
/* K8 */ be_nested_str_weak(_direction),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(val),
|
||||
/* K11 */ be_nested_str_weak(_get_val),
|
||||
/* K12 */ be_nested_str_weak(tohex),
|
||||
/* K13 */ be_nested_str_weak(key),
|
||||
/* K14 */ be_nested_str_weak(_get_key),
|
||||
/* K15 */ be_nested_str_weak(member),
|
||||
}),
|
||||
be_str_weak(member),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[78]) { /* code */
|
||||
0x1C080300, // 0000 EQ R2 R1 K0
|
||||
0x780A0008, // 0001 JMPF R2 #000B
|
||||
0x88080101, // 0002 GETMBR R2 R0 K1
|
||||
0x540EFFFE, // 0003 LDINT R3 65535
|
||||
0x200C0403, // 0004 NE R3 R2 R3
|
||||
0x780E0001, // 0005 JMPF R3 #0008
|
||||
0x5C0C0400, // 0006 MOVE R3 R2
|
||||
0x70020000, // 0007 JMP #0009
|
||||
0x4C0C0000, // 0008 LDNIL R3
|
||||
0x80040600, // 0009 RET 1 R3
|
||||
0x70020041, // 000A JMP #004D
|
||||
0x1C080302, // 000B EQ R2 R1 K2
|
||||
0x780A000A, // 000C JMPF R2 #0018
|
||||
0x88080103, // 000D GETMBR R2 R0 K3
|
||||
0x540EFFFE, // 000E LDINT R3 65535
|
||||
0x200C0403, // 000F NE R3 R2 R3
|
||||
0x780E0003, // 0010 JMPF R3 #0015
|
||||
0x880C0104, // 0011 GETMBR R3 R0 K4
|
||||
0x740E0001, // 0012 JMPT R3 #0015
|
||||
0x5C0C0400, // 0013 MOVE R3 R2
|
||||
0x70020000, // 0014 JMP #0016
|
||||
0x4C0C0000, // 0015 LDNIL R3
|
||||
0x80040600, // 0016 RET 1 R3
|
||||
0x70020034, // 0017 JMP #004D
|
||||
0x1C080305, // 0018 EQ R2 R1 K5
|
||||
0x780A000A, // 0019 JMPF R2 #0025
|
||||
0x88080106, // 001A GETMBR R2 R0 K6
|
||||
0x540E00FE, // 001B LDINT R3 255
|
||||
0x200C0403, // 001C NE R3 R2 R3
|
||||
0x780E0003, // 001D JMPF R3 #0022
|
||||
0x880C0104, // 001E GETMBR R3 R0 K4
|
||||
0x780E0001, // 001F JMPF R3 #0022
|
||||
0x5C0C0400, // 0020 MOVE R3 R2
|
||||
0x70020000, // 0021 JMP #0023
|
||||
0x4C0C0000, // 0022 LDNIL R3
|
||||
0x80040600, // 0023 RET 1 R3
|
||||
0x70020027, // 0024 JMP #004D
|
||||
0x1C080307, // 0025 EQ R2 R1 K7
|
||||
0x780A000A, // 0026 JMPF R2 #0032
|
||||
0x88080108, // 0027 GETMBR R2 R0 K8
|
||||
0x540E00FE, // 0028 LDINT R3 255
|
||||
0x200C0403, // 0029 NE R3 R2 R3
|
||||
0x780E0003, // 002A JMPF R3 #002F
|
||||
0x880C0104, // 002B GETMBR R3 R0 K4
|
||||
0x780E0001, // 002C JMPF R3 #002F
|
||||
0x2C0C0509, // 002D AND R3 R2 K9
|
||||
0x70020000, // 002E JMP #0030
|
||||
0x4C0C0000, // 002F LDNIL R3
|
||||
0x80040600, // 0030 RET 1 R3
|
||||
0x7002001A, // 0031 JMP #004D
|
||||
0x1C08030A, // 0032 EQ R2 R1 K10
|
||||
0x780A000B, // 0033 JMPF R2 #0040
|
||||
0x8C08010B, // 0034 GETMET R2 R0 K11
|
||||
0x7C080200, // 0035 CALL R2 1
|
||||
0x600C000F, // 0036 GETGBL R3 G15
|
||||
0x5C100400, // 0037 MOVE R4 R2
|
||||
0x60140015, // 0038 GETGBL R5 G21
|
||||
0x7C0C0400, // 0039 CALL R3 2
|
||||
0x780E0002, // 003A JMPF R3 #003E
|
||||
0x8C0C050C, // 003B GETMET R3 R2 K12
|
||||
0x7C0C0200, // 003C CALL R3 1
|
||||
0x5C080600, // 003D MOVE R2 R3
|
||||
0x80040400, // 003E RET 1 R2
|
||||
0x7002000C, // 003F JMP #004D
|
||||
0x1C08030D, // 0040 EQ R2 R1 K13
|
||||
0x780A0003, // 0041 JMPF R2 #0046
|
||||
0x8C08010E, // 0042 GETMET R2 R0 K14
|
||||
0x7C080200, // 0043 CALL R2 1
|
||||
0x80040400, // 0044 RET 1 R2
|
||||
0x70020006, // 0045 JMP #004D
|
||||
0x60080003, // 0046 GETGBL R2 G3
|
||||
0x5C0C0000, // 0047 MOVE R3 R0
|
||||
0x7C080200, // 0048 CALL R2 1
|
||||
0x8C08050F, // 0049 GETMET R2 R2 K15
|
||||
0x5C100200, // 004A MOVE R4 R1
|
||||
0x7C080400, // 004B CALL R2 2
|
||||
0x80040400, // 004C RET 1 R2
|
||||
0x80000000, // 004D RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zcl_attribute
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zcl_attribute_ntv;
|
||||
be_local_class(zcl_attribute,
|
||||
0,
|
||||
&be_class_zcl_attribute_ntv,
|
||||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(tomap, -1), be_const_closure(zcl_attribute_tomap_closure) },
|
||||
{ be_const_key_weak(key_tostring, -1), be_const_closure(zcl_attribute_key_tostring_closure) },
|
||||
{ be_const_key_weak(setmember, -1), be_const_closure(zcl_attribute_setmember_closure) },
|
||||
{ be_const_key_weak(tostring, -1), be_const_closure(zcl_attribute_tostring_closure) },
|
||||
{ be_const_key_weak(init, 2), be_const_closure(zcl_attribute_init_closure) },
|
||||
{ be_const_key_weak(deinit, 4), be_const_closure(zcl_attribute_deinit_closure) },
|
||||
{ be_const_key_weak(member, -1), be_const_closure(zcl_attribute_member_closure) },
|
||||
})),
|
||||
be_str_weak(zcl_attribute)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zcl_attribute_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zcl_attribute);
|
||||
be_setglobal(vm, "zcl_attribute");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_member, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(groupaddr),
|
||||
/* K1 */ be_nested_str_weak(_groupaddr),
|
||||
/* K2 */ be_nested_str_weak(src_ep),
|
||||
/* K3 */ be_nested_str_weak(_src_ep),
|
||||
/* K4 */ be_nested_str_weak(lqi),
|
||||
/* K5 */ be_nested_str_weak(_lqi),
|
||||
/* K6 */ be_nested_str_weak(member),
|
||||
}),
|
||||
be_str_weak(member),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[41]) { /* code */
|
||||
0x1C080300, // 0000 EQ R2 R1 K0
|
||||
0x780A0008, // 0001 JMPF R2 #000B
|
||||
0x88080101, // 0002 GETMBR R2 R0 K1
|
||||
0x540EFFFE, // 0003 LDINT R3 65535
|
||||
0x200C0403, // 0004 NE R3 R2 R3
|
||||
0x780E0001, // 0005 JMPF R3 #0008
|
||||
0x5C0C0400, // 0006 MOVE R3 R2
|
||||
0x70020000, // 0007 JMP #0009
|
||||
0x4C0C0000, // 0008 LDNIL R3
|
||||
0x80040600, // 0009 RET 1 R3
|
||||
0x7002001C, // 000A JMP #0028
|
||||
0x1C080302, // 000B EQ R2 R1 K2
|
||||
0x780A0008, // 000C JMPF R2 #0016
|
||||
0x88080103, // 000D GETMBR R2 R0 K3
|
||||
0x540E00FE, // 000E LDINT R3 255
|
||||
0x200C0403, // 000F NE R3 R2 R3
|
||||
0x780E0001, // 0010 JMPF R3 #0013
|
||||
0x5C0C0400, // 0011 MOVE R3 R2
|
||||
0x70020000, // 0012 JMP #0014
|
||||
0x4C0C0000, // 0013 LDNIL R3
|
||||
0x80040600, // 0014 RET 1 R3
|
||||
0x70020011, // 0015 JMP #0028
|
||||
0x1C080304, // 0016 EQ R2 R1 K4
|
||||
0x780A0008, // 0017 JMPF R2 #0021
|
||||
0x88080105, // 0018 GETMBR R2 R0 K5
|
||||
0x540E00FE, // 0019 LDINT R3 255
|
||||
0x200C0403, // 001A NE R3 R2 R3
|
||||
0x780E0001, // 001B JMPF R3 #001E
|
||||
0x5C0C0400, // 001C MOVE R3 R2
|
||||
0x70020000, // 001D JMP #001F
|
||||
0x4C0C0000, // 001E LDNIL R3
|
||||
0x80040600, // 001F RET 1 R3
|
||||
0x70020006, // 0020 JMP #0028
|
||||
0x60080003, // 0021 GETGBL R2 G3
|
||||
0x5C0C0000, // 0022 MOVE R3 R0
|
||||
0x7C080200, // 0023 CALL R2 1
|
||||
0x8C080506, // 0024 GETMET R2 R2 K6
|
||||
0x5C100200, // 0025 MOVE R4 R1
|
||||
0x7C080400, // 0026 CALL R2 2
|
||||
0x80040400, // 0027 RET 1 R2
|
||||
0x80000000, // 0028 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_setmember, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(groupaddr),
|
||||
/* K1 */ be_nested_str_weak(_groupaddr),
|
||||
/* K2 */ be_nested_str_weak(src_ep),
|
||||
/* K3 */ be_nested_str_weak(_src_ep),
|
||||
/* K4 */ be_nested_str_weak(lqi),
|
||||
/* K5 */ be_nested_str_weak(_lqi),
|
||||
/* K6 */ be_nested_str_weak(setmember),
|
||||
}),
|
||||
be_str_weak(setmember),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[38]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0007, // 0001 JMPF R3 #000A
|
||||
0x4C0C0000, // 0002 LDNIL R3
|
||||
0x200C0403, // 0003 NE R3 R2 R3
|
||||
0x780E0001, // 0004 JMPF R3 #0007
|
||||
0x5C0C0400, // 0005 MOVE R3 R2
|
||||
0x70020000, // 0006 JMP #0008
|
||||
0x540EFFFE, // 0007 LDINT R3 65535
|
||||
0x90020203, // 0008 SETMBR R0 K1 R3
|
||||
0x7002001A, // 0009 JMP #0025
|
||||
0x1C0C0302, // 000A EQ R3 R1 K2
|
||||
0x780E0007, // 000B JMPF R3 #0014
|
||||
0x4C0C0000, // 000C LDNIL R3
|
||||
0x200C0403, // 000D NE R3 R2 R3
|
||||
0x780E0001, // 000E JMPF R3 #0011
|
||||
0x5C0C0400, // 000F MOVE R3 R2
|
||||
0x70020000, // 0010 JMP #0012
|
||||
0x540E00FE, // 0011 LDINT R3 255
|
||||
0x90020603, // 0012 SETMBR R0 K3 R3
|
||||
0x70020010, // 0013 JMP #0025
|
||||
0x1C0C0304, // 0014 EQ R3 R1 K4
|
||||
0x780E0007, // 0015 JMPF R3 #001E
|
||||
0x4C0C0000, // 0016 LDNIL R3
|
||||
0x200C0403, // 0017 NE R3 R2 R3
|
||||
0x780E0001, // 0018 JMPF R3 #001B
|
||||
0x5C0C0400, // 0019 MOVE R3 R2
|
||||
0x70020000, // 001A JMP #001C
|
||||
0x540E00FE, // 001B LDINT R3 255
|
||||
0x90020A03, // 001C SETMBR R0 K5 R3
|
||||
0x70020006, // 001D JMP #0025
|
||||
0x600C0003, // 001E GETGBL R3 G3
|
||||
0x5C100000, // 001F MOVE R4 R0
|
||||
0x7C0C0200, // 0020 CALL R3 1
|
||||
0x8C0C0706, // 0021 GETMET R3 R3 K6
|
||||
0x5C140200, // 0022 MOVE R5 R1
|
||||
0x5C180400, // 0023 MOVE R6 R2
|
||||
0x7C0C0600, // 0024 CALL R3 3
|
||||
0x80000000, // 0025 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(_init),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x60080003, // 0000 GETGBL R2 G3
|
||||
0x5C0C0000, // 0001 MOVE R3 R0
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x8C080500, // 0003 GETMET R2 R2 K0
|
||||
0x5C100200, // 0004 MOVE R4 R1
|
||||
0x7C080400, // 0005 CALL R2 2
|
||||
0x4C080000, // 0006 LDNIL R2
|
||||
0x1C080202, // 0007 EQ R2 R1 R2
|
||||
0x780A0001, // 0008 JMPF R2 #000B
|
||||
0x8C080101, // 0009 GETMET R2 R0 K1
|
||||
0x7C080200, // 000A CALL R2 1
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: deinit
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_deinit, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(ismapped),
|
||||
/* K1 */ be_nested_str_weak(_deinit),
|
||||
}),
|
||||
be_str_weak(deinit),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x74060001, // 0002 JMPT R1 #0005
|
||||
0x8C040101, // 0003 GETMET R1 R0 K1
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_tostring, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[20]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(shortaddr),
|
||||
/* K3 */ be_nested_str_weak(push),
|
||||
/* K4 */ be_nested_str_weak(format),
|
||||
/* K5 */ be_nested_str_weak(_X22Device_X22_X3A_X220x_X2504X_X22),
|
||||
/* K6 */ be_nested_str_weak(groupaddr),
|
||||
/* K7 */ be_nested_str_weak(_X22Group_X22_X3A_X220x_X2504X_X22),
|
||||
/* K8 */ be_const_int(0),
|
||||
/* K9 */ be_nested_str_weak(size),
|
||||
/* K10 */ be_nested_str_weak(tostring),
|
||||
/* K11 */ be_const_int(1),
|
||||
/* K12 */ be_nested_str_weak(src_ep),
|
||||
/* K13 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25i),
|
||||
/* K14 */ be_nested_str_weak(lqi),
|
||||
/* K15 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K16 */ be_nested_str_weak(_X7B),
|
||||
/* K17 */ be_nested_str_weak(concat),
|
||||
/* K18 */ be_nested_str_weak(_X2C),
|
||||
/* K19 */ be_nested_str_weak(_X7D),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[62]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x600C0012, // 0002 GETGBL R3 G18
|
||||
0x7C0C0000, // 0003 CALL R3 0
|
||||
0x88100102, // 0004 GETMBR R4 R0 K2
|
||||
0x4C140000, // 0005 LDNIL R5
|
||||
0x20100805, // 0006 NE R4 R4 R5
|
||||
0x78120005, // 0007 JMPF R4 #000E
|
||||
0x8C100703, // 0008 GETMET R4 R3 K3
|
||||
0x8C180304, // 0009 GETMET R6 R1 K4
|
||||
0x58200005, // 000A LDCONST R8 K5
|
||||
0x88240102, // 000B GETMBR R9 R0 K2
|
||||
0x7C180600, // 000C CALL R6 3
|
||||
0x7C100400, // 000D CALL R4 2
|
||||
0x88100106, // 000E GETMBR R4 R0 K6
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x20100805, // 0010 NE R4 R4 R5
|
||||
0x78120005, // 0011 JMPF R4 #0018
|
||||
0x8C100703, // 0012 GETMET R4 R3 K3
|
||||
0x8C180304, // 0013 GETMET R6 R1 K4
|
||||
0x58200007, // 0014 LDCONST R8 K7
|
||||
0x88240106, // 0015 GETMBR R9 R0 K6
|
||||
0x7C180600, // 0016 CALL R6 3
|
||||
0x7C100400, // 0017 CALL R4 2
|
||||
0x58100008, // 0018 LDCONST R4 K8
|
||||
0x8C140109, // 0019 GETMET R5 R0 K9
|
||||
0x7C140200, // 001A CALL R5 1
|
||||
0x14180805, // 001B LT R6 R4 R5
|
||||
0x781A0006, // 001C JMPF R6 #0024
|
||||
0x8C180703, // 001D GETMET R6 R3 K3
|
||||
0x94200004, // 001E GETIDX R8 R0 R4
|
||||
0x8C20110A, // 001F GETMET R8 R8 K10
|
||||
0x7C200200, // 0020 CALL R8 1
|
||||
0x7C180400, // 0021 CALL R6 2
|
||||
0x0010090B, // 0022 ADD R4 R4 K11
|
||||
0x7001FFF6, // 0023 JMP #001B
|
||||
0x8818010C, // 0024 GETMBR R6 R0 K12
|
||||
0x4C1C0000, // 0025 LDNIL R7
|
||||
0x20180C07, // 0026 NE R6 R6 R7
|
||||
0x781A0005, // 0027 JMPF R6 #002E
|
||||
0x8C180703, // 0028 GETMET R6 R3 K3
|
||||
0x8C200304, // 0029 GETMET R8 R1 K4
|
||||
0x5828000D, // 002A LDCONST R10 K13
|
||||
0x882C010C, // 002B GETMBR R11 R0 K12
|
||||
0x7C200600, // 002C CALL R8 3
|
||||
0x7C180400, // 002D CALL R6 2
|
||||
0x8818010E, // 002E GETMBR R6 R0 K14
|
||||
0x4C1C0000, // 002F LDNIL R7
|
||||
0x20180C07, // 0030 NE R6 R6 R7
|
||||
0x781A0005, // 0031 JMPF R6 #0038
|
||||
0x8C180703, // 0032 GETMET R6 R3 K3
|
||||
0x8C200304, // 0033 GETMET R8 R1 K4
|
||||
0x5828000F, // 0034 LDCONST R10 K15
|
||||
0x882C010E, // 0035 GETMBR R11 R0 K14
|
||||
0x7C200600, // 0036 CALL R8 3
|
||||
0x7C180400, // 0037 CALL R6 2
|
||||
0x8C180711, // 0038 GETMET R6 R3 K17
|
||||
0x58200012, // 0039 LDCONST R8 K18
|
||||
0x7C180400, // 003A CALL R6 2
|
||||
0x001A2006, // 003B ADD R6 K16 R6
|
||||
0x00180D13, // 003C ADD R6 R6 K19
|
||||
0x80040C00, // 003D RET 1 R6
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zcl_attribute_list
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zcl_attribute_list_ntv;
|
||||
be_local_class(zcl_attribute_list,
|
||||
1,
|
||||
&be_class_zcl_attribute_list_ntv,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(shortaddr, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(member, 2), be_const_closure(zcl_attribute_list_member_closure) },
|
||||
{ be_const_key_weak(tostring, 5), be_const_closure(zcl_attribute_list_tostring_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(zcl_attribute_list_init_closure) },
|
||||
{ be_const_key_weak(deinit, -1), be_const_closure(zcl_attribute_list_deinit_closure) },
|
||||
{ be_const_key_weak(setmember, -1), be_const_closure(zcl_attribute_list_setmember_closure) },
|
||||
})),
|
||||
be_str_weak(zcl_attribute_list)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zcl_attribute_list_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zcl_attribute_list);
|
||||
be_setglobal(vm, "zcl_attribute_list");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
||||
#endif // USE_LIGHT
|
||||
#endif // USE_ZIGBEE
|
||||
|
|
|
@ -4,236 +4,6 @@
|
|||
*******************************************************************/
|
||||
#ifdef USE_ZIGBEE
|
||||
|
||||
#include "be_constobj.h"
|
||||
#include "solidify/solidified_zigbee_zcl_frame.h"
|
||||
|
||||
extern const bclass be_class_zcl_frame_ntv;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_member, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(payload),
|
||||
/* K1 */ be_nested_str_weak(_get_bytes),
|
||||
/* K2 */ be_nested_str_weak(payload_ptr),
|
||||
/* K3 */ be_nested_str_weak(member),
|
||||
}),
|
||||
be_str_weak(member),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x1C080300, // 0000 EQ R2 R1 K0
|
||||
0x780A0004, // 0001 JMPF R2 #0007
|
||||
0x8C080101, // 0002 GETMET R2 R0 K1
|
||||
0x88100102, // 0003 GETMBR R4 R0 K2
|
||||
0x7C080400, // 0004 CALL R2 2
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
0x70020006, // 0006 JMP #000E
|
||||
0x60080003, // 0007 GETGBL R2 G3
|
||||
0x5C0C0000, // 0008 MOVE R3 R0
|
||||
0x7C080200, // 0009 CALL R2 1
|
||||
0x8C080503, // 000A GETMET R2 R2 K3
|
||||
0x5C100200, // 000B MOVE R4 R1
|
||||
0x7C080400, // 000C CALL R2 2
|
||||
0x80040400, // 000D RET 1 R2
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_setmember, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(payload),
|
||||
/* K1 */ be_nested_str_weak(_set_bytes),
|
||||
/* K2 */ be_nested_str_weak(payload_ptr),
|
||||
/* K3 */ be_nested_str_weak(setmember),
|
||||
}),
|
||||
be_str_weak(setmember),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0005, // 0001 JMPF R3 #0008
|
||||
0x8C0C0101, // 0002 GETMET R3 R0 K1
|
||||
0x88140102, // 0003 GETMBR R5 R0 K2
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C0C0600, // 0005 CALL R3 3
|
||||
0x80040600, // 0006 RET 1 R3
|
||||
0x70020007, // 0007 JMP #0010
|
||||
0x600C0003, // 0008 GETGBL R3 G3
|
||||
0x5C100000, // 0009 MOVE R4 R0
|
||||
0x7C0C0200, // 000A CALL R3 1
|
||||
0x8C0C0703, // 000B GETMET R3 R3 K3
|
||||
0x5C140200, // 000C MOVE R5 R1
|
||||
0x5C180400, // 000D MOVE R6 R2
|
||||
0x7C0C0600, // 000E CALL R3 3
|
||||
0x80040600, // 000F RET 1 R3
|
||||
0x80000000, // 0010 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(no_bytes),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0x60080003, // 0000 GETGBL R2 G3
|
||||
0x5C0C0000, // 0001 MOVE R3 R0
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x8C080500, // 0003 GETMET R2 R2 K0
|
||||
0x5C100200, // 0004 MOVE R4 R1
|
||||
0x7C080400, // 0005 CALL R2 2
|
||||
0x60080015, // 0006 GETGBL R2 G21
|
||||
0x7C080000, // 0007 CALL R2 0
|
||||
0x90020202, // 0008 SETMBR R0 K1 R2
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tomap
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_tomap, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(tomap),
|
||||
/* K2 */ be_nested_str_weak(shortaddr_hex),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(0x_X2504X),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(payload),
|
||||
}),
|
||||
be_str_weak(tomap),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x60080003, // 0001 GETGBL R2 G3
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x8C080501, // 0004 GETMET R2 R2 K1
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x8C0C0303, // 0006 GETMET R3 R1 K3
|
||||
0x58140004, // 0007 LDCONST R5 K4
|
||||
0x88180105, // 0008 GETMBR R6 R0 K5
|
||||
0x7C0C0600, // 0009 CALL R3 3
|
||||
0x980A0403, // 000A SETIDX R2 K2 R3
|
||||
0x880C0106, // 000B GETMBR R3 R0 K6
|
||||
0x980A0C03, // 000C SETIDX R2 K6 R3
|
||||
0x80040400, // 000D RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_tostring, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tomap),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x60080008, // 0002 GETGBL R2 G8
|
||||
0x5C0C0200, // 0003 MOVE R3 R1
|
||||
0x7C080200, // 0004 CALL R2 1
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zcl_frame
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zcl_frame_ntv;
|
||||
be_local_class(zcl_frame,
|
||||
1,
|
||||
&be_class_zcl_frame_ntv,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(no_bytes, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(member, 2), be_const_closure(zcl_frame_member_closure) },
|
||||
{ be_const_key_weak(tostring, 5), be_const_closure(zcl_frame_tostring_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(zcl_frame_init_closure) },
|
||||
{ be_const_key_weak(tomap, -1), be_const_closure(zcl_frame_tomap_closure) },
|
||||
{ be_const_key_weak(setmember, -1), be_const_closure(zcl_frame_setmember_closure) },
|
||||
})),
|
||||
be_str_weak(zcl_frame)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zcl_frame_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zcl_frame);
|
||||
be_setglobal(vm, "zcl_frame");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif // USE_LIGHT
|
||||
#endif // USE_ZIGBEE
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#- Native code used for testing and code solidification -#
|
||||
#- Do not use it -#
|
||||
|
||||
#@ solidify:Wire.read_bytes
|
||||
#@ solidify:Wire.write_bytes
|
||||
class Wire
|
||||
var bus
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
_energy = nil # avoid compilation error
|
||||
energy_struct = nil
|
||||
|
||||
energy = module("energy")
|
||||
energy._ptr = nil
|
||||
|
||||
def init(m)
|
||||
import global
|
||||
global._energy = energy_struct(m._ptr)
|
||||
return m
|
||||
end
|
||||
energy.init = init
|
||||
|
||||
def read()
|
||||
return _energy.tomap()
|
||||
end
|
||||
energy.read = read
|
||||
|
||||
def member(k)
|
||||
return _energy.(k)
|
||||
end
|
||||
energy.member = member
|
||||
|
||||
def setmember(k, v)
|
||||
_energy.(k) = v
|
||||
end
|
||||
energy.setmember = setmember
|
||||
|
||||
#@ solidify:energy.init
|
||||
#@ solidify:energy.read
|
||||
#@ solidify:energy.member
|
||||
#@ solidify:energy.setmember
|
|
@ -1,6 +1,8 @@
|
|||
#-------------------------------------------------------------
|
||||
- Generic driver for AXP192 - solidified
|
||||
-------------------------------------------------------------#
|
||||
|
||||
#@ solidify:AXP192
|
||||
class AXP192 : I2C_Driver
|
||||
def init()
|
||||
super(self, I2C_Driver).init("AXP192", 0x34)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#-------------------------------------------------------------
|
||||
- Generic driver for AXP202 - solidified
|
||||
-------------------------------------------------------------#
|
||||
class AXP202 : I2C_Driver
|
||||
#@ solidify:AXP202
|
||||
class AXP202 : I2C_Driver
|
||||
def init()
|
||||
super(self, I2C_Driver).init("AXP202", 0x35)
|
||||
end
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#-------------------------------------------------------------
|
||||
- Driver for FT3663 - Capacitive Touch Screen
|
||||
-------------------------------------------------------------#
|
||||
class I2C_Driver end # for solidification
|
||||
|
||||
#@ solidify:FT3663
|
||||
class FT3663 : I2C_Driver
|
||||
static gest_id_codes = {
|
||||
0x00: 0x00,
|
||||
|
@ -90,4 +93,4 @@ class FT3663 : I2C_Driver
|
|||
|
||||
end
|
||||
|
||||
ts = FT3663()
|
||||
#ts = FT3663()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# class Leds_animator
|
||||
|
||||
#@ solidify:Leds_animator,weak
|
||||
class Leds_animator
|
||||
var strip # neopixelbus object
|
||||
var pixel_count # number of pixels in the strip
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#- ------------------------------------------------------------ -#
|
||||
lv_tasmota = module("lv_tasmota")
|
||||
|
||||
#@ solidify:lv_tasmota
|
||||
# rename `lv` to `lv_ntv` and replace `lv` with `lv_tasmota`
|
||||
def init(lv_tasmota)
|
||||
import lv
|
||||
|
|
|
@ -19,7 +19,10 @@ solidify.dump(lv_wifi_bars_icon, true)
|
|||
|
||||
-#
|
||||
|
||||
class lv_clock: lv.label
|
||||
class lv_label end # for solidification
|
||||
|
||||
#@ solidify:lv_clock
|
||||
class lv_clock: lv_label
|
||||
var hour, minute, sec
|
||||
|
||||
def init(parent)
|
||||
|
@ -57,6 +60,7 @@ class lv_clock: lv.label
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:lv_clock_icon
|
||||
class lv_clock_icon: lv_clock
|
||||
|
||||
def init(parent)
|
||||
|
@ -80,8 +84,10 @@ class lv_clock_icon: lv_clock
|
|||
end
|
||||
|
||||
# ##########################################################################################
|
||||
class lv_obj end # for solidification
|
||||
|
||||
class lv_signal_arcs : lv.obj
|
||||
#@ solidify:lv_signal_arcs
|
||||
class lv_signal_arcs : lv_obj
|
||||
var percentage # value to display, range 0..100
|
||||
var p1, p2, area, arc_dsc # instances of objects kept to avoid re-instanciating at each call
|
||||
|
||||
|
@ -169,6 +175,7 @@ class lv_signal_arcs : lv.obj
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:lv_wifi_arcs
|
||||
class lv_wifi_arcs: lv_signal_arcs
|
||||
def init(parent)
|
||||
super(self).init(parent)
|
||||
|
@ -192,6 +199,7 @@ class lv_wifi_arcs: lv_signal_arcs
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:lv_wifi_arcs_icon
|
||||
class lv_wifi_arcs_icon: lv_wifi_arcs
|
||||
def init(parent)
|
||||
super(self).init(parent)
|
||||
|
@ -211,7 +219,8 @@ end
|
|||
|
||||
# ##########################################################################################
|
||||
|
||||
class lv_signal_bars : lv.obj
|
||||
#@ solidify:lv_signal_bars
|
||||
class lv_signal_bars : lv_obj
|
||||
var percentage # value to display, range 0..100
|
||||
var p1, p2, area, line_dsc # instances of objects kept to avoid re-instanciating at each call
|
||||
|
||||
|
@ -286,6 +295,7 @@ class lv_signal_bars : lv.obj
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:lv_wifi_bars
|
||||
class lv_wifi_bars: lv_signal_bars
|
||||
def init(parent)
|
||||
super(self).init(parent)
|
||||
|
@ -309,6 +319,7 @@ class lv_wifi_bars: lv_signal_bars
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:lv_wifi_bars_icon
|
||||
class lv_wifi_bars_icon: lv_wifi_bars
|
||||
def init(parent)
|
||||
super(self).init(parent)
|
||||
|
|
|
@ -17,7 +17,7 @@ print("Ok")
|
|||
|
||||
class MQTT_ntv end # for solidification only
|
||||
|
||||
|
||||
#@ solidify:MQTT
|
||||
class MQTT : MQTT_ntv
|
||||
var topics
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# Python compatibility
|
||||
|
||||
python_compat = module('python_compat')
|
||||
|
||||
#@ solidify:python_compat
|
||||
python_compat.init = def (m)
|
||||
import global
|
||||
global.True = true
|
||||
global.False = false
|
||||
global.None = nil
|
||||
global.b = bytes
|
||||
return m
|
||||
end
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
var tapp_module = module("tapp")
|
||||
|
||||
#@ solidify:tapp_module
|
||||
tapp_module.init = def (m)
|
||||
|
||||
class Tapp
|
||||
|
|
|
@ -1,35 +1,7 @@
|
|||
#- Native code used for testing and code solidification -#
|
||||
#- Do not use it -#
|
||||
|
||||
#@ solidify:Trigger
|
||||
class Trigger
|
||||
var trig, f, id
|
||||
var o # optional object
|
||||
def init(trig, f, id, o)
|
||||
self.trig = trig
|
||||
self.f = f
|
||||
self.id = id
|
||||
self.o = o
|
||||
end
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: %s(%s, %s, %s)", str(classof(self)),
|
||||
str(self.trig), str(self.f), str(self.id))
|
||||
end
|
||||
# next() returns the next trigger, or 0 if rtc is invalid, or nil if no more
|
||||
def next()
|
||||
if self.o
|
||||
return self.o.next()
|
||||
end
|
||||
end
|
||||
|
||||
def time_reached()
|
||||
if self.o && self.trig > 0
|
||||
return self.o.time_reached(self.trig)
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
class Trigger end # for compilation
|
||||
|
||||
tasmota = nil
|
||||
#@ solidify:Tasmota
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#-
|
||||
ec = crypto.EC_C25519()
|
||||
|
||||
# Alice
|
||||
|
@ -14,6 +15,7 @@ psk = ec.shared_key(sk_A, pk_B)
|
|||
assert(psk == bytes('4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742'))
|
||||
psk2 = ec.shared_key(sk_B, pk_A)
|
||||
assert(psk2 == bytes('4a5d9d5ba4ce2de1728e3bf480350f25e07e21c947d19e3376f09b3c1e161742'))
|
||||
-#
|
||||
|
||||
#- test vectors from RFC77748
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#- Native code used for testing and code solidification -#
|
||||
#- Do not use it -#
|
||||
|
||||
#@ solidify:Trigger
|
||||
class Trigger
|
||||
var trig, f, id
|
||||
var o # optional object
|
||||
def init(trig, f, id, o)
|
||||
self.trig = trig
|
||||
self.f = f
|
||||
self.id = id
|
||||
self.o = o
|
||||
end
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: %s(%s, %s, %s)", str(classof(self)),
|
||||
str(self.trig), str(self.f), str(self.id))
|
||||
end
|
||||
# next() returns the next trigger, or 0 if rtc is invalid, or nil if no more
|
||||
def next()
|
||||
if self.o
|
||||
return self.o.next()
|
||||
end
|
||||
end
|
||||
|
||||
def time_reached()
|
||||
if self.o && self.trig > 0
|
||||
return self.o.time_reached(self.trig)
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
|
@ -1,5 +1,6 @@
|
|||
# zigbee code
|
||||
|
||||
#@ solidify:zb_device.tostring,weak
|
||||
class zb_device
|
||||
|
||||
def tostring()
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
class zb_coord_ntv end # fake class replaced with native one
|
||||
#zb_coord_ntv = classof(super(zigbee))
|
||||
|
||||
#@ solidify:zb_coord,weak
|
||||
class zb_coord : zb_coord_ntv
|
||||
var _handlers
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
class zcl_attribute_ntv end
|
||||
class zcl_attribute_list_ntv end
|
||||
|
||||
#@ solidify:zcl_attribute,weak
|
||||
class zcl_attribute : zcl_attribute_ntv
|
||||
|
||||
def init(ptr)
|
||||
|
@ -149,6 +150,7 @@ class zcl_attribute : zcl_attribute_ntv
|
|||
|
||||
end
|
||||
|
||||
#@ solidify:zcl_attribute_list,weak
|
||||
class zcl_attribute_list : zcl_attribute_list_ntv
|
||||
var shortaddr
|
||||
# in the bytes object we have:
|
||||
|
@ -238,6 +240,7 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
end
|
||||
end
|
||||
|
||||
#@ solidify:zcl_attributes,weak
|
||||
class zcl_attributes
|
||||
var shortaddr
|
||||
var groupaddr
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
class zcl_frame_ntv end
|
||||
|
||||
#@ solidify:zcl_frame,weak
|
||||
class zcl_frame : zcl_frame_ntv
|
||||
var no_bytes
|
||||
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
/* Solidification of Wire.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read_bytes
|
||||
********************************************************************/
|
||||
be_local_closure(Wire_read_bytes, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(_begin_transmission),
|
||||
/* K1 */ be_nested_str(_write),
|
||||
/* K2 */ be_nested_str(_end_transmission),
|
||||
/* K3 */ be_nested_str(_request_from),
|
||||
/* K4 */ be_nested_str(_available),
|
||||
/* K5 */ be_nested_str(_read),
|
||||
}),
|
||||
&be_const_str_read_bytes,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[24]) { /* code */
|
||||
0x8C100100, // 0000 GETMET R4 R0 K0
|
||||
0x5C180200, // 0001 MOVE R6 R1
|
||||
0x7C100400, // 0002 CALL R4 2
|
||||
0x8C100101, // 0003 GETMET R4 R0 K1
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C100400, // 0005 CALL R4 2
|
||||
0x8C100102, // 0006 GETMET R4 R0 K2
|
||||
0x50180000, // 0007 LDBOOL R6 0 0
|
||||
0x7C100400, // 0008 CALL R4 2
|
||||
0x8C100103, // 0009 GETMET R4 R0 K3
|
||||
0x5C180200, // 000A MOVE R6 R1
|
||||
0x5C1C0600, // 000B MOVE R7 R3
|
||||
0x7C100600, // 000C CALL R4 3
|
||||
0x60100015, // 000D GETGBL R4 G21
|
||||
0x5C140600, // 000E MOVE R5 R3
|
||||
0x7C100200, // 000F CALL R4 1
|
||||
0x8C140104, // 0010 GETMET R5 R0 K4
|
||||
0x7C140200, // 0011 CALL R5 1
|
||||
0x78160003, // 0012 JMPF R5 #0017
|
||||
0x8C140105, // 0013 GETMET R5 R0 K5
|
||||
0x7C140200, // 0014 CALL R5 1
|
||||
0x40140805, // 0015 CONNECT R5 R4 R5
|
||||
0x7001FFF8, // 0016 JMP #0010
|
||||
0x80040800, // 0017 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: write_bytes
|
||||
********************************************************************/
|
||||
be_local_closure(Wire_write_bytes, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(_begin_transmission),
|
||||
/* K1 */ be_nested_str(_write),
|
||||
/* K2 */ be_nested_str(_end_transmission),
|
||||
}),
|
||||
&be_const_str_write_bytes,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x8C100100, // 0000 GETMET R4 R0 K0
|
||||
0x5C180200, // 0001 MOVE R6 R1
|
||||
0x7C100400, // 0002 CALL R4 2
|
||||
0x8C100101, // 0003 GETMET R4 R0 K1
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C100400, // 0005 CALL R4 2
|
||||
0x8C100101, // 0006 GETMET R4 R0 K1
|
||||
0x5C180600, // 0007 MOVE R6 R3
|
||||
0x7C100400, // 0008 CALL R4 2
|
||||
0x8C100102, // 0009 GETMET R4 R0 K2
|
||||
0x7C100200, // 000A CALL R4 1
|
||||
0x80000000, // 000B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,127 @@
|
|||
/* Solidification of energy.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(energy_init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(global),
|
||||
/* K1 */ be_nested_str(_energy),
|
||||
/* K2 */ be_nested_str(energy_struct),
|
||||
/* K3 */ be_nested_str(_ptr),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xB80A0400, // 0001 GETNGBL R2 K2
|
||||
0x880C0103, // 0002 GETMBR R3 R0 K3
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x90060202, // 0004 SETMBR R1 K1 R2
|
||||
0x80040000, // 0005 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: read
|
||||
********************************************************************/
|
||||
be_local_closure(energy_read, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
/* K1 */ be_nested_str(tomap),
|
||||
}),
|
||||
&be_const_str_read,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0xB8020000, // 0000 GETNGBL R0 K0
|
||||
0x8C000101, // 0001 GETMET R0 R0 K1
|
||||
0x7C000200, // 0002 CALL R0 1
|
||||
0x80040000, // 0003 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(energy_member, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
}),
|
||||
&be_const_str_member,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x88040200, // 0001 GETMBR R1 R1 R0
|
||||
0x80040200, // 0002 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(energy_setmember, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
2, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(_energy),
|
||||
}),
|
||||
&be_const_str_setmember,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0xB80A0000, // 0000 GETNGBL R2 K0
|
||||
0x90080001, // 0001 SETMBR R2 R0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -1,6 +1,7 @@
|
|||
/********************************************************************
|
||||
* Tasmota LVGL lv_signal_bars widget
|
||||
*******************************************************************/
|
||||
/* Solidification of i2c_axp192.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
|
@ -69,7 +70,7 @@ be_local_closure(AXP192_get_bat_power, /* name */
|
|||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read24),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE1),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE0),
|
||||
}),
|
||||
&be_const_str_get_bat_power,
|
||||
&be_const_str_solidified,
|
||||
|
@ -980,7 +981,7 @@ be_local_class(AXP192,
|
|||
{ be_const_key(json_append, -1), be_const_closure(AXP192_json_append_closure) },
|
||||
{ be_const_key(get_input_power_status, -1), be_const_closure(AXP192_get_input_power_status_closure) },
|
||||
})),
|
||||
be_str_weak(AXP192)
|
||||
(bstring*) &be_const_str_AXP192
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
@ -989,3 +990,5 @@ void be_load_AXP192_class(bvm *vm) {
|
|||
be_setglobal(vm, "AXP192");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,911 @@
|
|||
/* Solidification of i2c_axp202.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_shutdown_time
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_shutdown_time, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_const_int(0),
|
||||
/* K1 */ be_const_int(1),
|
||||
/* K2 */ be_const_int(2),
|
||||
/* K3 */ be_const_int(3),
|
||||
/* K4 */ be_nested_str(write8),
|
||||
/* K5 */ be_nested_str(read8),
|
||||
}),
|
||||
&be_const_str_set_shutdown_time,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[24]) { /* code */
|
||||
0x58080000, // 0000 LDCONST R2 K0
|
||||
0x540E0005, // 0001 LDINT R3 6
|
||||
0x1C0C0203, // 0002 EQ R3 R1 R3
|
||||
0x780E0000, // 0003 JMPF R3 #0005
|
||||
0x58080001, // 0004 LDCONST R2 K1
|
||||
0x540E0007, // 0005 LDINT R3 8
|
||||
0x1C0C0203, // 0006 EQ R3 R1 R3
|
||||
0x780E0000, // 0007 JMPF R3 #0009
|
||||
0x58080002, // 0008 LDCONST R2 K2
|
||||
0x540E0009, // 0009 LDINT R3 10
|
||||
0x1C0C0203, // 000A EQ R3 R1 R3
|
||||
0x780E0000, // 000B JMPF R3 #000D
|
||||
0x58080003, // 000C LDCONST R2 K3
|
||||
0x8C0C0104, // 000D GETMET R3 R0 K4
|
||||
0x54160035, // 000E LDINT R5 54
|
||||
0x8C180105, // 000F GETMET R6 R0 K5
|
||||
0x54220035, // 0010 LDINT R8 54
|
||||
0x7C180400, // 0011 CALL R6 2
|
||||
0x541E00FB, // 0012 LDINT R7 252
|
||||
0x2C180C07, // 0013 AND R6 R6 R7
|
||||
0x2C1C0503, // 0014 AND R7 R2 K3
|
||||
0x30180C07, // 0015 OR R6 R6 R7
|
||||
0x7C0C0600, // 0016 CALL R3 3
|
||||
0x80000000, // 0017 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_vbus_current
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_vbus_current, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read12),
|
||||
/* K1 */ be_const_real_hex(0x3EC00000),
|
||||
}),
|
||||
&be_const_str_get_vbus_current,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E005B, // 0001 LDINT R3 92
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bat_voltage
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_bat_voltage, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read12),
|
||||
/* K1 */ be_const_real_hex(0x3A902DE0),
|
||||
}),
|
||||
&be_const_str_get_bat_voltage,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E0077, // 0001 LDINT R3 120
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bat_current
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_bat_current, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read13),
|
||||
/* K1 */ be_const_real_hex(0x3F000000),
|
||||
}),
|
||||
&be_const_str_get_bat_current,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E0079, // 0001 LDINT R3 122
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x8C080100, // 0003 GETMET R2 R0 K0
|
||||
0x5412007B, // 0004 LDINT R4 124
|
||||
0x7C080400, // 0005 CALL R2 2
|
||||
0x04040202, // 0006 SUB R1 R1 R2
|
||||
0x08040301, // 0007 MUL R1 R1 K1
|
||||
0x80040200, // 0008 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bat_power
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_bat_power, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read24),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE0),
|
||||
}),
|
||||
&be_const_str_get_bat_power,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E006F, // 0001 LDINT R3 112
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_aps_voltage
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_aps_voltage, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read12),
|
||||
/* K1 */ be_const_real_hex(0x3AB78035),
|
||||
}),
|
||||
&be_const_str_get_aps_voltage,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E007D, // 0001 LDINT R3 126
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_vbus_voltage
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_vbus_voltage, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read12),
|
||||
/* K1 */ be_const_real_hex(0x3ADED28A),
|
||||
}),
|
||||
&be_const_str_get_vbus_voltage,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E0059, // 0001 LDINT R3 90
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_ldo_enable
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_ldo_enable, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_const_int(2),
|
||||
/* K1 */ be_nested_str(write_bit),
|
||||
/* K2 */ be_const_int(3),
|
||||
}),
|
||||
&be_const_str_set_ldo_enable,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[23]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0004, // 0001 JMPF R3 #0007
|
||||
0x8C0C0101, // 0002 GETMET R3 R0 K1
|
||||
0x54160011, // 0003 LDINT R5 18
|
||||
0x58180000, // 0004 LDCONST R6 K0
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x7C0C0800, // 0006 CALL R3 4
|
||||
0x1C0C0302, // 0007 EQ R3 R1 K2
|
||||
0x780E0004, // 0008 JMPF R3 #000E
|
||||
0x8C0C0101, // 0009 GETMET R3 R0 K1
|
||||
0x54160011, // 000A LDINT R5 18
|
||||
0x541A0005, // 000B LDINT R6 6
|
||||
0x5C1C0400, // 000C MOVE R7 R2
|
||||
0x7C0C0800, // 000D CALL R3 4
|
||||
0x540E0003, // 000E LDINT R3 4
|
||||
0x1C0C0203, // 000F EQ R3 R1 R3
|
||||
0x780E0004, // 0010 JMPF R3 #0016
|
||||
0x8C0C0101, // 0011 GETMET R3 R0 K1
|
||||
0x54160011, // 0012 LDINT R5 18
|
||||
0x58180002, // 0013 LDCONST R6 K2
|
||||
0x5C1C0400, // 0014 MOVE R7 R2
|
||||
0x7C0C0800, // 0015 CALL R3 4
|
||||
0x80000000, // 0016 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: battery_present
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_battery_present, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(read),
|
||||
/* K2 */ be_nested_str(addr),
|
||||
/* K3 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_battery_present,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x58140003, // 0004 LDCONST R5 K3
|
||||
0x7C040800, // 0005 CALL R1 4
|
||||
0x540A001F, // 0006 LDINT R2 32
|
||||
0x2C040202, // 0007 AND R1 R1 R2
|
||||
0x78060002, // 0008 JMPF R1 #000C
|
||||
0x50040200, // 0009 LDBOOL R1 1 0
|
||||
0x80040200, // 000A RET 1 R1
|
||||
0x70020001, // 000B JMP #000E
|
||||
0x50040000, // 000C LDBOOL R1 0 0
|
||||
0x80040200, // 000D RET 1 R1
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_chg_current_ma
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_chg_current_ma, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(write8),
|
||||
/* K1 */ be_nested_str(read8),
|
||||
}),
|
||||
&be_const_str_set_chg_current_ma,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[16]) { /* code */
|
||||
0x540A012B, // 0000 LDINT R2 300
|
||||
0x04080202, // 0001 SUB R2 R1 R2
|
||||
0x540E0063, // 0002 LDINT R3 100
|
||||
0x0C080403, // 0003 DIV R2 R2 R3
|
||||
0x8C0C0100, // 0004 GETMET R3 R0 K0
|
||||
0x54160032, // 0005 LDINT R5 51
|
||||
0x8C180101, // 0006 GETMET R6 R0 K1
|
||||
0x54220032, // 0007 LDINT R8 51
|
||||
0x7C180400, // 0008 CALL R6 2
|
||||
0x541E00EF, // 0009 LDINT R7 240
|
||||
0x2C180C07, // 000A AND R6 R6 R7
|
||||
0x541E000E, // 000B LDINT R7 15
|
||||
0x2C1C0407, // 000C AND R7 R2 R7
|
||||
0x30180C07, // 000D OR R6 R6 R7
|
||||
0x7C0C0600, // 000E CALL R3 3
|
||||
0x80000000, // 000F RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_dcdc_enable
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_dcdc_enable, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_const_int(2),
|
||||
/* K1 */ be_nested_str(write_bit),
|
||||
/* K2 */ be_const_int(3),
|
||||
/* K3 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_set_dcdc_enable,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0004, // 0001 JMPF R3 #0007
|
||||
0x8C0C0101, // 0002 GETMET R3 R0 K1
|
||||
0x54160011, // 0003 LDINT R5 18
|
||||
0x541A0003, // 0004 LDINT R6 4
|
||||
0x5C1C0400, // 0005 MOVE R7 R2
|
||||
0x7C0C0800, // 0006 CALL R3 4
|
||||
0x1C0C0302, // 0007 EQ R3 R1 K2
|
||||
0x780E0004, // 0008 JMPF R3 #000E
|
||||
0x8C0C0101, // 0009 GETMET R3 R0 K1
|
||||
0x54160011, // 000A LDINT R5 18
|
||||
0x58180003, // 000B LDCONST R6 K3
|
||||
0x5C1C0400, // 000C MOVE R7 R2
|
||||
0x7C0C0800, // 000D CALL R3 4
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_chg_led_mode
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_chg_led_mode, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(read8),
|
||||
/* K1 */ be_const_int(3),
|
||||
/* K2 */ be_nested_str(write8),
|
||||
}),
|
||||
&be_const_str_set_chg_led_mode,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x54120031, // 0001 LDINT R4 50
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x540E00CE, // 0003 LDINT R3 207
|
||||
0x2C0C0403, // 0004 AND R3 R2 R3
|
||||
0x54120007, // 0005 LDINT R4 8
|
||||
0x300C0604, // 0006 OR R3 R3 R4
|
||||
0x5C080600, // 0007 MOVE R2 R3
|
||||
0x2C0C0301, // 0008 AND R3 R1 K1
|
||||
0x54120003, // 0009 LDINT R4 4
|
||||
0x380C0604, // 000A SHL R3 R3 R4
|
||||
0x30080403, // 000B OR R2 R2 R3
|
||||
0x8C0C0102, // 000C GETMET R3 R0 K2
|
||||
0x54160031, // 000D LDINT R5 50
|
||||
0x5C180400, // 000E MOVE R6 R2
|
||||
0x7C0C0600, // 000F CALL R3 3
|
||||
0x80000000, // 0010 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(I2C_Driver),
|
||||
/* K1 */ be_nested_str(init),
|
||||
/* K2 */ be_nested_str(AXP202),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0xB80E0000, // 0002 GETNGBL R3 K0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x8C040301, // 0004 GETMET R1 R1 K1
|
||||
0x580C0002, // 0005 LDCONST R3 K2
|
||||
0x54120034, // 0006 LDINT R4 53
|
||||
0x7C040600, // 0007 CALL R1 3
|
||||
0x80000000, // 0008 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_exten
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_exten, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(write_bit),
|
||||
/* K1 */ be_const_int(0),
|
||||
}),
|
||||
&be_const_str_set_exten,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x54120011, // 0001 LDINT R4 18
|
||||
0x58140001, // 0002 LDCONST R5 K1
|
||||
0x5C180200, // 0003 MOVE R6 R1
|
||||
0x7C080800, // 0004 CALL R2 4
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_battery_chargin_status
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_battery_chargin_status, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(read),
|
||||
/* K2 */ be_nested_str(addr),
|
||||
/* K3 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_get_battery_chargin_status,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x58140003, // 0004 LDCONST R5 K3
|
||||
0x7C040800, // 0005 CALL R1 4
|
||||
0x80040200, // 0006 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_dc_voltage
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_dc_voltage, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_const_int(2),
|
||||
/* K1 */ be_const_int(3),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(write8),
|
||||
/* K4 */ be_nested_str(read8),
|
||||
}),
|
||||
&be_const_str_set_dc_voltage,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[44]) { /* code */
|
||||
0x140C0300, // 0000 LT R3 R1 K0
|
||||
0x740E0001, // 0001 JMPT R3 #0004
|
||||
0x240C0301, // 0002 GT R3 R1 K1
|
||||
0x780E0000, // 0003 JMPF R3 #0005
|
||||
0x80000600, // 0004 RET 0
|
||||
0x4C0C0000, // 0005 LDNIL R3
|
||||
0x541202BB, // 0006 LDINT R4 700
|
||||
0x14100404, // 0007 LT R4 R2 R4
|
||||
0x78120001, // 0008 JMPF R4 #000B
|
||||
0x580C0002, // 0009 LDCONST R3 K2
|
||||
0x70020010, // 000A JMP #001C
|
||||
0x54120DAB, // 000B LDINT R4 3500
|
||||
0x24100404, // 000C GT R4 R2 R4
|
||||
0x78120001, // 000D JMPF R4 #0010
|
||||
0x540E006F, // 000E LDINT R3 112
|
||||
0x7002000B, // 000F JMP #001C
|
||||
0x1C100300, // 0010 EQ R4 R1 K0
|
||||
0x78120004, // 0011 JMPF R4 #0017
|
||||
0x541208E2, // 0012 LDINT R4 2275
|
||||
0x24100404, // 0013 GT R4 R2 R4
|
||||
0x78120001, // 0014 JMPF R4 #0017
|
||||
0x540E003E, // 0015 LDINT R3 63
|
||||
0x70020004, // 0016 JMP #001C
|
||||
0x541202BB, // 0017 LDINT R4 700
|
||||
0x04100404, // 0018 SUB R4 R2 R4
|
||||
0x54160018, // 0019 LDINT R5 25
|
||||
0x0C100805, // 001A DIV R4 R4 R5
|
||||
0x5C0C0800, // 001B MOVE R3 R4
|
||||
0x54120022, // 001C LDINT R4 35
|
||||
0x1C140301, // 001D EQ R5 R1 K1
|
||||
0x78160000, // 001E JMPF R5 #0020
|
||||
0x54120026, // 001F LDINT R4 39
|
||||
0x8C140103, // 0020 GETMET R5 R0 K3
|
||||
0x5C1C0800, // 0021 MOVE R7 R4
|
||||
0x8C200104, // 0022 GETMET R8 R0 K4
|
||||
0x5C280800, // 0023 MOVE R10 R4
|
||||
0x7C200400, // 0024 CALL R8 2
|
||||
0x5426007F, // 0025 LDINT R9 128
|
||||
0x2C201009, // 0026 AND R8 R8 R9
|
||||
0x5426007E, // 0027 LDINT R9 127
|
||||
0x2C240609, // 0028 AND R9 R3 R9
|
||||
0x30201009, // 0029 OR R8 R8 R9
|
||||
0x7C140600, // 002A CALL R5 3
|
||||
0x80000000, // 002B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bat_charge_current
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_bat_charge_current, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read13),
|
||||
/* K1 */ be_const_real_hex(0x3F000000),
|
||||
}),
|
||||
&be_const_str_get_bat_charge_current,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E0079, // 0001 LDINT R3 122
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x80040200, // 0004 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_temp
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_temp, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(read12),
|
||||
/* K1 */ be_const_real_hex(0x3DCCCCCD),
|
||||
/* K2 */ be_const_real_hex(0x4310B333),
|
||||
}),
|
||||
&be_const_str_get_temp,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E005D, // 0001 LDINT R3 94
|
||||
0x7C040400, // 0002 CALL R1 2
|
||||
0x08040301, // 0003 MUL R1 R1 K1
|
||||
0x04040302, // 0004 SUB R1 R1 K2
|
||||
0x80040200, // 0005 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_ldo_voltage
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_ldo_voltage, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_const_int(2),
|
||||
/* K1 */ be_nested_str(write8),
|
||||
/* K2 */ be_nested_str(read8),
|
||||
}),
|
||||
&be_const_str_set_ldo_voltage,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[59]) { /* code */
|
||||
0x540E0CE3, // 0000 LDINT R3 3300
|
||||
0x240C0403, // 0001 GT R3 R2 R3
|
||||
0x780E0000, // 0002 JMPF R3 #0004
|
||||
0x540A000E, // 0003 LDINT R2 15
|
||||
0x1C0C0300, // 0004 EQ R3 R1 K0
|
||||
0x740E0002, // 0005 JMPT R3 #0009
|
||||
0x540E0003, // 0006 LDINT R3 4
|
||||
0x1C0C0203, // 0007 EQ R3 R1 R3
|
||||
0x780E0020, // 0008 JMPF R3 #002A
|
||||
0x540E0063, // 0009 LDINT R3 100
|
||||
0x0C0C0403, // 000A DIV R3 R2 R3
|
||||
0x54120011, // 000B LDINT R4 18
|
||||
0x040C0604, // 000C SUB R3 R3 R4
|
||||
0x5C080600, // 000D MOVE R2 R3
|
||||
0x1C0C0300, // 000E EQ R3 R1 K0
|
||||
0x780E000D, // 000F JMPF R3 #001E
|
||||
0x8C0C0101, // 0010 GETMET R3 R0 K1
|
||||
0x54160027, // 0011 LDINT R5 40
|
||||
0x8C180102, // 0012 GETMET R6 R0 K2
|
||||
0x54220027, // 0013 LDINT R8 40
|
||||
0x7C180400, // 0014 CALL R6 2
|
||||
0x541E000E, // 0015 LDINT R7 15
|
||||
0x2C180C07, // 0016 AND R6 R6 R7
|
||||
0x541E000E, // 0017 LDINT R7 15
|
||||
0x2C1C0407, // 0018 AND R7 R2 R7
|
||||
0x54220003, // 0019 LDINT R8 4
|
||||
0x381C0E08, // 001A SHL R7 R7 R8
|
||||
0x30180C07, // 001B OR R6 R6 R7
|
||||
0x7C0C0600, // 001C CALL R3 3
|
||||
0x7002000A, // 001D JMP #0029
|
||||
0x8C0C0101, // 001E GETMET R3 R0 K1
|
||||
0x54160027, // 001F LDINT R5 40
|
||||
0x8C180102, // 0020 GETMET R6 R0 K2
|
||||
0x54220027, // 0021 LDINT R8 40
|
||||
0x7C180400, // 0022 CALL R6 2
|
||||
0x541E00EF, // 0023 LDINT R7 240
|
||||
0x2C180C07, // 0024 AND R6 R6 R7
|
||||
0x541E000E, // 0025 LDINT R7 15
|
||||
0x2C1C0407, // 0026 AND R7 R2 R7
|
||||
0x30180C07, // 0027 OR R6 R6 R7
|
||||
0x7C0C0600, // 0028 CALL R3 3
|
||||
0x7002000F, // 0029 JMP #003A
|
||||
0x540E0018, // 002A LDINT R3 25
|
||||
0x0C0C0403, // 002B DIV R3 R2 R3
|
||||
0x5412001B, // 002C LDINT R4 28
|
||||
0x040C0604, // 002D SUB R3 R3 R4
|
||||
0x5C080600, // 002E MOVE R2 R3
|
||||
0x8C0C0101, // 002F GETMET R3 R0 K1
|
||||
0x54160027, // 0030 LDINT R5 40
|
||||
0x8C180102, // 0031 GETMET R6 R0 K2
|
||||
0x54220028, // 0032 LDINT R8 41
|
||||
0x7C180400, // 0033 CALL R6 2
|
||||
0x541E007F, // 0034 LDINT R7 128
|
||||
0x2C180C07, // 0035 AND R6 R6 R7
|
||||
0x541E007E, // 0036 LDINT R7 127
|
||||
0x2C1C0407, // 0037 AND R7 R2 R7
|
||||
0x30180C07, // 0038 OR R6 R6 R7
|
||||
0x7C0C0600, // 0039 CALL R3 3
|
||||
0x80000000, // 003A RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_limiting_off
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_set_limiting_off, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(write8),
|
||||
/* K1 */ be_nested_str(read8),
|
||||
/* K2 */ be_const_int(3),
|
||||
}),
|
||||
&be_const_str_set_limiting_off,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 8]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x540E002F, // 0001 LDINT R3 48
|
||||
0x8C100101, // 0002 GETMET R4 R0 K1
|
||||
0x541A002F, // 0003 LDINT R6 48
|
||||
0x7C100400, // 0004 CALL R4 2
|
||||
0x30100902, // 0005 OR R4 R4 K2
|
||||
0x7C040600, // 0006 CALL R1 3
|
||||
0x80000000, // 0007 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_input_power_status
|
||||
********************************************************************/
|
||||
be_local_closure(AXP202_get_input_power_status, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(read),
|
||||
/* K2 */ be_nested_str(addr),
|
||||
/* K3 */ be_const_int(0),
|
||||
/* K4 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_get_input_power_status,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x58140004, // 0004 LDCONST R5 K4
|
||||
0x7C040800, // 0005 CALL R1 4
|
||||
0x80040200, // 0006 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: AXP202
|
||||
********************************************************************/
|
||||
extern const bclass be_class_I2C_Driver;
|
||||
be_local_class(AXP202,
|
||||
0,
|
||||
&be_class_I2C_Driver,
|
||||
be_nested_map(21,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(set_shutdown_time, -1), be_const_closure(AXP202_set_shutdown_time_closure) },
|
||||
{ be_const_key(get_vbus_current, -1), be_const_closure(AXP202_get_vbus_current_closure) },
|
||||
{ be_const_key(get_aps_voltage, -1), be_const_closure(AXP202_get_aps_voltage_closure) },
|
||||
{ be_const_key(get_bat_current, -1), be_const_closure(AXP202_get_bat_current_closure) },
|
||||
{ be_const_key(get_bat_power, 2), be_const_closure(AXP202_get_bat_power_closure) },
|
||||
{ be_const_key(init, -1), be_const_closure(AXP202_init_closure) },
|
||||
{ be_const_key(get_vbus_voltage, -1), be_const_closure(AXP202_get_vbus_voltage_closure) },
|
||||
{ be_const_key(set_ldo_voltage, 14), be_const_closure(AXP202_set_ldo_voltage_closure) },
|
||||
{ be_const_key(battery_present, -1), be_const_closure(AXP202_battery_present_closure) },
|
||||
{ be_const_key(set_chg_current_ma, -1), be_const_closure(AXP202_set_chg_current_ma_closure) },
|
||||
{ be_const_key(set_dcdc_enable, -1), be_const_closure(AXP202_set_dcdc_enable_closure) },
|
||||
{ be_const_key(set_chg_led_mode, 7), be_const_closure(AXP202_set_chg_led_mode_closure) },
|
||||
{ be_const_key(set_ldo_enable, 5), be_const_closure(AXP202_set_ldo_enable_closure) },
|
||||
{ be_const_key(set_exten, -1), be_const_closure(AXP202_set_exten_closure) },
|
||||
{ be_const_key(get_temp, -1), be_const_closure(AXP202_get_temp_closure) },
|
||||
{ be_const_key(get_bat_voltage, 16), be_const_closure(AXP202_get_bat_voltage_closure) },
|
||||
{ be_const_key(get_bat_charge_current, 17), be_const_closure(AXP202_get_bat_charge_current_closure) },
|
||||
{ be_const_key(set_dc_voltage, 18), be_const_closure(AXP202_set_dc_voltage_closure) },
|
||||
{ be_const_key(get_battery_chargin_status, -1), be_const_closure(AXP202_get_battery_chargin_status_closure) },
|
||||
{ be_const_key(set_limiting_off, -1), be_const_closure(AXP202_set_limiting_off_closure) },
|
||||
{ be_const_key(get_input_power_status, -1), be_const_closure(AXP202_get_input_power_status_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_AXP202
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_AXP202_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_AXP202);
|
||||
be_setglobal(vm, "AXP202");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,256 @@
|
|||
/* Solidification of i2c_ft3663.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_100ms
|
||||
********************************************************************/
|
||||
be_local_closure(FT3663_every_100ms, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(ts_loop),
|
||||
}),
|
||||
&be_const_str_every_100ms,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060001, // 0001 JMPF R1 #0004
|
||||
0x8C040101, // 0002 GETMET R1 R0 K1
|
||||
0x7C040200, // 0003 CALL R1 1
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(FT3663_init, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str(init),
|
||||
/* K1 */ be_nested_str(FT3663),
|
||||
/* K2 */ be_nested_str(wire),
|
||||
/* K3 */ be_nested_str(read8),
|
||||
/* K4 */ be_nested_str(tasmota),
|
||||
/* K5 */ be_nested_str(log),
|
||||
/* K6 */ be_nested_str(I2C_X3A_X20ignoring_X20address_X200x38_X2C_X20not_X20FT3663),
|
||||
/* K7 */ be_const_int(2),
|
||||
/* K8 */ be_nested_str(TS_X20_X3A_X20FT3663_X20Touch_X20Screen_X20detected),
|
||||
/* K9 */ be_nested_str(write8),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_nested_str(add_driver),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[50]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x8C040300, // 0003 GETMET R1 R1 K0
|
||||
0x580C0001, // 0004 LDCONST R3 K1
|
||||
0x54120037, // 0005 LDINT R4 56
|
||||
0x7C040600, // 0006 CALL R1 3
|
||||
0x88040102, // 0007 GETMBR R1 R0 K2
|
||||
0x78060027, // 0008 JMPF R1 #0031
|
||||
0x8C040103, // 0009 GETMET R1 R0 K3
|
||||
0x540E00A7, // 000A LDINT R3 168
|
||||
0x7C040400, // 000B CALL R1 2
|
||||
0x8C080103, // 000C GETMET R2 R0 K3
|
||||
0x541200A2, // 000D LDINT R4 163
|
||||
0x7C080400, // 000E CALL R2 2
|
||||
0x540E0010, // 000F LDINT R3 17
|
||||
0x200C0203, // 0010 NE R3 R1 R3
|
||||
0x740E0002, // 0011 JMPT R3 #0015
|
||||
0x540E0063, // 0012 LDINT R3 100
|
||||
0x200C0403, // 0013 NE R3 R2 R3
|
||||
0x780E0007, // 0014 JMPF R3 #001D
|
||||
0xB80E0800, // 0015 GETNGBL R3 K4
|
||||
0x8C0C0705, // 0016 GETMET R3 R3 K5
|
||||
0x58140006, // 0017 LDCONST R5 K6
|
||||
0x58180007, // 0018 LDCONST R6 K7
|
||||
0x7C0C0600, // 0019 CALL R3 3
|
||||
0x4C0C0000, // 001A LDNIL R3
|
||||
0x90020403, // 001B SETMBR R0 K2 R3
|
||||
0x80000600, // 001C RET 0
|
||||
0xB80E0800, // 001D GETNGBL R3 K4
|
||||
0x8C0C0705, // 001E GETMET R3 R3 K5
|
||||
0x58140008, // 001F LDCONST R5 K8
|
||||
0x7C0C0400, // 0020 CALL R3 2
|
||||
0x8C0C0109, // 0021 GETMET R3 R0 K9
|
||||
0x5814000A, // 0022 LDCONST R5 K10
|
||||
0x5818000A, // 0023 LDCONST R6 K10
|
||||
0x7C0C0600, // 0024 CALL R3 3
|
||||
0x8C0C0109, // 0025 GETMET R3 R0 K9
|
||||
0x5416007F, // 0026 LDINT R5 128
|
||||
0x541A0015, // 0027 LDINT R6 22
|
||||
0x7C0C0600, // 0028 CALL R3 3
|
||||
0x8C0C0109, // 0029 GETMET R3 R0 K9
|
||||
0x54160087, // 002A LDINT R5 136
|
||||
0x541A000D, // 002B LDINT R6 14
|
||||
0x7C0C0600, // 002C CALL R3 3
|
||||
0xB80E0800, // 002D GETNGBL R3 K4
|
||||
0x8C0C070B, // 002E GETMET R3 R3 K11
|
||||
0x5C140000, // 002F MOVE R5 R0
|
||||
0x7C0C0400, // 0030 CALL R3 2
|
||||
0x80000000, // 0031 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: ts_loop
|
||||
********************************************************************/
|
||||
be_local_closure(FT3663_ts_loop, /* name */
|
||||
be_nested_proto(
|
||||
17, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(display),
|
||||
/* K2 */ be_nested_str(read_bytes),
|
||||
/* K3 */ be_nested_str(addr),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_const_int(2),
|
||||
/* K6 */ be_const_int(3),
|
||||
/* K7 */ be_nested_str(gest_id_codes),
|
||||
/* K8 */ be_nested_str(find),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str(touch_update),
|
||||
}),
|
||||
&be_const_str_ts_loop,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[63]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x74060000, // 0001 JMPT R1 #0003
|
||||
0x80000200, // 0002 RET 0
|
||||
0xA4060200, // 0003 IMPORT R1 K1
|
||||
0x88080100, // 0004 GETMBR R2 R0 K0
|
||||
0x8C080502, // 0005 GETMET R2 R2 K2
|
||||
0x88100103, // 0006 GETMBR R4 R0 K3
|
||||
0x58140004, // 0007 LDCONST R5 K4
|
||||
0x541A000E, // 0008 LDINT R6 15
|
||||
0x7C080800, // 0009 CALL R2 4
|
||||
0x940C0505, // 000A GETIDX R3 R2 K5
|
||||
0x5412000E, // 000B LDINT R4 15
|
||||
0x2C0C0604, // 000C AND R3 R3 R4
|
||||
0x94100506, // 000D GETIDX R4 R2 K6
|
||||
0x5416000E, // 000E LDINT R5 15
|
||||
0x2C100805, // 000F AND R4 R4 R5
|
||||
0x54160007, // 0010 LDINT R5 8
|
||||
0x38100805, // 0011 SHL R4 R4 R5
|
||||
0x54160003, // 0012 LDINT R5 4
|
||||
0x94140405, // 0013 GETIDX R5 R2 R5
|
||||
0x30100805, // 0014 OR R4 R4 R5
|
||||
0x54160004, // 0015 LDINT R5 5
|
||||
0x94140405, // 0016 GETIDX R5 R2 R5
|
||||
0x541A000E, // 0017 LDINT R6 15
|
||||
0x2C140A06, // 0018 AND R5 R5 R6
|
||||
0x541A0007, // 0019 LDINT R6 8
|
||||
0x38140A06, // 001A SHL R5 R5 R6
|
||||
0x541A0005, // 001B LDINT R6 6
|
||||
0x94180406, // 001C GETIDX R6 R2 R6
|
||||
0x30140A06, // 001D OR R5 R5 R6
|
||||
0x541A0006, // 001E LDINT R6 7
|
||||
0x94180406, // 001F GETIDX R6 R2 R6
|
||||
0x941C0506, // 0020 GETIDX R7 R2 K6
|
||||
0x54220008, // 0021 LDINT R8 9
|
||||
0x2C1C0E08, // 0022 AND R7 R7 R8
|
||||
0x54220007, // 0023 LDINT R8 8
|
||||
0x381C0E08, // 0024 SHL R7 R7 R8
|
||||
0x54220009, // 0025 LDINT R8 10
|
||||
0x94200408, // 0026 GETIDX R8 R2 R8
|
||||
0x301C0E08, // 0027 OR R7 R7 R8
|
||||
0x54220004, // 0028 LDINT R8 5
|
||||
0x94200408, // 0029 GETIDX R8 R2 R8
|
||||
0x5426000A, // 002A LDINT R9 11
|
||||
0x2C201009, // 002B AND R8 R8 R9
|
||||
0x54260007, // 002C LDINT R9 8
|
||||
0x38201009, // 002D SHL R8 R8 R9
|
||||
0x5426000B, // 002E LDINT R9 12
|
||||
0x94240409, // 002F GETIDX R9 R2 R9
|
||||
0x30201009, // 0030 OR R8 R8 R9
|
||||
0x5426000C, // 0031 LDINT R9 13
|
||||
0x94240409, // 0032 GETIDX R9 R2 R9
|
||||
0x88280107, // 0033 GETMBR R10 R0 K7
|
||||
0x8C281508, // 0034 GETMET R10 R10 K8
|
||||
0x94300509, // 0035 GETIDX R12 R2 K9
|
||||
0x58340004, // 0036 LDCONST R13 K4
|
||||
0x7C280600, // 0037 CALL R10 3
|
||||
0x8C2C030A, // 0038 GETMET R11 R1 K10
|
||||
0x5C340600, // 0039 MOVE R13 R3
|
||||
0x5C380800, // 003A MOVE R14 R4
|
||||
0x5C3C0A00, // 003B MOVE R15 R5
|
||||
0x5C401400, // 003C MOVE R16 R10
|
||||
0x7C2C0A00, // 003D CALL R11 5
|
||||
0x80000000, // 003E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: FT3663
|
||||
********************************************************************/
|
||||
extern const bclass be_class_I2C_Driver;
|
||||
be_local_class(FT3663,
|
||||
0,
|
||||
&be_class_I2C_Driver,
|
||||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(every_100ms, -1), be_const_closure(FT3663_every_100ms_closure) },
|
||||
{ be_const_key(ts_loop, 2), be_const_closure(FT3663_ts_loop_closure) },
|
||||
{ be_const_key(gest_id_codes, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
|
||||
be_const_map( * be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_int(0, 4), be_const_int(0) },
|
||||
{ be_const_key_int(72, -1), be_const_int(32) },
|
||||
{ be_const_key_int(16, 1), be_const_int(16) },
|
||||
{ be_const_key_int(73, 5), be_const_int(33) },
|
||||
{ be_const_key_int(28, -1), be_const_int(18) },
|
||||
{ be_const_key_int(24, -1), be_const_int(17) },
|
||||
{ be_const_key_int(20, -1), be_const_int(19) },
|
||||
})) ) } )) },
|
||||
{ be_const_key(init, 1), be_const_closure(FT3663_init_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_FT3663
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_FT3663_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_FT3663);
|
||||
be_setglobal(vm, "FT3663");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,379 @@
|
|||
/* Solidification of leds_animator.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(strip),
|
||||
/* K1 */ be_nested_str_weak(bri),
|
||||
/* K2 */ be_nested_str_weak(running),
|
||||
/* K3 */ be_nested_str_weak(pixel_count),
|
||||
/* K4 */ be_nested_str_weak(animators),
|
||||
/* K5 */ be_nested_str_weak(clear),
|
||||
/* K6 */ be_nested_str_weak(tasmota),
|
||||
/* K7 */ be_nested_str_weak(add_driver),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x540A0031, // 0001 LDINT R2 50
|
||||
0x90020202, // 0002 SETMBR R0 K1 R2
|
||||
0x50080000, // 0003 LDBOOL R2 0 0
|
||||
0x90020402, // 0004 SETMBR R0 K2 R2
|
||||
0x8C080303, // 0005 GETMET R2 R1 K3
|
||||
0x7C080200, // 0006 CALL R2 1
|
||||
0x90020602, // 0007 SETMBR R0 K3 R2
|
||||
0x60080012, // 0008 GETGBL R2 G18
|
||||
0x7C080000, // 0009 CALL R2 0
|
||||
0x90020802, // 000A SETMBR R0 K4 R2
|
||||
0x8C080105, // 000B GETMET R2 R0 K5
|
||||
0x7C080200, // 000C CALL R2 1
|
||||
0xB80A0C00, // 000D GETNGBL R2 K6
|
||||
0x8C080507, // 000E GETMET R2 R2 K7
|
||||
0x5C100000, // 000F MOVE R4 R0
|
||||
0x7C080400, // 0010 CALL R2 2
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: set_bri
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_set_bri, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(bri),
|
||||
}),
|
||||
be_str_weak(set_bri),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x80000000, // 0001 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: stop
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_stop, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(running),
|
||||
}),
|
||||
be_str_weak(stop),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x50040000, // 0000 LDBOOL R1 0 0
|
||||
0x90020001, // 0001 SETMBR R0 K0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: animate
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_animate, /* name */
|
||||
be_nested_proto(
|
||||
1, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
0, /* has constants */
|
||||
NULL, /* no const */
|
||||
be_str_weak(animate),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 1]) { /* code */
|
||||
0x80000000, // 0000 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: remove
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_remove, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tasmota),
|
||||
/* K1 */ be_nested_str_weak(remove_driver),
|
||||
}),
|
||||
be_str_weak(remove),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: every_50ms
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_every_50ms, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(running),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str_weak(animators),
|
||||
/* K3 */ be_nested_str_weak(is_running),
|
||||
/* K4 */ be_nested_str_weak(animate),
|
||||
/* K5 */ be_const_int(1),
|
||||
/* K6 */ be_nested_str_weak(remove),
|
||||
}),
|
||||
be_str_weak(every_50ms),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060015, // 0001 JMPF R1 #0018
|
||||
0x58040001, // 0002 LDCONST R1 K1
|
||||
0x6008000C, // 0003 GETGBL R2 G12
|
||||
0x880C0102, // 0004 GETMBR R3 R0 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x14080202, // 0006 LT R2 R1 R2
|
||||
0x780A000D, // 0007 JMPF R2 #0016
|
||||
0x88080102, // 0008 GETMBR R2 R0 K2
|
||||
0x94080401, // 0009 GETIDX R2 R2 R1
|
||||
0x8C0C0503, // 000A GETMET R3 R2 K3
|
||||
0x7C0C0200, // 000B CALL R3 1
|
||||
0x780E0003, // 000C JMPF R3 #0011
|
||||
0x8C0C0504, // 000D GETMET R3 R2 K4
|
||||
0x7C0C0200, // 000E CALL R3 1
|
||||
0x00040305, // 000F ADD R1 R1 K5
|
||||
0x70020003, // 0010 JMP #0015
|
||||
0x880C0102, // 0011 GETMBR R3 R0 K2
|
||||
0x8C0C0706, // 0012 GETMET R3 R3 K6
|
||||
0x5C140200, // 0013 MOVE R5 R1
|
||||
0x7C0C0400, // 0014 CALL R3 2
|
||||
0x7001FFEC, // 0015 JMP #0003
|
||||
0x8C080104, // 0016 GETMET R2 R0 K4
|
||||
0x7C080200, // 0017 CALL R2 1
|
||||
0x80000000, // 0018 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: get_bri
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_get_bri, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(bri),
|
||||
}),
|
||||
be_str_weak(get_bri),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 2]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x80040400, // 0001 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: start
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_start, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(running),
|
||||
}),
|
||||
be_str_weak(start),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x50040200, // 0000 LDBOOL R1 1 0
|
||||
0x90020001, // 0001 SETMBR R0 K0 R1
|
||||
0x80000000, // 0002 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: add_anim
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_add_anim, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(animators),
|
||||
/* K1 */ be_nested_str_weak(push),
|
||||
/* K2 */ be_nested_str_weak(run),
|
||||
}),
|
||||
be_str_weak(add_anim),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x8C080501, // 0001 GETMET R2 R2 K1
|
||||
0x5C100200, // 0002 MOVE R4 R1
|
||||
0x7C080400, // 0003 CALL R2 2
|
||||
0x8C080302, // 0004 GETMET R2 R1 K2
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: clear
|
||||
********************************************************************/
|
||||
be_local_closure(Leds_animator_clear, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(stop),
|
||||
/* K1 */ be_nested_str_weak(strip),
|
||||
/* K2 */ be_nested_str_weak(clear),
|
||||
}),
|
||||
be_str_weak(clear),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||
0x8C040302, // 0003 GETMET R1 R1 K2
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Leds_animator
|
||||
********************************************************************/
|
||||
be_local_class(Leds_animator,
|
||||
5,
|
||||
NULL,
|
||||
be_nested_map(15,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(init, 12), be_const_closure(Leds_animator_init_closure) },
|
||||
{ be_const_key_weak(clear, -1), be_const_closure(Leds_animator_clear_closure) },
|
||||
{ be_const_key_weak(stop, -1), be_const_closure(Leds_animator_stop_closure) },
|
||||
{ be_const_key_weak(strip, 4), be_const_var(0) },
|
||||
{ be_const_key_weak(pixel_count, 6), be_const_var(1) },
|
||||
{ be_const_key_weak(animate, -1), be_const_closure(Leds_animator_animate_closure) },
|
||||
{ be_const_key_weak(add_anim, 13), be_const_closure(Leds_animator_add_anim_closure) },
|
||||
{ be_const_key_weak(bri, -1), be_const_var(2) },
|
||||
{ be_const_key_weak(every_50ms, -1), be_const_closure(Leds_animator_every_50ms_closure) },
|
||||
{ be_const_key_weak(remove, 7), be_const_closure(Leds_animator_remove_closure) },
|
||||
{ be_const_key_weak(get_bri, -1), be_const_closure(Leds_animator_get_bri_closure) },
|
||||
{ be_const_key_weak(start, -1), be_const_closure(Leds_animator_start_closure) },
|
||||
{ be_const_key_weak(running, -1), be_const_var(3) },
|
||||
{ be_const_key_weak(animators, -1), be_const_var(4) },
|
||||
{ be_const_key_weak(set_bri, 1), be_const_closure(Leds_animator_set_bri_closure) },
|
||||
})),
|
||||
be_str_weak(Leds_animator)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Leds_animator_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Leds_animator);
|
||||
be_setglobal(vm, "Leds_animator");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,533 @@
|
|||
/* Solidification of lv_tasmota.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: splash_remove
|
||||
********************************************************************/
|
||||
be_local_closure(lv_tasmota_splash_remove, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(lv),
|
||||
/* K1 */ be_nested_str(_splash),
|
||||
/* K2 */ be_nested_str(del),
|
||||
}),
|
||||
&be_const_str_splash_remove,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xB8020000, // 0000 GETNGBL R0 K0
|
||||
0x88000101, // 0001 GETMBR R0 R0 K1
|
||||
0x78020004, // 0002 JMPF R0 #0008
|
||||
0xB8060000, // 0003 GETNGBL R1 K0
|
||||
0x4C080000, // 0004 LDNIL R2
|
||||
0x90060202, // 0005 SETMBR R1 K1 R2
|
||||
0x8C040102, // 0006 GETMET R1 R0 K2
|
||||
0x7C040200, // 0007 CALL R1 1
|
||||
0x80000000, // 0008 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(splash_runner_init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(add_driver),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: display
|
||||
********************************************************************/
|
||||
be_local_closure(splash_runner_display, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str(display),
|
||||
/* K1 */ be_nested_str(dim),
|
||||
/* K2 */ be_nested_str(started),
|
||||
/* K3 */ be_nested_str(tasmota),
|
||||
/* K4 */ be_nested_str(remove_driver),
|
||||
/* K5 */ be_nested_str(lv),
|
||||
/* K6 */ be_nested_str(splash),
|
||||
}),
|
||||
&be_const_str_display,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0xA4160000, // 0000 IMPORT R5 K0
|
||||
0x1C180301, // 0001 EQ R6 R1 K1
|
||||
0x781A0009, // 0002 JMPF R6 #000D
|
||||
0x8C180B02, // 0003 GETMET R6 R5 K2
|
||||
0x7C180200, // 0004 CALL R6 1
|
||||
0x781A0006, // 0005 JMPF R6 #000D
|
||||
0xB81A0600, // 0006 GETNGBL R6 K3
|
||||
0x8C180D04, // 0007 GETMET R6 R6 K4
|
||||
0x5C200000, // 0008 MOVE R8 R0
|
||||
0x7C180400, // 0009 CALL R6 2
|
||||
0xB81A0A00, // 000A GETNGBL R6 K5
|
||||
0x8C180D06, // 000B GETMET R6 R6 K6
|
||||
0x7C180200, // 000C CALL R6 1
|
||||
0x80000000, // 000D RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: splash_runner
|
||||
********************************************************************/
|
||||
be_local_class(splash_runner,
|
||||
0,
|
||||
NULL,
|
||||
be_nested_map(2,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(display, -1), be_const_closure(splash_runner_display_closure) },
|
||||
{ be_const_key(init, 0), be_const_closure(splash_runner_init_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_splash_runner
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: splash_init
|
||||
********************************************************************/
|
||||
be_local_closure(lv_tasmota_splash_init, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(display),
|
||||
/* K1 */ be_nested_str(started),
|
||||
/* K2 */ be_nested_str(lv),
|
||||
/* K3 */ be_nested_str(splash),
|
||||
/* K4 */ be_const_class(be_class_splash_runner),
|
||||
}),
|
||||
&be_const_str_splash_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[13]) { /* code */
|
||||
0xA4020000, // 0000 IMPORT R0 K0
|
||||
0x8C040101, // 0001 GETMET R1 R0 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x78060003, // 0003 JMPF R1 #0008
|
||||
0xB8060400, // 0004 GETNGBL R1 K2
|
||||
0x8C040303, // 0005 GETMET R1 R1 K3
|
||||
0x7C040200, // 0006 CALL R1 1
|
||||
0x70020003, // 0007 JMP #000C
|
||||
0x58040004, // 0008 LDCONST R1 K4
|
||||
0xB4000004, // 0009 CLASS K4
|
||||
0x5C080200, // 000A MOVE R2 R1
|
||||
0x7C080000, // 000B CALL R2 0
|
||||
0x80000000, // 000C RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: splash
|
||||
********************************************************************/
|
||||
be_local_closure(lv_tasmota_splash, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[42]) { /* constants */
|
||||
/* K0 */ be_nested_str(display),
|
||||
/* K1 */ be_nested_str(started),
|
||||
/* K2 */ be_nested_str(lv),
|
||||
/* K3 */ be_nested_str(start),
|
||||
/* K4 */ be_nested_str(obj),
|
||||
/* K5 */ be_nested_str(scr_act),
|
||||
/* K6 */ be_nested_str(montserrat_font),
|
||||
/* K7 */ be_nested_str(color),
|
||||
/* K8 */ be_nested_str(COLOR_WHITE),
|
||||
/* K9 */ be_nested_str(set_style_bg_color),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_nested_str(set_style_radius),
|
||||
/* K12 */ be_nested_str(set_style_pad_all),
|
||||
/* K13 */ be_nested_str(set_style_border_width),
|
||||
/* K14 */ be_nested_str(set_size),
|
||||
/* K15 */ be_nested_str(pct),
|
||||
/* K16 */ be_nested_str(refr_pos),
|
||||
/* K17 */ be_nested_str(refr_size),
|
||||
/* K18 */ be_nested_str(set_user_data),
|
||||
/* K19 */ be_const_int(1399876712),
|
||||
/* K20 */ be_nested_str(img),
|
||||
/* K21 */ be_nested_str(set_tasmota_logo),
|
||||
/* K22 */ be_nested_str(set_zoom),
|
||||
/* K23 */ be_nested_str(set_style_img_recolor_opa),
|
||||
/* K24 */ be_nested_str(set_style_img_recolor),
|
||||
/* K25 */ be_nested_str(set_align),
|
||||
/* K26 */ be_nested_str(ALIGN_LEFT_MID),
|
||||
/* K27 */ be_nested_str(set_x),
|
||||
/* K28 */ be_nested_str(label),
|
||||
/* K29 */ be_nested_str(set_style_text_color),
|
||||
/* K30 */ be_nested_str(set_text),
|
||||
/* K31 */ be_nested_str(TASMOTA),
|
||||
/* K32 */ be_nested_str(get_hor_res),
|
||||
/* K33 */ be_nested_str(set_style_text_font),
|
||||
/* K34 */ be_nested_str(driver_name),
|
||||
/* K35 */ be_nested_str(ALIGN_BOTTOM_MID),
|
||||
/* K36 */ be_const_int(16777215),
|
||||
/* K37 */ be_nested_str(refr_now),
|
||||
/* K38 */ be_nested_str(_splash),
|
||||
/* K39 */ be_nested_str(tasmota),
|
||||
/* K40 */ be_nested_str(set_timer),
|
||||
/* K41 */ be_nested_str(splash_remove),
|
||||
}),
|
||||
&be_const_str_splash,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[166]) { /* code */
|
||||
0xA4020000, // 0000 IMPORT R0 K0
|
||||
0x8C040101, // 0001 GETMET R1 R0 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x74060000, // 0003 JMPT R1 #0005
|
||||
0x80000200, // 0004 RET 0
|
||||
0xB8060400, // 0005 GETNGBL R1 K2
|
||||
0x8C040303, // 0006 GETMET R1 R1 K3
|
||||
0x7C040200, // 0007 CALL R1 1
|
||||
0xB8060400, // 0008 GETNGBL R1 K2
|
||||
0x8C040304, // 0009 GETMET R1 R1 K4
|
||||
0xB80E0400, // 000A GETNGBL R3 K2
|
||||
0x8C0C0705, // 000B GETMET R3 R3 K5
|
||||
0x7C0C0200, // 000C CALL R3 1
|
||||
0x7C040400, // 000D CALL R1 2
|
||||
0xB80A0400, // 000E GETNGBL R2 K2
|
||||
0x8C080506, // 000F GETMET R2 R2 K6
|
||||
0x5412001B, // 0010 LDINT R4 28
|
||||
0x7C080400, // 0011 CALL R2 2
|
||||
0xB80E0400, // 0012 GETNGBL R3 K2
|
||||
0x8C0C0706, // 0013 GETMET R3 R3 K6
|
||||
0x54160013, // 0014 LDINT R5 20
|
||||
0x7C0C0400, // 0015 CALL R3 2
|
||||
0xB8120400, // 0016 GETNGBL R4 K2
|
||||
0x8C100907, // 0017 GETMET R4 R4 K7
|
||||
0xB81A0400, // 0018 GETNGBL R6 K2
|
||||
0x88180D08, // 0019 GETMBR R6 R6 K8
|
||||
0x7C100400, // 001A CALL R4 2
|
||||
0x8C140309, // 001B GETMET R5 R1 K9
|
||||
0xB81E0400, // 001C GETNGBL R7 K2
|
||||
0x8C1C0F07, // 001D GETMET R7 R7 K7
|
||||
0x54260065, // 001E LDINT R9 102
|
||||
0x7C1C0400, // 001F CALL R7 2
|
||||
0x5820000A, // 0020 LDCONST R8 K10
|
||||
0x7C140600, // 0021 CALL R5 3
|
||||
0x8C14030B, // 0022 GETMET R5 R1 K11
|
||||
0x581C000A, // 0023 LDCONST R7 K10
|
||||
0x5820000A, // 0024 LDCONST R8 K10
|
||||
0x7C140600, // 0025 CALL R5 3
|
||||
0x8C14030C, // 0026 GETMET R5 R1 K12
|
||||
0x581C000A, // 0027 LDCONST R7 K10
|
||||
0x5820000A, // 0028 LDCONST R8 K10
|
||||
0x7C140600, // 0029 CALL R5 3
|
||||
0x8C14030D, // 002A GETMET R5 R1 K13
|
||||
0x581C000A, // 002B LDCONST R7 K10
|
||||
0x5820000A, // 002C LDCONST R8 K10
|
||||
0x7C140600, // 002D CALL R5 3
|
||||
0x8C14030E, // 002E GETMET R5 R1 K14
|
||||
0xB81E0400, // 002F GETNGBL R7 K2
|
||||
0x8C1C0F0F, // 0030 GETMET R7 R7 K15
|
||||
0x54260063, // 0031 LDINT R9 100
|
||||
0x7C1C0400, // 0032 CALL R7 2
|
||||
0xB8220400, // 0033 GETNGBL R8 K2
|
||||
0x8C20110F, // 0034 GETMET R8 R8 K15
|
||||
0x542A0063, // 0035 LDINT R10 100
|
||||
0x7C200400, // 0036 CALL R8 2
|
||||
0x7C140600, // 0037 CALL R5 3
|
||||
0x8C140310, // 0038 GETMET R5 R1 K16
|
||||
0x7C140200, // 0039 CALL R5 1
|
||||
0x8C140311, // 003A GETMET R5 R1 K17
|
||||
0x7C140200, // 003B CALL R5 1
|
||||
0x8C140312, // 003C GETMET R5 R1 K18
|
||||
0x581C0013, // 003D LDCONST R7 K19
|
||||
0x7C140400, // 003E CALL R5 2
|
||||
0xB8160400, // 003F GETNGBL R5 K2
|
||||
0x8C140B14, // 0040 GETMET R5 R5 K20
|
||||
0x5C1C0200, // 0041 MOVE R7 R1
|
||||
0x7C140400, // 0042 CALL R5 2
|
||||
0x8C180B15, // 0043 GETMET R6 R5 K21
|
||||
0x7C180200, // 0044 CALL R6 1
|
||||
0x8C180B16, // 0045 GETMET R6 R5 K22
|
||||
0x54220095, // 0046 LDINT R8 150
|
||||
0x7C180400, // 0047 CALL R6 2
|
||||
0x8C180B17, // 0048 GETMET R6 R5 K23
|
||||
0x542200FE, // 0049 LDINT R8 255
|
||||
0x5824000A, // 004A LDCONST R9 K10
|
||||
0x7C180600, // 004B CALL R6 3
|
||||
0x8C180B18, // 004C GETMET R6 R5 K24
|
||||
0x5C200800, // 004D MOVE R8 R4
|
||||
0x5824000A, // 004E LDCONST R9 K10
|
||||
0x7C180600, // 004F CALL R6 3
|
||||
0x8C180B19, // 0050 GETMET R6 R5 K25
|
||||
0xB8220400, // 0051 GETNGBL R8 K2
|
||||
0x8820111A, // 0052 GETMBR R8 R8 K26
|
||||
0x7C180400, // 0053 CALL R6 2
|
||||
0x8C180B1B, // 0054 GETMET R6 R5 K27
|
||||
0x5421FFF3, // 0055 LDINT R8 -12
|
||||
0x7C180400, // 0056 CALL R6 2
|
||||
0xB81A0400, // 0057 GETNGBL R6 K2
|
||||
0x8C180D1C, // 0058 GETMET R6 R6 K28
|
||||
0x5C200200, // 0059 MOVE R8 R1
|
||||
0x7C180400, // 005A CALL R6 2
|
||||
0x8C1C0D1D, // 005B GETMET R7 R6 K29
|
||||
0x5C240800, // 005C MOVE R9 R4
|
||||
0x5828000A, // 005D LDCONST R10 K10
|
||||
0x7C1C0600, // 005E CALL R7 3
|
||||
0x8C1C0D1E, // 005F GETMET R7 R6 K30
|
||||
0x5824001F, // 0060 LDCONST R9 K31
|
||||
0x7C1C0400, // 0061 CALL R7 2
|
||||
0xB81E0400, // 0062 GETNGBL R7 K2
|
||||
0x8C1C0F20, // 0063 GETMET R7 R7 K32
|
||||
0x7C1C0200, // 0064 CALL R7 1
|
||||
0x542200C7, // 0065 LDINT R8 200
|
||||
0x281C0E08, // 0066 GE R7 R7 R8
|
||||
0x781E0007, // 0067 JMPF R7 #0070
|
||||
0x4C1C0000, // 0068 LDNIL R7
|
||||
0x201C0407, // 0069 NE R7 R2 R7
|
||||
0x781E0003, // 006A JMPF R7 #006F
|
||||
0x8C1C0D21, // 006B GETMET R7 R6 K33
|
||||
0x5C240400, // 006C MOVE R9 R2
|
||||
0x5828000A, // 006D LDCONST R10 K10
|
||||
0x7C1C0600, // 006E CALL R7 3
|
||||
0x70020006, // 006F JMP #0077
|
||||
0x4C1C0000, // 0070 LDNIL R7
|
||||
0x201C0607, // 0071 NE R7 R3 R7
|
||||
0x781E0003, // 0072 JMPF R7 #0077
|
||||
0x8C1C0D21, // 0073 GETMET R7 R6 K33
|
||||
0x5C240600, // 0074 MOVE R9 R3
|
||||
0x5828000A, // 0075 LDCONST R10 K10
|
||||
0x7C1C0600, // 0076 CALL R7 3
|
||||
0x8C1C0D19, // 0077 GETMET R7 R6 K25
|
||||
0xB8260400, // 0078 GETNGBL R9 K2
|
||||
0x8824131A, // 0079 GETMBR R9 R9 K26
|
||||
0x7C1C0400, // 007A CALL R7 2
|
||||
0x8C1C0D1B, // 007B GETMET R7 R6 K27
|
||||
0x54260029, // 007C LDINT R9 42
|
||||
0x7C1C0400, // 007D CALL R7 2
|
||||
0x8C1C0122, // 007E GETMET R7 R0 K34
|
||||
0x7C1C0200, // 007F CALL R7 1
|
||||
0x4C200000, // 0080 LDNIL R8
|
||||
0x6024000C, // 0081 GETGBL R9 G12
|
||||
0x5C280E00, // 0082 MOVE R10 R7
|
||||
0x7C240200, // 0083 CALL R9 1
|
||||
0x2424130A, // 0084 GT R9 R9 K10
|
||||
0x78260012, // 0085 JMPF R9 #0099
|
||||
0xB8260400, // 0086 GETNGBL R9 K2
|
||||
0x8C24131C, // 0087 GETMET R9 R9 K28
|
||||
0x5C2C0200, // 0088 MOVE R11 R1
|
||||
0x7C240400, // 0089 CALL R9 2
|
||||
0x5C201200, // 008A MOVE R8 R9
|
||||
0x8C241119, // 008B GETMET R9 R8 K25
|
||||
0xB82E0400, // 008C GETNGBL R11 K2
|
||||
0x882C1723, // 008D GETMBR R11 R11 K35
|
||||
0x7C240400, // 008E CALL R9 2
|
||||
0x8C24111D, // 008F GETMET R9 R8 K29
|
||||
0xB82E0400, // 0090 GETNGBL R11 K2
|
||||
0x8C2C1707, // 0091 GETMET R11 R11 K7
|
||||
0x58340024, // 0092 LDCONST R13 K36
|
||||
0x7C2C0400, // 0093 CALL R11 2
|
||||
0x5830000A, // 0094 LDCONST R12 K10
|
||||
0x7C240600, // 0095 CALL R9 3
|
||||
0x8C24111E, // 0096 GETMET R9 R8 K30
|
||||
0x5C2C0E00, // 0097 MOVE R11 R7
|
||||
0x7C240400, // 0098 CALL R9 2
|
||||
0xB8260400, // 0099 GETNGBL R9 K2
|
||||
0x8C241325, // 009A GETMET R9 R9 K37
|
||||
0x582C000A, // 009B LDCONST R11 K10
|
||||
0x7C240400, // 009C CALL R9 2
|
||||
0xB8260400, // 009D GETNGBL R9 K2
|
||||
0x90264C01, // 009E SETMBR R9 K38 R1
|
||||
0xB8264E00, // 009F GETNGBL R9 K39
|
||||
0x8C241328, // 00A0 GETMET R9 R9 K40
|
||||
0x542E1387, // 00A1 LDINT R11 5000
|
||||
0xB8320400, // 00A2 GETNGBL R12 K2
|
||||
0x88301929, // 00A3 GETMBR R12 R12 K41
|
||||
0x7C240600, // 00A4 CALL R9 3
|
||||
0x80000000, // 00A5 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(lv_tasmota_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[33]) { /* constants */
|
||||
/* K0 */ be_nested_str(lv),
|
||||
/* K1 */ be_nested_str(start),
|
||||
/* K2 */ be_nested_str(splash_init),
|
||||
/* K3 */ be_nested_str(splash_remove),
|
||||
/* K4 */ be_nested_str(splash),
|
||||
/* K5 */ be_nested_str(_splash),
|
||||
/* K6 */ be_nested_str(font_montserrat),
|
||||
/* K7 */ be_nested_str(montserrat_font),
|
||||
/* K8 */ be_nested_str(font_seg7),
|
||||
/* K9 */ be_nested_str(seg7_font),
|
||||
/* K10 */ be_nested_str(font_embedded),
|
||||
/* K11 */ be_nested_str(load_freetype_font),
|
||||
/* K12 */ be_nested_str(register_button_encoder),
|
||||
/* K13 */ be_nested_str(screenshot),
|
||||
/* K14 */ be_nested_str(clock),
|
||||
/* K15 */ be_nested_str(lv_clock),
|
||||
/* K16 */ be_nested_str(clock_icon),
|
||||
/* K17 */ be_nested_str(lv_clock_icon),
|
||||
/* K18 */ be_nested_str(signal_arcs),
|
||||
/* K19 */ be_nested_str(lv_signal_arcs),
|
||||
/* K20 */ be_nested_str(signal_bars),
|
||||
/* K21 */ be_nested_str(lv_signal_bars),
|
||||
/* K22 */ be_nested_str(wifi_arcs_icon),
|
||||
/* K23 */ be_nested_str(lv_wifi_arcs_icon),
|
||||
/* K24 */ be_nested_str(wifi_arcs),
|
||||
/* K25 */ be_nested_str(lv_wifi_arcs),
|
||||
/* K26 */ be_nested_str(wifi_bars_icon),
|
||||
/* K27 */ be_nested_str(lv_wifi_bars_icon),
|
||||
/* K28 */ be_nested_str(wifi_bars),
|
||||
/* K29 */ be_nested_str(lv_wifi_bars),
|
||||
/* K30 */ be_nested_str(tasmota),
|
||||
/* K31 */ be_nested_str(get_option),
|
||||
/* K32 */ be_const_int(0),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[53]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x90060202, // 0002 SETMBR R1 K1 R2
|
||||
0x88080102, // 0003 GETMBR R2 R0 K2
|
||||
0x90060402, // 0004 SETMBR R1 K2 R2
|
||||
0x88080103, // 0005 GETMBR R2 R0 K3
|
||||
0x90060602, // 0006 SETMBR R1 K3 R2
|
||||
0x88080104, // 0007 GETMBR R2 R0 K4
|
||||
0x90060802, // 0008 SETMBR R1 K4 R2
|
||||
0x4C080000, // 0009 LDNIL R2
|
||||
0x90060A02, // 000A SETMBR R1 K5 R2
|
||||
0x88080106, // 000B GETMBR R2 R0 K6
|
||||
0x90060C02, // 000C SETMBR R1 K6 R2
|
||||
0x88080106, // 000D GETMBR R2 R0 K6
|
||||
0x90060E02, // 000E SETMBR R1 K7 R2
|
||||
0x88080108, // 000F GETMBR R2 R0 K8
|
||||
0x90061002, // 0010 SETMBR R1 K8 R2
|
||||
0x88080108, // 0011 GETMBR R2 R0 K8
|
||||
0x90061202, // 0012 SETMBR R1 K9 R2
|
||||
0x8808010A, // 0013 GETMBR R2 R0 K10
|
||||
0x90061402, // 0014 SETMBR R1 K10 R2
|
||||
0x8808010B, // 0015 GETMBR R2 R0 K11
|
||||
0x90061602, // 0016 SETMBR R1 K11 R2
|
||||
0x8808010C, // 0017 GETMBR R2 R0 K12
|
||||
0x90061802, // 0018 SETMBR R1 K12 R2
|
||||
0x8808010D, // 0019 GETMBR R2 R0 K13
|
||||
0x90061A02, // 001A SETMBR R1 K13 R2
|
||||
0xB80A1E00, // 001B GETNGBL R2 K15
|
||||
0x90061C02, // 001C SETMBR R1 K14 R2
|
||||
0xB80A2200, // 001D GETNGBL R2 K17
|
||||
0x90062002, // 001E SETMBR R1 K16 R2
|
||||
0xB80A2600, // 001F GETNGBL R2 K19
|
||||
0x90062402, // 0020 SETMBR R1 K18 R2
|
||||
0xB80A2A00, // 0021 GETNGBL R2 K21
|
||||
0x90062802, // 0022 SETMBR R1 K20 R2
|
||||
0xB80A2E00, // 0023 GETNGBL R2 K23
|
||||
0x90062C02, // 0024 SETMBR R1 K22 R2
|
||||
0xB80A3200, // 0025 GETNGBL R2 K25
|
||||
0x90063002, // 0026 SETMBR R1 K24 R2
|
||||
0xB80A3600, // 0027 GETNGBL R2 K27
|
||||
0x90063402, // 0028 SETMBR R1 K26 R2
|
||||
0xB80A3A00, // 0029 GETNGBL R2 K29
|
||||
0x90063802, // 002A SETMBR R1 K28 R2
|
||||
0xB80A3C00, // 002B GETNGBL R2 K30
|
||||
0x8C08051F, // 002C GETMET R2 R2 K31
|
||||
0x54120086, // 002D LDINT R4 135
|
||||
0x7C080400, // 002E CALL R2 2
|
||||
0x1C080520, // 002F EQ R2 R2 K32
|
||||
0x780A0001, // 0030 JMPF R2 #0033
|
||||
0x8C080302, // 0031 GETMET R2 R1 K2
|
||||
0x7C080200, // 0032 CALL R2 1
|
||||
0x4C080000, // 0033 LDNIL R2
|
||||
0x80040400, // 0034 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: lv_tasmota
|
||||
********************************************************************/
|
||||
be_local_module(lv_tasmota,
|
||||
"lv_tasmota",
|
||||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(lv_tasmota_init_closure) },
|
||||
{ be_const_key(splash_init, -1), be_const_closure(lv_tasmota_splash_init_closure) },
|
||||
{ be_const_key(splash, -1), be_const_closure(lv_tasmota_splash_closure) },
|
||||
{ be_const_key(splash_remove, 0), be_const_closure(lv_tasmota_splash_remove_closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(lv_tasmota);
|
||||
/********************************************************************/
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,582 @@
|
|||
/* Solidification of mqtt.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_data
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_data, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_nested_str(closure),
|
||||
/* K2 */ be_nested_str(mqtt_data),
|
||||
/* K3 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_mqtt_data,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[32]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x4C180000, // 0001 LDNIL R6
|
||||
0x1C140A06, // 0002 EQ R5 R5 R6
|
||||
0x78160000, // 0003 JMPF R5 #0005
|
||||
0x80000A00, // 0004 RET 0
|
||||
0x50140000, // 0005 LDBOOL R5 0 0
|
||||
0x60180010, // 0006 GETGBL R6 G16
|
||||
0x881C0100, // 0007 GETMBR R7 R0 K0
|
||||
0x7C180200, // 0008 CALL R6 1
|
||||
0xA8020011, // 0009 EXBLK 0 #001C
|
||||
0x5C1C0C00, // 000A MOVE R7 R6
|
||||
0x7C1C0000, // 000B CALL R7 0
|
||||
0x88200F01, // 000C GETMBR R8 R7 K1
|
||||
0x4C240000, // 000D LDNIL R9
|
||||
0x20201009, // 000E NE R8 R8 R9
|
||||
0x7822000A, // 000F JMPF R8 #001B
|
||||
0x8C200F02, // 0010 GETMET R8 R7 K2
|
||||
0x5C280200, // 0011 MOVE R10 R1
|
||||
0x5C2C0400, // 0012 MOVE R11 R2
|
||||
0x5C300600, // 0013 MOVE R12 R3
|
||||
0x5C340800, // 0014 MOVE R13 R4
|
||||
0x7C200A00, // 0015 CALL R8 5
|
||||
0x74160001, // 0016 JMPT R5 #0019
|
||||
0x74220000, // 0017 JMPT R8 #0019
|
||||
0x50200001, // 0018 LDBOOL R8 0 1
|
||||
0x50200200, // 0019 LDBOOL R8 1 0
|
||||
0x5C141000, // 001A MOVE R5 R8
|
||||
0x7001FFED, // 001B JMP #000A
|
||||
0x58180003, // 001C LDCONST R6 K3
|
||||
0xAC180200, // 001D CATCH R6 1 0
|
||||
0xB0080000, // 001E RAISE 2 R0 R0
|
||||
0x80040A00, // 001F RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: lazy_init
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_lazy_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
1, /* has sup protos */
|
||||
( &(const struct bproto*[ 1]) {
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
1, /* has upvals */
|
||||
( &(const bupvaldesc[ 1]) { /* upvals */
|
||||
be_local_const_upval(1, 0),
|
||||
}),
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(mqtt_connect),
|
||||
}),
|
||||
&be_const_str__X3Clambda_X3E,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 4]) { /* code */
|
||||
0x68000000, // 0000 GETUPV R0 U0
|
||||
0x8C000100, // 0001 GETMET R0 R0 K0
|
||||
0x7C000200, // 0002 CALL R0 1
|
||||
0x80040000, // 0003 RET 1 R0
|
||||
})
|
||||
),
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_nested_str(tasmota),
|
||||
/* K2 */ be_nested_str(add_driver),
|
||||
/* K3 */ be_nested_str(add_rule),
|
||||
/* K4 */ be_nested_str(Mqtt_X23Connected),
|
||||
}),
|
||||
&be_const_str_lazy_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x4C080000, // 0001 LDNIL R2
|
||||
0x1C040202, // 0002 EQ R1 R1 R2
|
||||
0x7806000B, // 0003 JMPF R1 #0010
|
||||
0x60040012, // 0004 GETGBL R1 G18
|
||||
0x7C040000, // 0005 CALL R1 0
|
||||
0x90020001, // 0006 SETMBR R0 K0 R1
|
||||
0xB8060200, // 0007 GETNGBL R1 K1
|
||||
0x8C040302, // 0008 GETMET R1 R1 K2
|
||||
0x5C0C0000, // 0009 MOVE R3 R0
|
||||
0x7C040400, // 000A CALL R1 2
|
||||
0xB8060200, // 000B GETNGBL R1 K1
|
||||
0x8C040303, // 000C GETMET R1 R1 K3
|
||||
0x580C0004, // 000D LDCONST R3 K4
|
||||
0x84100000, // 000E CLOSURE R4 P0
|
||||
0x7C040600, // 000F CALL R1 3
|
||||
0xA0000000, // 0010 CLOSE R0
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: unsubscribe
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_unsubscribe, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(topics),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(fulltopic),
|
||||
/* K3 */ be_nested_str(_unsubscribe),
|
||||
/* K4 */ be_nested_str(remove),
|
||||
/* K5 */ be_const_int(1),
|
||||
}),
|
||||
&be_const_str_unsubscribe,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[41]) { /* code */
|
||||
0x88080100, // 0000 GETMBR R2 R0 K0
|
||||
0x4C0C0000, // 0001 LDNIL R3
|
||||
0x1C080403, // 0002 EQ R2 R2 R3
|
||||
0x780A0000, // 0003 JMPF R2 #0005
|
||||
0x80000400, // 0004 RET 0
|
||||
0x58080001, // 0005 LDCONST R2 K1
|
||||
0x600C000C, // 0006 GETGBL R3 G12
|
||||
0x88100100, // 0007 GETMBR R4 R0 K0
|
||||
0x7C0C0200, // 0008 CALL R3 1
|
||||
0x140C0403, // 0009 LT R3 R2 R3
|
||||
0x780E0016, // 000A JMPF R3 #0022
|
||||
0x4C0C0000, // 000B LDNIL R3
|
||||
0x1C0C0203, // 000C EQ R3 R1 R3
|
||||
0x740E0004, // 000D JMPT R3 #0013
|
||||
0x880C0100, // 000E GETMBR R3 R0 K0
|
||||
0x940C0602, // 000F GETIDX R3 R3 R2
|
||||
0x880C0702, // 0010 GETMBR R3 R3 K2
|
||||
0x1C0C0601, // 0011 EQ R3 R3 R1
|
||||
0x780E000C, // 0012 JMPF R3 #0020
|
||||
0x4C0C0000, // 0013 LDNIL R3
|
||||
0x1C0C0203, // 0014 EQ R3 R1 R3
|
||||
0x780E0004, // 0015 JMPF R3 #001B
|
||||
0x8C0C0103, // 0016 GETMET R3 R0 K3
|
||||
0x88140100, // 0017 GETMBR R5 R0 K0
|
||||
0x94140A02, // 0018 GETIDX R5 R5 R2
|
||||
0x88140B02, // 0019 GETMBR R5 R5 K2
|
||||
0x7C0C0400, // 001A CALL R3 2
|
||||
0x880C0100, // 001B GETMBR R3 R0 K0
|
||||
0x8C0C0704, // 001C GETMET R3 R3 K4
|
||||
0x5C140400, // 001D MOVE R5 R2
|
||||
0x7C0C0400, // 001E CALL R3 2
|
||||
0x70020000, // 001F JMP #0021
|
||||
0x00080505, // 0020 ADD R2 R2 K5
|
||||
0x7001FFE3, // 0021 JMP #0006
|
||||
0x4C0C0000, // 0022 LDNIL R3
|
||||
0x200C0203, // 0023 NE R3 R1 R3
|
||||
0x780E0002, // 0024 JMPF R3 #0028
|
||||
0x8C0C0103, // 0025 GETMET R3 R0 K3
|
||||
0x5C140200, // 0026 MOVE R5 R1
|
||||
0x7C0C0400, // 0027 CALL R3 2
|
||||
0x80000000, // 0028 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_connect
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_connect, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(log),
|
||||
/* K2 */ be_nested_str(BRY_X3A_X20mqtt_X20subscribe_X20all_X20registered_X20topics),
|
||||
/* K3 */ be_const_int(3),
|
||||
/* K4 */ be_nested_str(topics),
|
||||
/* K5 */ be_nested_str(fulltopic),
|
||||
/* K6 */ be_nested_str(_subscribe),
|
||||
/* K7 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_mqtt_connect,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x580C0002, // 0002 LDCONST R3 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x7C040600, // 0004 CALL R1 3
|
||||
0x60040010, // 0005 GETGBL R1 G16
|
||||
0x88080104, // 0006 GETMBR R2 R0 K4
|
||||
0x7C040200, // 0007 CALL R1 1
|
||||
0xA8020006, // 0008 EXBLK 0 #0010
|
||||
0x5C080200, // 0009 MOVE R2 R1
|
||||
0x7C080000, // 000A CALL R2 0
|
||||
0x880C0505, // 000B GETMBR R3 R2 K5
|
||||
0x8C100106, // 000C GETMET R4 R0 K6
|
||||
0x5C180600, // 000D MOVE R6 R3
|
||||
0x7C100400, // 000E CALL R4 2
|
||||
0x7001FFF8, // 000F JMP #0009
|
||||
0x58040007, // 0010 LDCONST R1 K7
|
||||
0xAC040200, // 0011 CATCH R1 1 0
|
||||
0xB0080000, // 0012 RAISE 2 R0 R0
|
||||
0x50040000, // 0013 LDBOOL R1 0 0
|
||||
0x80040200, // 0014 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_tostring, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X27_X25s_X27_X29_X3E),
|
||||
/* K3 */ be_nested_str(fulltopic),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140005, // 0003 GETGBL R5 G5
|
||||
0x5C180000, // 0004 MOVE R6 R0
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x88180103, // 0006 GETMBR R6 R0 K3
|
||||
0x7C080800, // 0007 CALL R2 4
|
||||
0x80040400, // 0008 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_init, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(fulltopic),
|
||||
/* K2 */ be_nested_str(topic),
|
||||
/* K3 */ be_nested_str(split),
|
||||
/* K4 */ be_nested_str(_X2F),
|
||||
/* K5 */ be_nested_str(closure),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xA40E0000, // 0000 IMPORT R3 K0
|
||||
0x90020201, // 0001 SETMBR R0 K1 R1
|
||||
0x8C100703, // 0002 GETMET R4 R3 K3
|
||||
0x5C180200, // 0003 MOVE R6 R1
|
||||
0x581C0004, // 0004 LDCONST R7 K4
|
||||
0x7C100600, // 0005 CALL R4 3
|
||||
0x90020404, // 0006 SETMBR R0 K2 R4
|
||||
0x90020A02, // 0007 SETMBR R0 K5 R2
|
||||
0x80000000, // 0008 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_data
|
||||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_mqtt_data, /* name */
|
||||
be_nested_proto(
|
||||
17, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 9]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(split),
|
||||
/* K2 */ be_nested_str(_X2F),
|
||||
/* K3 */ be_nested_str(topic),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str(_X23),
|
||||
/* K6 */ be_nested_str(_X2B),
|
||||
/* K7 */ be_const_int(1),
|
||||
/* K8 */ be_nested_str(closure),
|
||||
}),
|
||||
&be_const_str_mqtt_data,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[53]) { /* code */
|
||||
0xA4160000, // 0000 IMPORT R5 K0
|
||||
0x8C180B01, // 0001 GETMET R6 R5 K1
|
||||
0x5C200200, // 0002 MOVE R8 R1
|
||||
0x58240002, // 0003 LDCONST R9 K2
|
||||
0x7C180600, // 0004 CALL R6 3
|
||||
0x601C000C, // 0005 GETGBL R7 G12
|
||||
0x5C200C00, // 0006 MOVE R8 R6
|
||||
0x7C1C0200, // 0007 CALL R7 1
|
||||
0x88200103, // 0008 GETMBR R8 R0 K3
|
||||
0x6024000C, // 0009 GETGBL R9 G12
|
||||
0x5C281000, // 000A MOVE R10 R8
|
||||
0x7C240200, // 000B CALL R9 1
|
||||
0x58280004, // 000C LDCONST R10 K4
|
||||
0x142C1409, // 000D LT R11 R10 R9
|
||||
0x782E0013, // 000E JMPF R11 #0023
|
||||
0x942C100A, // 000F GETIDX R11 R8 R10
|
||||
0x1C301705, // 0010 EQ R12 R11 K5
|
||||
0x78320001, // 0011 JMPF R12 #0014
|
||||
0x7002000F, // 0012 JMP #0023
|
||||
0x7002000C, // 0013 JMP #0021
|
||||
0x28301407, // 0014 GE R12 R10 R7
|
||||
0x78320002, // 0015 JMPF R12 #0019
|
||||
0x50300000, // 0016 LDBOOL R12 0 0
|
||||
0x80041800, // 0017 RET 1 R12
|
||||
0x70020007, // 0018 JMP #0021
|
||||
0x1C301706, // 0019 EQ R12 R11 K6
|
||||
0x78320000, // 001A JMPF R12 #001C
|
||||
0x70020004, // 001B JMP #0021
|
||||
0x94300C0A, // 001C GETIDX R12 R6 R10
|
||||
0x2030160C, // 001D NE R12 R11 R12
|
||||
0x78320001, // 001E JMPF R12 #0021
|
||||
0x50300000, // 001F LDBOOL R12 0 0
|
||||
0x80041800, // 0020 RET 1 R12
|
||||
0x00281507, // 0021 ADD R10 R10 K7
|
||||
0x7001FFE9, // 0022 JMP #000D
|
||||
0x282C1409, // 0023 GE R11 R10 R9
|
||||
0x782E0003, // 0024 JMPF R11 #0029
|
||||
0x202C1207, // 0025 NE R11 R9 R7
|
||||
0x782E0001, // 0026 JMPF R11 #0029
|
||||
0x502C0000, // 0027 LDBOOL R11 0 0
|
||||
0x80041600, // 0028 RET 1 R11
|
||||
0x882C0108, // 0029 GETMBR R11 R0 K8
|
||||
0x5C301600, // 002A MOVE R12 R11
|
||||
0x5C340200, // 002B MOVE R13 R1
|
||||
0x5C380400, // 002C MOVE R14 R2
|
||||
0x5C3C0600, // 002D MOVE R15 R3
|
||||
0x5C400800, // 002E MOVE R16 R4
|
||||
0x7C300800, // 002F CALL R12 4
|
||||
0x4C340000, // 0030 LDNIL R13
|
||||
0x1C34180D, // 0031 EQ R13 R12 R13
|
||||
0x78360000, // 0032 JMPF R13 #0034
|
||||
0x50300200, // 0033 LDBOOL R12 1 0
|
||||
0x80041800, // 0034 RET 1 R12
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: mqtt_listener
|
||||
********************************************************************/
|
||||
be_local_class(mqtt_listener,
|
||||
3,
|
||||
NULL,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(mqtt_data, -1), be_const_closure(mqtt_listener_mqtt_data_closure) },
|
||||
{ be_const_key(tostring, -1), be_const_closure(mqtt_listener_tostring_closure) },
|
||||
{ be_const_key(topic, -1), be_const_var(0) },
|
||||
{ be_const_key(init, -1), be_const_closure(mqtt_listener_init_closure) },
|
||||
{ be_const_key(closure, 0), be_const_var(2) },
|
||||
{ be_const_key(fulltopic, -1), be_const_var(1) },
|
||||
})),
|
||||
(bstring*) &be_const_str_mqtt_listener
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: mqtt_listener_class
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_mqtt_listener_class, /* name */
|
||||
be_nested_proto(
|
||||
2, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_const_class(be_class_mqtt_listener),
|
||||
}),
|
||||
&be_const_str_mqtt_listener_class,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 3]) { /* code */
|
||||
0x58040000, // 0000 LDCONST R1 K0
|
||||
0xB4000000, // 0001 CLASS K0
|
||||
0x80040200, // 0002 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: subscribe
|
||||
********************************************************************/
|
||||
be_local_closure(MQTT_subscribe, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str(lazy_init),
|
||||
/* K1 */ be_nested_str(topics),
|
||||
/* K2 */ be_nested_str(fulltopic),
|
||||
/* K3 */ be_nested_str(closure),
|
||||
/* K4 */ be_nested_str(stop_iteration),
|
||||
/* K5 */ be_nested_str(mqtt_listener_class),
|
||||
/* K6 */ be_nested_str(function),
|
||||
/* K7 */ be_nested_str(tasmota),
|
||||
/* K8 */ be_nested_str(check_not_method),
|
||||
/* K9 */ be_nested_str(push),
|
||||
/* K10 */ be_nested_str(_subscribe),
|
||||
}),
|
||||
&be_const_str_subscribe,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[50]) { /* code */
|
||||
0x8C0C0100, // 0000 GETMET R3 R0 K0
|
||||
0x7C0C0200, // 0001 CALL R3 1
|
||||
0x500C0000, // 0002 LDBOOL R3 0 0
|
||||
0x60100010, // 0003 GETGBL R4 G16
|
||||
0x88140101, // 0004 GETMBR R5 R0 K1
|
||||
0x7C100200, // 0005 CALL R4 1
|
||||
0xA802000A, // 0006 EXBLK 0 #0012
|
||||
0x5C140800, // 0007 MOVE R5 R4
|
||||
0x7C140000, // 0008 CALL R5 0
|
||||
0x88180B02, // 0009 GETMBR R6 R5 K2
|
||||
0x1C180C01, // 000A EQ R6 R6 R1
|
||||
0x781A0004, // 000B JMPF R6 #0011
|
||||
0x88180B03, // 000C GETMBR R6 R5 K3
|
||||
0x1C180C02, // 000D EQ R6 R6 R2
|
||||
0x781A0001, // 000E JMPF R6 #0011
|
||||
0xA8040001, // 000F EXBLK 1 1
|
||||
0x80000C00, // 0010 RET 0
|
||||
0x7001FFF4, // 0011 JMP #0007
|
||||
0x58100004, // 0012 LDCONST R4 K4
|
||||
0xAC100200, // 0013 CATCH R4 1 0
|
||||
0xB0080000, // 0014 RAISE 2 R0 R0
|
||||
0x8C100105, // 0015 GETMET R4 R0 K5
|
||||
0x7C100200, // 0016 CALL R4 1
|
||||
0x60140004, // 0017 GETGBL R5 G4
|
||||
0x5C180400, // 0018 MOVE R6 R2
|
||||
0x7C140200, // 0019 CALL R5 1
|
||||
0x1C140B06, // 001A EQ R5 R5 K6
|
||||
0x7816000B, // 001B JMPF R5 #0028
|
||||
0xB8160E00, // 001C GETNGBL R5 K7
|
||||
0x8C140B08, // 001D GETMET R5 R5 K8
|
||||
0x5C1C0400, // 001E MOVE R7 R2
|
||||
0x7C140400, // 001F CALL R5 2
|
||||
0x88140101, // 0020 GETMBR R5 R0 K1
|
||||
0x8C140B09, // 0021 GETMET R5 R5 K9
|
||||
0x5C1C0800, // 0022 MOVE R7 R4
|
||||
0x5C200200, // 0023 MOVE R8 R1
|
||||
0x5C240400, // 0024 MOVE R9 R2
|
||||
0x7C1C0400, // 0025 CALL R7 2
|
||||
0x7C140400, // 0026 CALL R5 2
|
||||
0x70020005, // 0027 JMP #002E
|
||||
0x88140101, // 0028 GETMBR R5 R0 K1
|
||||
0x8C140B09, // 0029 GETMET R5 R5 K9
|
||||
0x5C1C0800, // 002A MOVE R7 R4
|
||||
0x5C200200, // 002B MOVE R8 R1
|
||||
0x7C1C0200, // 002C CALL R7 1
|
||||
0x7C140400, // 002D CALL R5 2
|
||||
0x8C14010A, // 002E GETMET R5 R0 K10
|
||||
0x5C1C0200, // 002F MOVE R7 R1
|
||||
0x7C140400, // 0030 CALL R5 2
|
||||
0x80000000, // 0031 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: MQTT
|
||||
********************************************************************/
|
||||
extern const bclass be_class_MQTT_ntv;
|
||||
be_local_class(MQTT,
|
||||
1,
|
||||
&be_class_MQTT_ntv,
|
||||
be_nested_map(7,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(mqtt_connect, -1), be_const_closure(MQTT_mqtt_connect_closure) },
|
||||
{ be_const_key(mqtt_data, -1), be_const_closure(MQTT_mqtt_data_closure) },
|
||||
{ be_const_key(lazy_init, -1), be_const_closure(MQTT_lazy_init_closure) },
|
||||
{ be_const_key(unsubscribe, -1), be_const_closure(MQTT_unsubscribe_closure) },
|
||||
{ be_const_key(topics, 0), be_const_var(0) },
|
||||
{ be_const_key(mqtt_listener_class, -1), be_const_closure(MQTT_mqtt_listener_class_closure) },
|
||||
{ be_const_key(subscribe, -1), be_const_closure(MQTT_subscribe_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_MQTT
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_MQTT_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_MQTT);
|
||||
be_setglobal(vm, "MQTT");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,59 @@
|
|||
/* Solidification of python_compat.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _anonymous_
|
||||
********************************************************************/
|
||||
be_local_closure(python_compat__anonymous_, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(global),
|
||||
/* K1 */ be_nested_str(True),
|
||||
/* K2 */ be_nested_str(False),
|
||||
/* K3 */ be_nested_str(None),
|
||||
/* K4 */ be_nested_str(b),
|
||||
}),
|
||||
&be_const_str__anonymous_,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x50080200, // 0001 LDBOOL R2 1 0
|
||||
0x90060202, // 0002 SETMBR R1 K1 R2
|
||||
0x50080000, // 0003 LDBOOL R2 0 0
|
||||
0x90060402, // 0004 SETMBR R1 K2 R2
|
||||
0x4C080000, // 0005 LDNIL R2
|
||||
0x90060602, // 0006 SETMBR R1 K3 R2
|
||||
0x60080015, // 0007 GETGBL R2 G21
|
||||
0x90060802, // 0008 SETMBR R1 K4 R2
|
||||
0x80040000, // 0009 RET 1 R0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: python_compat
|
||||
********************************************************************/
|
||||
be_local_module(python_compat,
|
||||
"python_compat",
|
||||
be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(python_compat__anonymous__closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(python_compat);
|
||||
/********************************************************************/
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,168 @@
|
|||
/* Solidification of tapp.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Tapp_init, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(add_driver),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C040400, // 0003 CALL R1 2
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: autoexec
|
||||
********************************************************************/
|
||||
be_local_closure(Tapp_autoexec, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str(path),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(listdir),
|
||||
/* K3 */ be_nested_str(_X2F),
|
||||
/* K4 */ be_nested_str(find),
|
||||
/* K5 */ be_nested_str(_X2Etapp),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str(tasmota),
|
||||
/* K8 */ be_nested_str(log),
|
||||
/* K9 */ be_nested_str(format),
|
||||
/* K10 */ be_nested_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str(load),
|
||||
/* K13 */ be_nested_str(_X23autoexec_X2Ebe),
|
||||
/* K14 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_autoexec,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[34]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x8C0C0302, // 0002 GETMET R3 R1 K2
|
||||
0x58140003, // 0003 LDCONST R5 K3
|
||||
0x7C0C0400, // 0004 CALL R3 2
|
||||
0x60100010, // 0005 GETGBL R4 G16
|
||||
0x5C140600, // 0006 MOVE R5 R3
|
||||
0x7C100200, // 0007 CALL R4 1
|
||||
0xA8020014, // 0008 EXBLK 0 #001E
|
||||
0x5C140800, // 0009 MOVE R5 R4
|
||||
0x7C140000, // 000A CALL R5 0
|
||||
0x8C180504, // 000B GETMET R6 R2 K4
|
||||
0x5C200A00, // 000C MOVE R8 R5
|
||||
0x58240005, // 000D LDCONST R9 K5
|
||||
0x7C180600, // 000E CALL R6 3
|
||||
0x24180D06, // 000F GT R6 R6 K6
|
||||
0x781A000B, // 0010 JMPF R6 #001D
|
||||
0xB81A0E00, // 0011 GETNGBL R6 K7
|
||||
0x8C180D08, // 0012 GETMET R6 R6 K8
|
||||
0x8C200509, // 0013 GETMET R8 R2 K9
|
||||
0x5828000A, // 0014 LDCONST R10 K10
|
||||
0x5C2C0A00, // 0015 MOVE R11 R5
|
||||
0x7C200600, // 0016 CALL R8 3
|
||||
0x5824000B, // 0017 LDCONST R9 K11
|
||||
0x7C180600, // 0018 CALL R6 3
|
||||
0xB81A0E00, // 0019 GETNGBL R6 K7
|
||||
0x8C180D0C, // 001A GETMET R6 R6 K12
|
||||
0x00200B0D, // 001B ADD R8 R5 K13
|
||||
0x7C180400, // 001C CALL R6 2
|
||||
0x7001FFEA, // 001D JMP #0009
|
||||
0x5810000E, // 001E LDCONST R4 K14
|
||||
0xAC100200, // 001F CATCH R4 1 0
|
||||
0xB0080000, // 0020 RAISE 2 R0 R0
|
||||
0x80000000, // 0021 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Tapp
|
||||
********************************************************************/
|
||||
be_local_class(Tapp,
|
||||
0,
|
||||
NULL,
|
||||
be_nested_map(2,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(autoexec, -1), be_const_closure(Tapp_autoexec_closure) },
|
||||
{ be_const_key(init, 0), be_const_closure(Tapp_init_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_Tapp
|
||||
);
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: _anonymous_
|
||||
********************************************************************/
|
||||
be_local_closure(tapp__anonymous_, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_const_class(be_class_Tapp),
|
||||
}),
|
||||
&be_const_str__anonymous_,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x58040000, // 0000 LDCONST R1 K0
|
||||
0xB4000000, // 0001 CLASS K0
|
||||
0x5C080200, // 0002 MOVE R2 R1
|
||||
0x7C080000, // 0003 CALL R2 0
|
||||
0x80040400, // 0004 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified module: tapp
|
||||
********************************************************************/
|
||||
be_local_module(tapp,
|
||||
"tapp",
|
||||
be_nested_map(1,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(init, -1), be_const_closure(tapp__anonymous__closure) },
|
||||
}))
|
||||
);
|
||||
BE_EXPORT_VARIABLE be_define_const_native_module(tapp);
|
||||
/********************************************************************/
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -4,188 +4,6 @@
|
|||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(trig),
|
||||
/* K1 */ be_nested_str(f),
|
||||
/* K2 */ be_nested_str(id),
|
||||
/* K3 */ be_nested_str(o),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||
0x90020604, // 0003 SETMBR R0 K3 R4
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
|
||||
/* K3 */ be_nested_str(trig),
|
||||
/* K4 */ be_nested_str(f),
|
||||
/* K5 */ be_nested_str(id),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140008, // 0003 GETGBL R5 G8
|
||||
0x60180006, // 0004 GETGBL R6 G6
|
||||
0x5C1C0000, // 0005 MOVE R7 R0
|
||||
0x7C180200, // 0006 CALL R6 1
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x60180008, // 0008 GETGBL R6 G8
|
||||
0x881C0103, // 0009 GETMBR R7 R0 K3
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x601C0008, // 000B GETGBL R7 G8
|
||||
0x88200104, // 000C GETMBR R8 R0 K4
|
||||
0x7C1C0200, // 000D CALL R7 1
|
||||
0x60200008, // 000E GETGBL R8 G8
|
||||
0x88240105, // 000F GETMBR R9 R0 K5
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x7C080C00, // 0011 CALL R2 6
|
||||
0x80040400, // 0012 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: time_reached
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_time_reached, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(trig),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(time_reached),
|
||||
}),
|
||||
&be_const_str_time_reached,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060007, // 0001 JMPF R1 #000A
|
||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||
0x24040302, // 0003 GT R1 R1 K2
|
||||
0x78060004, // 0004 JMPF R1 #000A
|
||||
0x88040100, // 0005 GETMBR R1 R0 K0
|
||||
0x8C040303, // 0006 GETMET R1 R1 K3
|
||||
0x880C0101, // 0007 GETMBR R3 R0 K1
|
||||
0x7C040400, // 0008 CALL R1 2
|
||||
0x80040200, // 0009 RET 1 R1
|
||||
0x50040000, // 000A LDBOOL R1 0 0
|
||||
0x80040200, // 000B RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: next
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_next, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(next),
|
||||
}),
|
||||
&be_const_str_next,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060003, // 0001 JMPF R1 #0006
|
||||
0x88040100, // 0002 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0003 GETMET R1 R1 K1
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80040200, // 0005 RET 1 R1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Trigger
|
||||
********************************************************************/
|
||||
be_local_class(Trigger,
|
||||
4,
|
||||
NULL,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(id, 2), be_const_var(2) },
|
||||
{ be_const_key(f, -1), be_const_var(1) },
|
||||
{ be_const_key(next, -1), be_const_closure(Trigger_next_closure) },
|
||||
{ be_const_key(trig, 7), be_const_var(0) },
|
||||
{ be_const_key(time_reached, -1), be_const_closure(Trigger_time_reached_closure) },
|
||||
{ be_const_key(tostring, 4), be_const_closure(Trigger_tostring_closure) },
|
||||
{ be_const_key(o, -1), be_const_var(3) },
|
||||
{ be_const_key(init, -1), be_const_closure(Trigger_init_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_Trigger
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Trigger_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Trigger);
|
||||
be_setglobal(vm, "Trigger");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: time_str
|
||||
********************************************************************/
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
/* Solidification of test_crypto.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,189 @@
|
|||
/* Solidification of trigger_class.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(trig),
|
||||
/* K1 */ be_nested_str(f),
|
||||
/* K2 */ be_nested_str(id),
|
||||
/* K3 */ be_nested_str(o),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 5]) { /* code */
|
||||
0x90020001, // 0000 SETMBR R0 K0 R1
|
||||
0x90020202, // 0001 SETMBR R0 K1 R2
|
||||
0x90020403, // 0002 SETMBR R0 K2 R3
|
||||
0x90020604, // 0003 SETMBR R0 K3 R4
|
||||
0x80000000, // 0004 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
|
||||
/* K3 */ be_nested_str(trig),
|
||||
/* K4 */ be_nested_str(f),
|
||||
/* K5 */ be_nested_str(id),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140008, // 0003 GETGBL R5 G8
|
||||
0x60180006, // 0004 GETGBL R6 G6
|
||||
0x5C1C0000, // 0005 MOVE R7 R0
|
||||
0x7C180200, // 0006 CALL R6 1
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x60180008, // 0008 GETGBL R6 G8
|
||||
0x881C0103, // 0009 GETMBR R7 R0 K3
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x601C0008, // 000B GETGBL R7 G8
|
||||
0x88200104, // 000C GETMBR R8 R0 K4
|
||||
0x7C1C0200, // 000D CALL R7 1
|
||||
0x60200008, // 000E GETGBL R8 G8
|
||||
0x88240105, // 000F GETMBR R9 R0 K5
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x7C080C00, // 0011 CALL R2 6
|
||||
0x80040400, // 0012 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: time_reached
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_time_reached, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(trig),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(time_reached),
|
||||
}),
|
||||
&be_const_str_time_reached,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[12]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060007, // 0001 JMPF R1 #000A
|
||||
0x88040101, // 0002 GETMBR R1 R0 K1
|
||||
0x24040302, // 0003 GT R1 R1 K2
|
||||
0x78060004, // 0004 JMPF R1 #000A
|
||||
0x88040100, // 0005 GETMBR R1 R0 K0
|
||||
0x8C040303, // 0006 GETMET R1 R1 K3
|
||||
0x880C0101, // 0007 GETMBR R3 R0 K1
|
||||
0x7C040400, // 0008 CALL R1 2
|
||||
0x80040200, // 0009 RET 1 R1
|
||||
0x50040000, // 000A LDBOOL R1 0 0
|
||||
0x80040200, // 000B RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: next
|
||||
********************************************************************/
|
||||
be_local_closure(Trigger_next, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(o),
|
||||
/* K1 */ be_nested_str(next),
|
||||
}),
|
||||
&be_const_str_next,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 7]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x78060003, // 0001 JMPF R1 #0006
|
||||
0x88040100, // 0002 GETMBR R1 R0 K0
|
||||
0x8C040301, // 0003 GETMET R1 R1 K1
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80040200, // 0005 RET 1 R1
|
||||
0x80000000, // 0006 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: Trigger
|
||||
********************************************************************/
|
||||
be_local_class(Trigger,
|
||||
4,
|
||||
NULL,
|
||||
be_nested_map(8,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key(id, 2), be_const_var(2) },
|
||||
{ be_const_key(f, -1), be_const_var(1) },
|
||||
{ be_const_key(next, -1), be_const_closure(Trigger_next_closure) },
|
||||
{ be_const_key(trig, 7), be_const_var(0) },
|
||||
{ be_const_key(time_reached, -1), be_const_closure(Trigger_time_reached_closure) },
|
||||
{ be_const_key(tostring, 4), be_const_closure(Trigger_tostring_closure) },
|
||||
{ be_const_key(o, -1), be_const_var(3) },
|
||||
{ be_const_key(init, -1), be_const_closure(Trigger_init_closure) },
|
||||
})),
|
||||
(bstring*) &be_const_str_Trigger
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_Trigger_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_Trigger);
|
||||
be_setglobal(vm, "Trigger");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,64 @@
|
|||
/* Solidification of zigbee.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zb_device_tostring, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(json),
|
||||
/* K1 */ be_nested_str_weak(string),
|
||||
/* K2 */ be_nested_str_weak(longaddr),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(_X3Cinstance_X3A_X20_X25s_X280x_X2504X_X2C_X200x_X2508X_X2508X_X2C_X20name_X3A_X27_X25s_X27_X2C_X20model_X3A_X27_X25s_X27_X2C_X20manufacturer_X3A_X27_X25s_X27_X29_X3E),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_const_int(0),
|
||||
/* K8 */ be_nested_str_weak(name),
|
||||
/* K9 */ be_nested_str_weak(model),
|
||||
/* K10 */ be_nested_str_weak(manufacturer),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[22]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x8C100503, // 0003 GETMET R4 R2 K3
|
||||
0x58180004, // 0004 LDCONST R6 K4
|
||||
0x601C0005, // 0005 GETGBL R7 G5
|
||||
0x5C200000, // 0006 MOVE R8 R0
|
||||
0x7C1C0200, // 0007 CALL R7 1
|
||||
0x88200105, // 0008 GETMBR R8 R0 K5
|
||||
0x8C240706, // 0009 GETMET R9 R3 K6
|
||||
0x542E0003, // 000A LDINT R11 4
|
||||
0x54320003, // 000B LDINT R12 4
|
||||
0x7C240600, // 000C CALL R9 3
|
||||
0x8C280706, // 000D GETMET R10 R3 K6
|
||||
0x58300007, // 000E LDCONST R12 K7
|
||||
0x54360003, // 000F LDINT R13 4
|
||||
0x7C280600, // 0010 CALL R10 3
|
||||
0x882C0108, // 0011 GETMBR R11 R0 K8
|
||||
0x88300109, // 0012 GETMBR R12 R0 K9
|
||||
0x8834010A, // 0013 GETMBR R13 R0 K10
|
||||
0x7C101200, // 0014 CALL R4 9
|
||||
0x80040800, // 0015 RET 1 R4
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
|
@ -0,0 +1,220 @@
|
|||
/* Solidification of zigbee_zb_coord.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_init, /* name */
|
||||
be_nested_proto(
|
||||
3, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x8C040300, // 0003 GETMET R1 R1 K0
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x80000000, // 0005 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: add_handler
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_add_handler, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(instance),
|
||||
/* K1 */ be_nested_str_weak(value_error),
|
||||
/* K2 */ be_nested_str_weak(instance_X20required),
|
||||
/* K3 */ be_nested_str_weak(_handlers),
|
||||
/* K4 */ be_nested_str_weak(push),
|
||||
}),
|
||||
be_str_weak(add_handler),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60080004, // 0000 GETGBL R2 G4
|
||||
0x5C0C0200, // 0001 MOVE R3 R1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x20080500, // 0003 NE R2 R2 K0
|
||||
0x780A0000, // 0004 JMPF R2 #0006
|
||||
0xB0060302, // 0005 RAISE 1 K1 K2
|
||||
0x88080103, // 0006 GETMBR R2 R0 K3
|
||||
0x780A0004, // 0007 JMPF R2 #000D
|
||||
0x88080103, // 0008 GETMBR R2 R0 K3
|
||||
0x8C080504, // 0009 GETMET R2 R2 K4
|
||||
0x5C100200, // 000A MOVE R4 R1
|
||||
0x7C080400, // 000B CALL R2 2
|
||||
0x70020003, // 000C JMP #0011
|
||||
0x60080012, // 000D GETGBL R2 G18
|
||||
0x7C080000, // 000E CALL R2 0
|
||||
0x400C0401, // 000F CONNECT R3 R2 R1
|
||||
0x90020602, // 0010 SETMBR R0 K3 R2
|
||||
0x80000000, // 0011 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: dispatch
|
||||
********************************************************************/
|
||||
be_local_closure(zb_coord_dispatch, /* name */
|
||||
be_nested_proto(
|
||||
21, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(_handlers),
|
||||
/* K1 */ be_nested_str_weak(introspect),
|
||||
/* K2 */ be_nested_str_weak(string),
|
||||
/* K3 */ be_nested_str_weak(toptr),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(zcl_frame),
|
||||
/* K6 */ be_nested_str_weak(zcl_attribute_list),
|
||||
/* K7 */ be_nested_str_weak(get),
|
||||
/* K8 */ be_nested_str_weak(function),
|
||||
/* K9 */ be_nested_str_weak(format),
|
||||
/* K10 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K11 */ be_nested_str_weak(tasmota),
|
||||
/* K12 */ be_nested_str_weak(_debug_present),
|
||||
/* K13 */ be_nested_str_weak(debug),
|
||||
/* K14 */ be_nested_str_weak(traceback),
|
||||
/* K15 */ be_const_int(1),
|
||||
}),
|
||||
be_str_weak(dispatch),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x4C180000, // 0001 LDNIL R6
|
||||
0x1C140A06, // 0002 EQ R5 R5 R6
|
||||
0x78160000, // 0003 JMPF R5 #0005
|
||||
0x80000A00, // 0004 RET 0
|
||||
0xA4160200, // 0005 IMPORT R5 K1
|
||||
0xA41A0400, // 0006 IMPORT R6 K2
|
||||
0x4C1C0000, // 0007 LDNIL R7
|
||||
0x4C200000, // 0008 LDNIL R8
|
||||
0x8C240B03, // 0009 GETMET R9 R5 K3
|
||||
0x582C0004, // 000A LDCONST R11 K4
|
||||
0x7C240400, // 000B CALL R9 2
|
||||
0x20280409, // 000C NE R10 R2 R9
|
||||
0x782A0003, // 000D JMPF R10 #0012
|
||||
0x8C280105, // 000E GETMET R10 R0 K5
|
||||
0x5C300400, // 000F MOVE R12 R2
|
||||
0x7C280400, // 0010 CALL R10 2
|
||||
0x5C1C1400, // 0011 MOVE R7 R10
|
||||
0x20280609, // 0012 NE R10 R3 R9
|
||||
0x782A0003, // 0013 JMPF R10 #0018
|
||||
0x8C280106, // 0014 GETMET R10 R0 K6
|
||||
0x5C300600, // 0015 MOVE R12 R3
|
||||
0x7C280400, // 0016 CALL R10 2
|
||||
0x5C201400, // 0017 MOVE R8 R10
|
||||
0x58280004, // 0018 LDCONST R10 K4
|
||||
0x602C000C, // 0019 GETGBL R11 G12
|
||||
0x88300100, // 001A GETMBR R12 R0 K0
|
||||
0x7C2C0200, // 001B CALL R11 1
|
||||
0x142C140B, // 001C LT R11 R10 R11
|
||||
0x782E0027, // 001D JMPF R11 #0046
|
||||
0x882C0100, // 001E GETMBR R11 R0 K0
|
||||
0x942C160A, // 001F GETIDX R11 R11 R10
|
||||
0x8C300B07, // 0020 GETMET R12 R5 K7
|
||||
0x5C381600, // 0021 MOVE R14 R11
|
||||
0x5C3C0200, // 0022 MOVE R15 R1
|
||||
0x7C300600, // 0023 CALL R12 3
|
||||
0x60340004, // 0024 GETGBL R13 G4
|
||||
0x5C381800, // 0025 MOVE R14 R12
|
||||
0x7C340200, // 0026 CALL R13 1
|
||||
0x1C341B08, // 0027 EQ R13 R13 K8
|
||||
0x7836001A, // 0028 JMPF R13 #0044
|
||||
0xA8020008, // 0029 EXBLK 0 #0033
|
||||
0x5C341800, // 002A MOVE R13 R12
|
||||
0x5C381600, // 002B MOVE R14 R11
|
||||
0x5C3C0200, // 002C MOVE R15 R1
|
||||
0x5C400E00, // 002D MOVE R16 R7
|
||||
0x5C441000, // 002E MOVE R17 R8
|
||||
0x5C480800, // 002F MOVE R18 R4
|
||||
0x7C340A00, // 0030 CALL R13 5
|
||||
0xA8040001, // 0031 EXBLK 1 1
|
||||
0x70020010, // 0032 JMP #0044
|
||||
0xAC340002, // 0033 CATCH R13 0 2
|
||||
0x7002000D, // 0034 JMP #0043
|
||||
0x603C0001, // 0035 GETGBL R15 G1
|
||||
0x8C400D09, // 0036 GETMET R16 R6 K9
|
||||
0x5848000A, // 0037 LDCONST R18 K10
|
||||
0x5C4C1A00, // 0038 MOVE R19 R13
|
||||
0x5C501C00, // 0039 MOVE R20 R14
|
||||
0x7C400800, // 003A CALL R16 4
|
||||
0x7C3C0200, // 003B CALL R15 1
|
||||
0xB83E1600, // 003C GETNGBL R15 K11
|
||||
0x883C1F0C, // 003D GETMBR R15 R15 K12
|
||||
0x783E0002, // 003E JMPF R15 #0042
|
||||
0xA43E1A00, // 003F IMPORT R15 K13
|
||||
0x8C401F0E, // 0040 GETMET R16 R15 K14
|
||||
0x7C400200, // 0041 CALL R16 1
|
||||
0x70020000, // 0042 JMP #0044
|
||||
0xB0080000, // 0043 RAISE 2 R0 R0
|
||||
0x0028150F, // 0044 ADD R10 R10 K15
|
||||
0x7001FFD2, // 0045 JMP #0019
|
||||
0x80000000, // 0046 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zb_coord
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zb_coord_ntv;
|
||||
be_local_class(zb_coord,
|
||||
1,
|
||||
&be_class_zb_coord_ntv,
|
||||
be_nested_map(4,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(dispatch, 1), be_const_closure(zb_coord_dispatch_closure) },
|
||||
{ be_const_key_weak(add_handler, 2), be_const_closure(zb_coord_add_handler_closure) },
|
||||
{ be_const_key_weak(_handlers, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(init, 0), be_const_closure(zb_coord_init_closure) },
|
||||
})),
|
||||
be_str_weak(zb_coord)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zb_coord_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zb_coord);
|
||||
be_setglobal(vm, "zb_coord");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,233 @@
|
|||
/* Solidification of zigbee_zcl_frame.h */
|
||||
/********************************************************************\
|
||||
* Generated code, don't edit *
|
||||
\********************************************************************/
|
||||
#include "be_constobj.h"
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: member
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_member, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(payload),
|
||||
/* K1 */ be_nested_str_weak(_get_bytes),
|
||||
/* K2 */ be_nested_str_weak(payload_ptr),
|
||||
/* K3 */ be_nested_str_weak(member),
|
||||
}),
|
||||
be_str_weak(member),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
0x1C080300, // 0000 EQ R2 R1 K0
|
||||
0x780A0004, // 0001 JMPF R2 #0007
|
||||
0x8C080101, // 0002 GETMET R2 R0 K1
|
||||
0x88100102, // 0003 GETMBR R4 R0 K2
|
||||
0x7C080400, // 0004 CALL R2 2
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
0x70020006, // 0006 JMP #000E
|
||||
0x60080003, // 0007 GETGBL R2 G3
|
||||
0x5C0C0000, // 0008 MOVE R3 R0
|
||||
0x7C080200, // 0009 CALL R2 1
|
||||
0x8C080503, // 000A GETMET R2 R2 K3
|
||||
0x5C100200, // 000B MOVE R4 R1
|
||||
0x7C080400, // 000C CALL R2 2
|
||||
0x80040400, // 000D RET 1 R2
|
||||
0x80000000, // 000E RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: setmember
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_setmember, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
3, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(payload),
|
||||
/* K1 */ be_nested_str_weak(_set_bytes),
|
||||
/* K2 */ be_nested_str_weak(payload_ptr),
|
||||
/* K3 */ be_nested_str_weak(setmember),
|
||||
}),
|
||||
be_str_weak(setmember),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0x1C0C0300, // 0000 EQ R3 R1 K0
|
||||
0x780E0005, // 0001 JMPF R3 #0008
|
||||
0x8C0C0101, // 0002 GETMET R3 R0 K1
|
||||
0x88140102, // 0003 GETMBR R5 R0 K2
|
||||
0x5C180400, // 0004 MOVE R6 R2
|
||||
0x7C0C0600, // 0005 CALL R3 3
|
||||
0x80040600, // 0006 RET 1 R3
|
||||
0x70020007, // 0007 JMP #0010
|
||||
0x600C0003, // 0008 GETGBL R3 G3
|
||||
0x5C100000, // 0009 MOVE R4 R0
|
||||
0x7C0C0200, // 000A CALL R3 1
|
||||
0x8C0C0703, // 000B GETMET R3 R3 K3
|
||||
0x5C140200, // 000C MOVE R5 R1
|
||||
0x5C180400, // 000D MOVE R6 R2
|
||||
0x7C0C0600, // 000E CALL R3 3
|
||||
0x80040600, // 000F RET 1 R3
|
||||
0x80000000, // 0010 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: init
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_init, /* name */
|
||||
be_nested_proto(
|
||||
5, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(init),
|
||||
/* K1 */ be_nested_str_weak(no_bytes),
|
||||
}),
|
||||
be_str_weak(init),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[10]) { /* code */
|
||||
0x60080003, // 0000 GETGBL R2 G3
|
||||
0x5C0C0000, // 0001 MOVE R3 R0
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x8C080500, // 0003 GETMET R2 R2 K0
|
||||
0x5C100200, // 0004 MOVE R4 R1
|
||||
0x7C080400, // 0005 CALL R2 2
|
||||
0x60080015, // 0006 GETGBL R2 G21
|
||||
0x7C080000, // 0007 CALL R2 0
|
||||
0x90020202, // 0008 SETMBR R0 K1 R2
|
||||
0x80000000, // 0009 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tomap
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_tomap, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(tomap),
|
||||
/* K2 */ be_nested_str_weak(shortaddr_hex),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(0x_X2504X),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(payload),
|
||||
}),
|
||||
be_str_weak(tomap),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x60080003, // 0001 GETGBL R2 G3
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x8C080501, // 0004 GETMET R2 R2 K1
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x8C0C0303, // 0006 GETMET R3 R1 K3
|
||||
0x58140004, // 0007 LDCONST R5 K4
|
||||
0x88180105, // 0008 GETMBR R6 R0 K5
|
||||
0x7C0C0600, // 0009 CALL R3 3
|
||||
0x980A0403, // 000A SETIDX R2 K2 R3
|
||||
0x880C0106, // 000B GETMBR R3 R0 K6
|
||||
0x980A0C03, // 000C SETIDX R2 K6 R3
|
||||
0x80040400, // 000D RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified function: tostring
|
||||
********************************************************************/
|
||||
be_local_closure(zcl_frame_tostring, /* name */
|
||||
be_nested_proto(
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
NULL, /* no upvals */
|
||||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tomap),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 6]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x60080008, // 0002 GETGBL R2 G8
|
||||
0x5C0C0200, // 0003 MOVE R3 R1
|
||||
0x7C080200, // 0004 CALL R2 1
|
||||
0x80040400, // 0005 RET 1 R2
|
||||
})
|
||||
)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
|
||||
/********************************************************************
|
||||
** Solidified class: zcl_frame
|
||||
********************************************************************/
|
||||
extern const bclass be_class_zcl_frame_ntv;
|
||||
be_local_class(zcl_frame,
|
||||
1,
|
||||
&be_class_zcl_frame_ntv,
|
||||
be_nested_map(6,
|
||||
( (struct bmapnode*) &(const bmapnode[]) {
|
||||
{ be_const_key_weak(no_bytes, -1), be_const_var(0) },
|
||||
{ be_const_key_weak(member, 2), be_const_closure(zcl_frame_member_closure) },
|
||||
{ be_const_key_weak(tostring, 5), be_const_closure(zcl_frame_tostring_closure) },
|
||||
{ be_const_key_weak(init, -1), be_const_closure(zcl_frame_init_closure) },
|
||||
{ be_const_key_weak(tomap, -1), be_const_closure(zcl_frame_tomap_closure) },
|
||||
{ be_const_key_weak(setmember, -1), be_const_closure(zcl_frame_setmember_closure) },
|
||||
})),
|
||||
be_str_weak(zcl_frame)
|
||||
);
|
||||
/*******************************************************************/
|
||||
|
||||
void be_load_zcl_frame_class(bvm *vm) {
|
||||
be_pushntvclass(vm, &be_class_zcl_frame);
|
||||
be_setglobal(vm, "zcl_frame");
|
||||
be_pop(vm, 1);
|
||||
}
|
||||
/********************************************************************/
|
||||
/* End of solidification */
|
Loading…
Reference in New Issue