diff --git a/drivers/CAN.h b/drivers/CAN.h index 36aab9de1e..65a7be8c02 100644 --- a/drivers/CAN.h +++ b/drivers/CAN.h @@ -23,6 +23,7 @@ #include "hal/can_api.h" #include "platform/Callback.h" #include "platform/PlatformMutex.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -78,7 +79,7 @@ public: /** A can bus client, used for communicating with can devices * @ingroup drivers */ -class CAN { +class CAN : private NonCopyable { public: /** Creates an CAN interface connected to specific pins. diff --git a/drivers/Ethernet.h b/drivers/Ethernet.h index d7779f318e..ae4e999589 100644 --- a/drivers/Ethernet.h +++ b/drivers/Ethernet.h @@ -17,6 +17,7 @@ #define MBED_ETHERNET_H #include "platform/platform.h" +#include "platform/NonCopyable.h" #if defined (DEVICE_ETHERNET) || defined(DOXYGEN_ONLY) @@ -54,7 +55,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class Ethernet { +class Ethernet : private NonCopyable { public: diff --git a/drivers/FlashIAP.h b/drivers/FlashIAP.h index e1943c03b3..dd7b167e84 100644 --- a/drivers/FlashIAP.h +++ b/drivers/FlashIAP.h @@ -27,6 +27,7 @@ #include "flash_api.h" #include "platform/SingletonPtr.h" #include "platform/PlatformMutex.h" +#include "platform/NonCopyable.h" namespace mbed { @@ -37,7 +38,7 @@ namespace mbed { * @note Synchronization level: Thread safe * @ingroup drivers */ -class FlashIAP { +class FlashIAP : private NonCopyable { public: FlashIAP(); ~FlashIAP(); diff --git a/drivers/I2C.h b/drivers/I2C.h index 4932cd0659..b2e4eac60d 100644 --- a/drivers/I2C.h +++ b/drivers/I2C.h @@ -23,6 +23,7 @@ #include "hal/i2c_api.h" #include "platform/SingletonPtr.h" #include "platform/PlatformMutex.h" +#include "platform/NonCopyable.h" #if DEVICE_I2C_ASYNCH #include "platform/CThunk.h" @@ -53,7 +54,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class I2C { +class I2C : private NonCopyable { public: enum RxStatus { diff --git a/drivers/InterruptIn.h b/drivers/InterruptIn.h index aac567a39f..0a122bdb03 100644 --- a/drivers/InterruptIn.h +++ b/drivers/InterruptIn.h @@ -25,6 +25,7 @@ #include "platform/Callback.h" #include "platform/mbed_critical.h" #include "platform/mbed_toolchain.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -56,7 +57,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class InterruptIn { +class InterruptIn : private NonCopyable { public: diff --git a/drivers/LowPowerTicker.h b/drivers/LowPowerTicker.h index 8a076141d2..2df8ef34eb 100644 --- a/drivers/LowPowerTicker.h +++ b/drivers/LowPowerTicker.h @@ -18,6 +18,7 @@ #include "platform/platform.h" #include "drivers/Ticker.h" +#include "platform/NonCopyable.h" #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY) @@ -31,7 +32,7 @@ namespace mbed { * @note Synchronization level: Interrupt safe * @ingroup drivers */ -class LowPowerTicker : public Ticker { +class LowPowerTicker : public Ticker, private NonCopyable { public: LowPowerTicker() : Ticker(get_lp_ticker_data()) { diff --git a/drivers/LowPowerTimeout.h b/drivers/LowPowerTimeout.h index c246ac1bc1..6aaefe2da8 100644 --- a/drivers/LowPowerTimeout.h +++ b/drivers/LowPowerTimeout.h @@ -22,6 +22,7 @@ #include "hal/lp_ticker_api.h" #include "drivers/LowPowerTicker.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -31,7 +32,7 @@ namespace mbed { * @note Synchronization level: Interrupt safe * @ingroup drivers */ -class LowPowerTimeout : public LowPowerTicker { +class LowPowerTimeout : public LowPowerTicker, private NonCopyable { private: virtual void handler(void) { diff --git a/drivers/LowPowerTimer.h b/drivers/LowPowerTimer.h index 4f1e15e2fb..e7e00377d9 100644 --- a/drivers/LowPowerTimer.h +++ b/drivers/LowPowerTimer.h @@ -18,6 +18,7 @@ #include "platform/platform.h" #include "drivers/Timer.h" +#include "platform/NonCopyable.h" #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY) @@ -31,7 +32,7 @@ namespace mbed { * @note Synchronization level: Interrupt safe * @ingroup drivers */ -class LowPowerTimer : public Timer { +class LowPowerTimer : public Timer, private NonCopyable { public: LowPowerTimer() : Timer(get_lp_ticker_data()) { diff --git a/drivers/RawSerial.h b/drivers/RawSerial.h index 2026e11170..b39fac73bf 100644 --- a/drivers/RawSerial.h +++ b/drivers/RawSerial.h @@ -22,6 +22,7 @@ #include "drivers/SerialBase.h" #include "hal/serial_api.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -49,7 +50,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class RawSerial: public SerialBase { +class RawSerial: public SerialBase, private NonCopyable { public: /** Create a RawSerial port, connected to the specified transmit and receive pins, with the specified baud. diff --git a/drivers/SPI.h b/drivers/SPI.h index ee177cecb2..46761f8585 100644 --- a/drivers/SPI.h +++ b/drivers/SPI.h @@ -23,6 +23,7 @@ #include "platform/PlatformMutex.h" #include "hal/spi_api.h" #include "platform/SingletonPtr.h" +#include "platform/NonCopyable.h" #if DEVICE_SPI_ASYNCH #include "platform/CThunk.h" @@ -72,7 +73,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class SPI { +class SPI : private NonCopyable { public: diff --git a/drivers/SPISlave.h b/drivers/SPISlave.h index 29a9046695..c6226b2c3d 100644 --- a/drivers/SPISlave.h +++ b/drivers/SPISlave.h @@ -17,6 +17,7 @@ #define MBED_SPISLAVE_H #include "platform/platform.h" +#include "platform/NonCopyable.h" #if defined (DEVICE_SPISLAVE) || defined(DOXYGEN_ONLY) @@ -52,7 +53,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class SPISlave { +class SPISlave : private NonCopyable { public: diff --git a/drivers/Serial.h b/drivers/Serial.h index 5294c1c2f3..549943a47c 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -24,6 +24,7 @@ #include "SerialBase.h" #include "PlatformMutex.h" #include "serial_api.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -49,7 +50,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class Serial : public SerialBase, public Stream { +class Serial : public SerialBase, public Stream, private NonCopyable { public: #if DEVICE_SERIAL_ASYNCH diff --git a/drivers/SerialBase.h b/drivers/SerialBase.h index 47a81a7aba..6723f6a2ee 100644 --- a/drivers/SerialBase.h +++ b/drivers/SerialBase.h @@ -23,6 +23,7 @@ #include "Callback.h" #include "serial_api.h" #include "mbed_toolchain.h" +#include "platform/NonCopyable.h" #if DEVICE_SERIAL_ASYNCH #include "CThunk.h" @@ -38,7 +39,7 @@ namespace mbed { * @note Synchronization level: Set by subclass * @ingroup drivers */ -class SerialBase { +class SerialBase : private NonCopyable { public: /** Set the baud rate of the serial port diff --git a/drivers/Ticker.h b/drivers/Ticker.h index 57695d16bd..917eb7c84b 100644 --- a/drivers/Ticker.h +++ b/drivers/Ticker.h @@ -19,6 +19,7 @@ #include "drivers/TimerEvent.h" #include "platform/Callback.h" #include "platform/mbed_toolchain.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -59,7 +60,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class Ticker : public TimerEvent { +class Ticker : public TimerEvent, private NonCopyable { public: Ticker() : TimerEvent() { diff --git a/drivers/Timeout.h b/drivers/Timeout.h index 54240bf783..b0508d7b88 100644 --- a/drivers/Timeout.h +++ b/drivers/Timeout.h @@ -17,6 +17,7 @@ #define MBED_TIMEOUT_H #include "drivers/Ticker.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -52,7 +53,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class Timeout : public Ticker { +class Timeout : public Ticker, private NonCopyable { protected: virtual void handler(); diff --git a/drivers/Timer.h b/drivers/Timer.h index d76ba281dc..50c47d387b 100644 --- a/drivers/Timer.h +++ b/drivers/Timer.h @@ -18,6 +18,7 @@ #include "platform/platform.h" #include "hal/ticker_api.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -46,7 +47,7 @@ namespace mbed { * @endcode * @ingroup drivers */ -class Timer { +class Timer : private NonCopyable { public: Timer(); diff --git a/drivers/TimerEvent.h b/drivers/TimerEvent.h index e330606363..45c3c14900 100644 --- a/drivers/TimerEvent.h +++ b/drivers/TimerEvent.h @@ -18,6 +18,7 @@ #include "hal/ticker_api.h" #include "hal/us_ticker_api.h" +#include "platform/NonCopyable.h" namespace mbed { /** \addtogroup drivers */ @@ -27,7 +28,7 @@ namespace mbed { * @note Synchronization level: Interrupt safe * @ingroup drivers */ -class TimerEvent { +class TimerEvent : private NonCopyable { public: TimerEvent(); TimerEvent(const ticker_data_t *data); diff --git a/drivers/UARTSerial.h b/drivers/UARTSerial.h index fda877d896..ee3a35ea1f 100644 --- a/drivers/UARTSerial.h +++ b/drivers/UARTSerial.h @@ -27,6 +27,7 @@ #include "PlatformMutex.h" #include "serial_api.h" #include "CircularBuffer.h" +#include "platform/NonCopyable.h" #ifndef MBED_CONF_DRIVERS_UART_SERIAL_RXBUF_SIZE #define MBED_CONF_DRIVERS_UART_SERIAL_RXBUF_SIZE 256 @@ -38,7 +39,7 @@ namespace mbed { -class UARTSerial : private SerialBase, public FileHandle { +class UARTSerial : private SerialBase, public FileHandle, private NonCopyable { public: