From 8deef6a699a6ed8a3d588625f4b0aff48c4233dc Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Fri, 27 Oct 2017 14:47:55 -0500 Subject: [PATCH] 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. --- drivers/InterruptManager.cpp | 6 ++++++ drivers/InterruptManager.h | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/InterruptManager.cpp b/drivers/InterruptManager.cpp index ac8c83d88c..9c2b4c2acb 100644 --- a/drivers/InterruptManager.cpp +++ b/drivers/InterruptManager.cpp @@ -16,6 +16,12 @@ #include "cmsis.h" #if defined(NVIC_NUM_VECTORS) +// Suppress deprecation warnings since this whole +// class is deprecated already +#include "mbed_toolchain.h" +#undef MBED_DEPRECATED_SINCE +#define MBED_DEPRECATED_SINCE(...) + #include "drivers/InterruptManager.h" #include "platform/mbed_critical.h" #include diff --git a/drivers/InterruptManager.h b/drivers/InterruptManager.h index 8060738115..ac10ebc878 100644 --- a/drivers/InterruptManager.h +++ b/drivers/InterruptManager.h @@ -60,10 +60,14 @@ public: * * @return 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.") static InterruptManager* get(); /** 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.") static void destroy(); /** Add a handler for an interrupt at the end of the handler list @@ -74,6 +78,8 @@ public: * @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.") pFunctionPointer_t add_handler(void (*function)(void), IRQn_Type irq) { // Underlying call is thread safe return add_common(function, irq); @@ -87,6 +93,8 @@ public: * @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.") pFunctionPointer_t add_handler_front(void (*function)(void), IRQn_Type irq) { // Underlying call is thread safe return add_common(function, irq, true); @@ -102,6 +110,8 @@ public: * The function object created for 'tptr' and 'mptr' */ template + 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(T* tptr, void (T::*mptr)(void), IRQn_Type irq) { // Underlying call is thread safe return add_common(tptr, mptr, irq); @@ -117,6 +127,8 @@ public: * The function object created for 'tptr' and 'mptr' */ template + 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_front(T* tptr, void (T::*mptr)(void), IRQn_Type irq) { // Underlying call is thread safe return add_common(tptr, mptr, irq, true); @@ -130,6 +142,8 @@ public: * @returns * true if the handler was found and removed, false otherwise */ + 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.") bool remove_handler(pFunctionPointer_t handler, IRQn_Type irq); private: