Provides interrupt functions.
More...
|
#define | ESP_MAX_INTERRUPTS 16 |
|
#define | digitalPinToInterrupt(pin) ( (p) < ESP_MAX_INTERRUPTS ? (p) : -1 ) |
|
#define | cli() noInterrupts() |
|
#define | sei() interrupts() |
|
|
typedef void(* | InterruptCallback) (void) |
|
|
void | attachInterrupt (uint8_t pin, InterruptCallback callback, uint8_t mode) |
| Attach a function to a GPIO interrupt. More...
|
|
void | attachInterrupt (uint8_t pin, Delegate< void()> delegateFunction, uint8_t mode) |
| Attach a function to a GPIO interrupt. More...
|
|
void | attachInterrupt (uint8_t pin, InterruptCallback callback, GPIO_INT_TYPE mode) |
| Attach a function to a GPIO interrupt. More...
|
|
void | attachInterrupt (uint8_t pin, Delegate< void()> delegateFunction, GPIO_INT_TYPE mode) |
| Attach a function to a GPIO interrupt. More...
|
|
void | attachInterruptHandler (uint8_t pin, GPIO_INT_TYPE mode) |
| Enable interrupts on GPIO pin. More...
|
|
void | detachInterrupt (uint8_t pin) |
| Disable interrupts on GPIO pin. More...
|
|
void | interruptMode (uint8_t pin, uint8_t mode) |
| Set interrupt mode. More...
|
|
void | interruptMode (uint8_t pin, GPIO_INT_TYPE type) |
| Set interrupt mode. More...
|
|
GPIO_INT_TYPE | ConvertArduinoInterruptMode (uint8_t mode) |
| Convert Arduino interrupt mode to Sming mode. More...
|
|
void | noInterrupts () |
| Disable interrupts. More...
|
|
void | interrupts () |
| Enable interrupts. More...
|
|
|
InterruptCallback | _gpioInterruptsList [ESP_MAX_INTERRUPTS] |
|
bool | _gpioInterruptsInitialied |
|
Provides interrupt functions.
void attachInterrupt |
( |
uint8_t |
pin, |
|
|
InterruptCallback |
callback, |
|
|
uint8_t |
mode |
|
) |
| |
Attach a function to a GPIO interrupt.
- Parameters
-
pin | GPIO to configure |
callback | Function to call when interrupt occurs on GPIO |
mode | Arduino type interrupt mode |
- Note
- Traditional c-type callback function method
void attachInterrupt |
( |
uint8_t |
pin, |
|
|
Delegate< void()> |
delegateFunction, |
|
|
uint8_t |
mode |
|
) |
| |
Attach a function to a GPIO interrupt.
- Parameters
-
pin | GPIO to configure |
delegateFunction | Function to call when interrupt occurs on GPIO |
mode | Arduino type interrupt mode |
- Note
- Delegate function method
void attachInterrupt |
( |
uint8_t |
pin, |
|
|
InterruptCallback |
callback, |
|
|
GPIO_INT_TYPE |
mode |
|
) |
| |
Attach a function to a GPIO interrupt.
- Parameters
-
pin | GPIO to configure |
callback | Function to call when interrupt occurs on GPIO |
mode | Interrupt mode |
- Note
- Traditional c-type callback function method
- Todo:
- Add GPIO_INT_TYPE documentation - is this in SDK?
void attachInterrupt |
( |
uint8_t |
pin, |
|
|
Delegate< void()> |
delegateFunction, |
|
|
GPIO_INT_TYPE |
mode |
|
) |
| |
Attach a function to a GPIO interrupt.
- Parameters
-
pin | GPIO to configure |
delegateFunction | Function to call when interrupt occurs on GPIO |
mode | Interrupt mode |
- Note
- Delegate function method
void attachInterruptHandler |
( |
uint8_t |
pin, |
|
|
GPIO_INT_TYPE |
mode |
|
) |
| |
Enable interrupts on GPIO pin.
- Parameters
-
pin | GPIO to enable interrupts for |
mode | Interrupt mode |
- Note
- Configure interrupt handler with attachInterrupt(pin, callback, mode)
GPIO_INT_TYPE ConvertArduinoInterruptMode |
( |
uint8_t |
mode | ) |
|
Convert Arduino interrupt mode to Sming mode.
- Parameters
-
- Return values
-
GPIO_INT_TYPE | Sming interrupt mode type |
void detachInterrupt |
( |
uint8_t |
pin | ) |
|
Disable interrupts on GPIO pin.
- Parameters
-
pin | GPIO to disable interrupts for |
void interruptMode |
( |
uint8_t |
pin, |
|
|
uint8_t |
mode |
|
) |
| |
Set interrupt mode.
- Parameters
-
pin | GPIO to configure |
mode | Interrupt mode |
- Note
- Use ConvertArduinoInterruptMode to get Sming interrupt type from an Arduino interrupt type
void interruptMode |
( |
uint8_t |
pin, |
|
|
GPIO_INT_TYPE |
type |
|
) |
| |
Set interrupt mode.
- Parameters
-
pin | GPIO to configure |
type | Interrupt type |
- Note
- Use ConvertArduinoInterruptMode to get Sming interrupt type from an Arduino interrupt type