Skip to content

Commit 8deef6a

Browse files
committed
Deprecate InterruptManager
This patch deprecates the InterruptManager class since it is an internal API (not in mbed.h) which is not being used anywhere in the codebase.
1 parent 97e2d4a commit 8deef6a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drivers/InterruptManager.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#include "cmsis.h"
1717
#if defined(NVIC_NUM_VECTORS)
1818

19+
// Suppress deprecation warnings since this whole
20+
// class is deprecated already
21+
#include "mbed_toolchain.h"
22+
#undef MBED_DEPRECATED_SINCE
23+
#define MBED_DEPRECATED_SINCE(...)
24+
1925
#include "drivers/InterruptManager.h"
2026
#include "platform/mbed_critical.h"
2127
#include <string.h>

drivers/InterruptManager.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ class InterruptManager : private NonCopyable<InterruptManager> {
6060
*
6161
* @return the only instance of this class
6262
*/
63+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
64+
"public API of mbed-os and is being removed in the future.")
6365
static InterruptManager* get();
6466

6567
/** Destroy the current instance of the interrupt manager
6668
*/
69+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
70+
"public API of mbed-os and is being removed in the future.")
6771
static void destroy();
6872

6973
/** Add a handler for an interrupt at the end of the handler list
@@ -74,6 +78,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
7478
* @returns
7579
* The function object created for 'function'
7680
*/
81+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
82+
"public API of mbed-os and is being removed in the future.")
7783
pFunctionPointer_t add_handler(void (*function)(void), IRQn_Type irq) {
7884
// Underlying call is thread safe
7985
return add_common(function, irq);
@@ -87,6 +93,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
8793
* @returns
8894
* The function object created for 'function'
8995
*/
96+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
97+
"public API of mbed-os and is being removed in the future.")
9098
pFunctionPointer_t add_handler_front(void (*function)(void), IRQn_Type irq) {
9199
// Underlying call is thread safe
92100
return add_common(function, irq, true);
@@ -102,6 +110,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
102110
* The function object created for 'tptr' and 'mptr'
103111
*/
104112
template<typename T>
113+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
114+
"public API of mbed-os and is being removed in the future.")
105115
pFunctionPointer_t add_handler(T* tptr, void (T::*mptr)(void), IRQn_Type irq) {
106116
// Underlying call is thread safe
107117
return add_common(tptr, mptr, irq);
@@ -117,6 +127,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
117127
* The function object created for 'tptr' and 'mptr'
118128
*/
119129
template<typename T>
130+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
131+
"public API of mbed-os and is being removed in the future.")
120132
pFunctionPointer_t add_handler_front(T* tptr, void (T::*mptr)(void), IRQn_Type irq) {
121133
// Underlying call is thread safe
122134
return add_common(tptr, mptr, irq, true);
@@ -130,6 +142,8 @@ class InterruptManager : private NonCopyable<InterruptManager> {
130142
* @returns
131143
* true if the handler was found and removed, false otherwise
132144
*/
145+
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
146+
"public API of mbed-os and is being removed in the future.")
133147
bool remove_handler(pFunctionPointer_t handler, IRQn_Type irq);
134148

135149
private:

0 commit comments

Comments
 (0)