Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
|
Class for handling interrupt operations in Rishka applications. More...
#include <int.h>
Static Public Member Functions | |
static void | enable () |
Enable interrupts globally. More... | |
static void | disable () |
Disable interrupts globally. More... | |
static void | attach (u8 pin, void(*callback)(void), int_mode_t mode) |
Attach an interrupt handler to a GPIO pin. More... | |
static void | detach (u8 pin) |
Detach the interrupt handler from a GPIO pin. More... | |
Class for handling interrupt operations in Rishka applications.
The Int class provides static methods for enabling/disabling interrupts, attaching/detaching interrupt handlers, and configuring interrupt modes for GPIO pins on ESP32-WROVER microcontrollers.
|
static |
Attach an interrupt handler to a GPIO pin.
This method attaches an interrupt handler function to the specified GPIO pin. The interrupt handler will be called when the specified interrupt mode is triggered.
pin | The GPIO pin number. |
callback | Pointer to the interrupt handler function. |
mode | The interrupt mode (INT_CHANGE, INT_FAILING, or INT_RISING). |
|
static |
Detach the interrupt handler from a GPIO pin.
This method detaches the interrupt handler function from the specified GPIO pin. The interrupt handler will no longer be called for interrupts on the specified pin.
pin | The GPIO pin number. |
|
static |
Disable interrupts globally.
This method disables interrupts globally, preventing interrupt handlers from being called.
|
static |
Enable interrupts globally.
This method enables interrupts globally, allowing interrupt handlers to be called.