Sub Process_Globals
Public Serial1 As Serial
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
GlobalStore.Put(0, "This is the result slot")
RunNative("get_string","from B4R")
Log(GlobalStore.Slot0)
End Sub
#if c
void get_string(B4R::Object* msg) {
const char* str = (const char*)msg->data.PointerField;
String string="from inline c..";
string+=str;
B4R::B4RString str_B4R;
b4r_main::_globalstore->_put(0,str_B4R.wrap(string.c_str())->GetBytes());
}
#End If