Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 58 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 Tue Jul 12 2022 14:27:10 by
