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.
pull/5393/head
Russ Butler 2017-10-27 14:47:55 -05:00
parent 97e2d4a8c5
commit 8deef6a699
2 changed files with 20 additions and 0 deletions

View File

@ -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 <string.h>

View File

@ -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<typename T>
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<typename T>
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: