Rtos API example
InterruptManager Class Reference
[Drivers]
Use this singleton if you need to chain interrupt handlers. More...
#include <InterruptManager.h>
Inherits NonCopyable< InterruptManager >.
Public Member Functions | |
MBED_DEPRECATED_SINCE ("mbed-os-5.6","This class is not part of the ""public API of mbed-os and is being removed in the future.") static InterruptManager *get() | |
Get the instance of InterruptManager Class. | |
MBED_DEPRECATED_SINCE ("mbed-os-5.6","This class is not part of the ""public API of mbed-os and is being removed in the future.") static void destroy() | |
Destroy the current instance of the interrupt manager. | |
MBED_DEPRECATED_SINCE ("mbed-os-5.6","This class is not part of the ""public API of mbed-os and is being removed in the future.") pFunctionPointer_t add_handler(void(*function)(void) | |
Add a handler for an interrupt at the end of the handler list. | |
Private Member Functions | |
MBED_DEPRECATED ("Invalid copy construction of a NonCopyable resource.") NonCopyable(const NonCopyable &) | |
NonCopyable copy constructor. | |
MBED_DEPRECATED ("Invalid copy assignment of a NonCopyable resource.") NonCopyable &operator | |
NonCopyable copy assignment operator. |
Detailed Description
Use this singleton if you need to chain interrupt handlers.
- Note:
- Synchronization level: Thread safe
Example (for LPC1768):
#include "InterruptManager.h" #include "mbed.h" Ticker flipper; DigitalOut led1(LED1); DigitalOut led2(LED2); void flip(void) { led1 = !led1; } void handler(void) { led2 = !led1; } int main() { led1 = led2 = 0; flipper.attach(&flip, 1.0); InterruptManager::get()->add_handler(handler, TIMER3_IRQn); }
Definition at line 57 of file InterruptManager.h.
Member Function Documentation
MBED_DEPRECATED_SINCE | ( | "mbed-os-5.6" | , |
"This class is not part of the ""public API of mbed-os and is being removed in the future." | |||
) |
Get the instance of InterruptManager Class.
- Returns:
- the only instance of this class
MBED_DEPRECATED_SINCE | ( | "mbed-os-5.6" | , |
"This class is not part of the ""public API of mbed-os and is being removed in the future." | |||
) |
Add a handler for an interrupt at the end of the handler list.
- Parameters:
-
function the handler to add irq interrupt number
- Returns:
- The function object created for 'function'
MBED_DEPRECATED_SINCE | ( | "mbed-os-5.6" | , |
"This class is not part of the ""public API of mbed-os and is being removed in the future." | |||
) |
Destroy the current instance of the interrupt manager.
Generated on Sun Jul 17 2022 08:25:43 by 1.7.2