2013-08-08 09:58:34 +00:00
|
|
|
/* mbed Microcontroller Library
|
2015-04-23 13:56:34 +00:00
|
|
|
* Copyright (c) 2015 ARM Limited
|
2018-11-09 11:22:52 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
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 {
|
2019-07-24 15:59:40 +00:00
|
|
|
/** \defgroup drivers-public-api-ticker Ticker
|
|
|
|
* \ingroup drivers-public-api
|
|
|
|
*/
|
|
|
|
|
2019-07-11 15:23:39 +00:00
|
|
|
/**
|
|
|
|
* \defgroup drivers_LowPowerTicker LowPowerTicker class
|
2019-07-24 15:59:40 +00:00
|
|
|
* \ingroup drivers-public-api-ticker
|
2019-07-11 15:23:39 +00:00
|
|
|
* @{
|
|
|
|
*/
|
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
|
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:
|
2018-05-24 15:58:14 +00:00
|
|
|
LowPowerTicker() : Ticker(get_lp_ticker_data())
|
|
|
|
{
|
2013-08-08 09:58:34 +00:00
|
|
|
}
|
|
|
|
|
2018-05-24 15:58:14 +00:00
|
|
|
virtual ~LowPowerTicker()
|
|
|
|
{
|
2015-04-23 13:56:34 +00:00
|
|
|
}
|
|
|
|
};
|
2013-08-08 09:58:34 +00:00
|
|
|
|
2019-07-11 15:23:39 +00:00
|
|
|
/** @}*/
|
|
|
|
|
2013-08-08 09:58:34 +00:00
|
|
|
} // namespace mbed
|
2015-04-23 13:56:34 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|