Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
Int Class Referencefinal

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...
 

Detailed Description

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.

Member Function Documentation

◆ attach()

void Int::attach ( u8  pin,
void(*)(void)  callback,
int_mode_t  mode 
)
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.

Parameters
pinThe GPIO pin number.
callbackPointer to the interrupt handler function.
modeThe interrupt mode (INT_CHANGE, INT_FAILING, or INT_RISING).

◆ detach()

void Int::detach ( u8  pin)
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.

Parameters
pinThe GPIO pin number.

◆ disable()

void Int::disable ( )
static

Disable interrupts globally.

This method disables interrupts globally, preventing interrupt handlers from being called.

◆ enable()

void Int::enable ( )
static

Enable interrupts globally.

This method enables interrupts globally, allowing interrupt handlers to be called.


The documentation for this class was generated from the following files: