Iam using JS. My goal is to force the ESP32 to deepsleep and wake up by ext interruption.
add in esp32_mjs.c:
void mgos_esp_deep_sleep_enable_ext0_wakeup_d(int gpio_num, int level) {
esp_deep_sleep_enable_ext0_wakeup(gpio_num, level);
esp_deep_sleep_start();
};
add in api_esp32.js:
deepSleepExt0: ffi('void mgos_esp_deep_sleep_enable_ext0_wakeup_d(int, int)'),
in init.js:
ESP32.deepSleepExt0(26,1);
The result I see is: MJS: called non-calablle
what is wrong?