Created
October 14, 2017 19:10
-
-
Save guglielmino/ce96284cca89ec9973a0e79b3d773569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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