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.
Fork of mbed-dev by
Diff: drivers/InterruptManager.h
- Revision:
- 169:9672193075cf
- Parent:
- 168:e84263d55307
--- a/drivers/InterruptManager.h Wed Jun 21 17:46:44 2017 +0100
+++ b/drivers/InterruptManager.h Thu Jul 06 15:42:05 2017 +0100
@@ -19,6 +19,7 @@
#include "cmsis.h"
#include "platform/CallChain.h"
#include "platform/PlatformMutex.h"
+#include "platform/NonCopyable.h"
#include <string.h>
namespace mbed {
@@ -53,7 +54,7 @@
* @endcode
* @ingroup drivers
*/
-class InterruptManager {
+class InterruptManager : private NonCopyable<InterruptManager> {
public:
/** Get the instance of InterruptManager Class
*
@@ -138,12 +139,6 @@
void lock();
void unlock();
- // We declare the copy contructor and the assignment operator, but we don't
- // implement them. This way, if someone tries to copy/assign our instance,
- // he will get an error at compile time.
- InterruptManager(const InterruptManager&);
- InterruptManager& operator =(const InterruptManager&);
-
template<typename T>
pFunctionPointer_t add_common(T *tptr, void (T::*mptr)(void), IRQn_Type irq, bool front=false) {
_mutex.lock();
