berry
berry copied to clipboard
How can I call my own (native) function when I works with stm32.
How can I define and call native functions. BE_USE_PRECOMPILED_OBJECT macro is 1 and so
#if !BE_USE_PRECOMPILED_OBJECT
be_native_module_attr_table(attr_table) {
be_native_module_function("setled", setled),
be_native_module_function("setdac", setdac),
be_native_module_function("play_sin", l_play_sin),
be_native_module_function("play_rect", l_play_rect),
be_native_module_function("play_tri", l_play_tri),
be_native_module_function("play_stop", l_play_stop),
be_native_module_function("reboot", l_reboot)
};
This macros make errors. İf I deactive BE_USE_PRECOMPILED_OBJECT macro, I get a lot of errors.
It's all described here: https://berry.readthedocs.io/en/latest/source/en/Chapter-9.html#compile-time-construction-technology