Provides interrupt functions.
More...
|
#define | ESP_MAX_INTERRUPTS 16 |
|
#define | digitalPinToInterrupt(pin) ((pin) < ESP_MAX_INTERRUPTS ? (pin) : -1) |
|
#define | cli() noInterrupts() |
|
#define | sei() interrupts() |
|
|
typedef void(* | InterruptCallback) (void) |
|
typedef Delegate< void()> | InterruptDelegate |
|
|
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...
|
|
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, MUST use IRAM_ATTR Use this type of interrupt handler for timing-sensitive applications.
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, can be a regular function, method, etc. The delegate function is called via the system task queue so does not need any special consideration. Note that this type of interrupt handler is not suitable for timing-sensitive applications.
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?
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
Enable interrupts on GPIO pin.
- Parameters
-
pin | GPIO to enable interrupts for |
mode | Interrupt mode |
- Note
- Configure interrupt handler with attachInterrupt(pin, callback, 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
Set interrupt mode.
- Parameters
-
pin | GPIO to configure |
type | Interrupt type |
- Note
- Use ConvertArduinoInterruptMode to get Sming interrupt type from an Arduino interrupt type