Skip to content

Instantly share code, notes, and snippets.

@guglielmino
Created October 14, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guglielmino/ce96284cca89ec9973a0e79b3d773569 to your computer and use it in GitHub Desktop.
Save guglielmino/ce96284cca89ec9973a0e79b3d773569 to your computer and use it in GitHub Desktop.
#include "mgos.h"
void int_func(int pin, void *arg) {
(void) arg;
LOG(LL_DEBUG, ("Pin pressed %d", pin));
}
enum mgos_app_init_result mgos_app_init(void) {
mgos_gpio_init();
mgos_gpio_set_mode(0, MGOS_GPIO_MODE_INPUT);
//mgos_gpio_set_int_handler_isr(0, MGOS_GPIO_INT_EDGE_ANY, int_func, NULL);
//mgos_gpio_enable_int(0);
return MGOS_APP_INIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment