From aaec57db1c76404193d230b177044169cf2c60e9 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Tue, 5 Oct 2021 21:28:34 +0200 Subject: [PATCH] Berry fix Energy module --- lib/libesp32/Berry/default/be_energylib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libesp32/Berry/default/be_energylib.c b/lib/libesp32/Berry/default/be_energylib.c index eb207e4f7..a6fb58898 100644 --- a/lib/libesp32/Berry/default/be_energylib.c +++ b/lib/libesp32/Berry/default/be_energylib.c @@ -15,6 +15,7 @@ extern struct ENERGY Energy; def init(m) import global global._energy = energy_struct(m._ptr) + return m end def read() @@ -52,7 +53,7 @@ be_local_closure(init, /* name */ /* K2 */ be_nested_string("energy_struct", 1655792843, 13), /* K3 */ be_nested_string("_ptr", 306235816, 4), }), - (be_nested_const_str("", 1160973142, 11)), + (be_nested_const_str("init", 380752755, 4)), (be_nested_const_str("input", -103256197, 5)), ( &(const binstruction[ 6]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 @@ -60,7 +61,7 @@ be_local_closure(init, /* name */ 0x880C0103, // 0002 GETMBR R3 R0 K3 0x7C080200, // 0003 CALL R2 1 0x90060202, // 0004 SETMBR R1 K1 R2 - 0x80000000, // 0005 RET 0 + 0x80040000, // 0005 RET 1 R0 }) ) );