Nicolas Borla / Mbed OS ROME2_Robot_Firmware
Committer:
boro
Date:
Mon Mar 16 13:12:31 2020 +0000
Revision:
0:4beb2ea291ec
a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
boro 0:4beb2ea291ec 1 /* mbed Microcontroller Library
boro 0:4beb2ea291ec 2 * Copyright (c) 2015 ARM Limited
boro 0:4beb2ea291ec 3 *
boro 0:4beb2ea291ec 4 * Licensed under the Apache License, Version 2.0 (the "License");
boro 0:4beb2ea291ec 5 * you may not use this file except in compliance with the License.
boro 0:4beb2ea291ec 6 * You may obtain a copy of the License at
boro 0:4beb2ea291ec 7 *
boro 0:4beb2ea291ec 8 * http://www.apache.org/licenses/LICENSE-2.0
boro 0:4beb2ea291ec 9 *
boro 0:4beb2ea291ec 10 * Unless required by applicable law or agreed to in writing, software
boro 0:4beb2ea291ec 11 * distributed under the License is distributed on an "AS IS" BASIS,
boro 0:4beb2ea291ec 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
boro 0:4beb2ea291ec 13 * See the License for the specific language governing permissions and
boro 0:4beb2ea291ec 14 * limitations under the License.
boro 0:4beb2ea291ec 15 */
boro 0:4beb2ea291ec 16 #ifndef MBED_LOWPOWERTICKER_H
boro 0:4beb2ea291ec 17 #define MBED_LOWPOWERTICKER_H
boro 0:4beb2ea291ec 18
boro 0:4beb2ea291ec 19 #include "platform/platform.h"
boro 0:4beb2ea291ec 20 #include "drivers/Ticker.h"
boro 0:4beb2ea291ec 21 #include "platform/NonCopyable.h"
boro 0:4beb2ea291ec 22
boro 0:4beb2ea291ec 23 #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
boro 0:4beb2ea291ec 24
boro 0:4beb2ea291ec 25 #include "hal/lp_ticker_api.h"
boro 0:4beb2ea291ec 26
boro 0:4beb2ea291ec 27 namespace mbed {
boro 0:4beb2ea291ec 28 /** \addtogroup drivers */
boro 0:4beb2ea291ec 29
boro 0:4beb2ea291ec 30 /** Low Power Ticker
boro 0:4beb2ea291ec 31 *
boro 0:4beb2ea291ec 32 * @note Synchronization level: Interrupt safe
boro 0:4beb2ea291ec 33 * @ingroup drivers
boro 0:4beb2ea291ec 34 */
boro 0:4beb2ea291ec 35 class LowPowerTicker : public Ticker, private NonCopyable<LowPowerTicker> {
boro 0:4beb2ea291ec 36
boro 0:4beb2ea291ec 37 public:
boro 0:4beb2ea291ec 38 LowPowerTicker() : Ticker(get_lp_ticker_data()) {
boro 0:4beb2ea291ec 39 }
boro 0:4beb2ea291ec 40
boro 0:4beb2ea291ec 41 virtual ~LowPowerTicker() {
boro 0:4beb2ea291ec 42 }
boro 0:4beb2ea291ec 43 };
boro 0:4beb2ea291ec 44
boro 0:4beb2ea291ec 45 } // namespace mbed
boro 0:4beb2ea291ec 46
boro 0:4beb2ea291ec 47 #endif
boro 0:4beb2ea291ec 48
boro 0:4beb2ea291ec 49 #endif