-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use external interrupts with esp01 #193
Comments
Hello, the definitions are here. Include |
Will try to understand how that should be done. |
created a PR #195 |
After merge into master this is not working anymore. The last working commit is my f6160d3 - and starting with this merge commit 9f1d9e0 it breaks. After upload the LED blinks very fast and in console I see this repeating:
My test code is this: #include "simba.h"
static struct exti_driver_t exti_motion_sensor;
static struct pin_driver_t motion_sensor;
static struct pin_driver_t led;
static void on_motion(void *arg_p) {
pin_toggle(&led);
}
int main() {
/* Start the system. */
sys_start();
/* LED */
pin_init(&led, &pin_led_dev, PIN_OUTPUT);
pin_write(&led, 0);
/* Motion sensor */
pin_init(&motion_sensor, &pin_d2_dev, PIN_INPUT_PULL_DOWN);
exti_init(&exti_motion_sensor, &exti_d2_dev, EXTI_TRIGGER_BOTH_EDGES,
on_motion, NULL);
exti_start(&exti_motion_sensor);
return (0);
} I tested several esp01 boards and different commits and the problem persists. Blink example still works. Maybe someone see some breaking change in this f6160d3...9f1d9e0 diff. Also I don't have any Let me know if more info is needed. |
I'll not have time to troubleshoot this, I'm afraid. Sorry. |
Hi, I wanted to use motion sensor with esp01 and tried "exti" module, but method
exti_init
takes onlyexti_device_t * dev_p
and I cannot find those pin definitions for esp01. Can I use interrupts with esp01 in some other way?The text was updated successfully, but these errors were encountered: