2013-08-08 09:58:34 +00:00
|
|
|
/* mbed Microcontroller Library
|
2015-04-23 13:56:34 +00:00
|
|
|
* Copyright (c) 2015 ARM Limited
|
2013-08-08 09:58:34 +00:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2015-04-23 13:56:34 +00:00
|
|
|
#ifndef MBED_LOWPOWERTICKER_H
|
|
|
|
#define MBED_LOWPOWERTICKER_H
|
|
|
|
|
2016-10-01 07:11:36 +00:00
|
|
|
#include "platform/platform.h"
|
|
|
|
#include "drivers/Ticker.h"
|
drivers: Mark non identity types as non copyable with the NonCopyable traits.
Classes changed: CAN, Ethernet, FlashIAP, I2C, InterruptIn, LowPowerTicker, LowPowerTimeout, LowPowerTimer, RawSerial, Serial, SerialBase, SPI, SPISlave, Ticker, Timeout, Timer, TimerEvent and UARTSerial.
2017-06-20 13:26:29 +00:00
|
|
|
#include "platform/NonCopyable.h"
|
2015-04-23 13:56:34 +00:00
|
|
|
|
2018-03-13 17:11:18 +00:00
|
|
|
#if defined (DEVICE_LPTICKER) || defined(DOXYGEN_ONLY)
|
2015-04-23 13:56:34 +00:00
|
|
|
|
2016-10-01 07:11:36 +00:00
|
|
|
#include "hal/lp_ticker_api.h"
|
2013-08-08 09:58:34 +00:00
|
|
|
|
|
|
|
namespace mbed {
|
2016-10-04 20:02:44 +00:00
|
|
|
/** \addtogroup drivers */
|
2013-08-08 09:58:34 +00:00
|
|
|
|
2015-04-23 13:56:34 +00:00
|
|
|
/** Low Power Ticker
|
2016-06-08 12:52:14 +00:00
|
|
|
*
|
2017-04-04 17:40:09 +00:00
|
|
|
* @note Synchronization level: Interrupt safe
|
2017-04-04 19:21:53 +00:00
|
|
|
* @ingroup drivers
|
2015-04-23 13:56:34 +00:00
|
|
|
*/
|
drivers: Mark non identity types as non copyable with the NonCopyable traits.
Classes changed: CAN, Ethernet, FlashIAP, I2C, InterruptIn, LowPowerTicker, LowPowerTimeout, LowPowerTimer, RawSerial, Serial, SerialBase, SPI, SPISlave, Ticker, Timeout, Timer, TimerEvent and UARTSerial.
2017-06-20 13:26:29 +00:00
|
|
|
class LowPowerTicker : public Ticker, private NonCopyable<LowPowerTicker> {
|
2015-04-23 13:56:34 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
LowPowerTicker() : Ticker(get_lp_ticker_data()) {
|
2013-08-08 09:58:34 +00:00
|
|
|
}
|
|
|
|
|
2015-04-23 13:56:34 +00:00
|
|
|
virtual ~LowPowerTicker() {
|
|
|
|
}
|
|
|
|
};
|
2013-08-08 09:58:34 +00:00
|
|
|
|
|
|
|
} // namespace mbed
|
2015-04-23 13:56:34 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|