A specific question and then a general one.
I have an ISR that is triggered from a GPIO interrupt when a button is pressed. My plan is to check for button debounce by discarding interrupts that happen too close together. So for example, a button pressed interrupt will not cause action if it occurs less than 100 msecs since the last button pressed. The question I am considering in my design then seems to ask "Can I determine the current time stamp within an ISR?" and that leads me to "gettimeofday()" ... is that a "safe" call to use in an ISR?
Following on from this question then leads me to the next semi obvious question ... which ESP-IDF supplied functions are or are not safe to be invoked from within an ISR? Do we have a table or mapping of which ones can and can't be used?
Is gettimeofday() safe from an ISR perspective?
Is gettimeofday() safe from an ISR perspective?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 242 guests