mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
cmsis/BUILD/mbed/drivers/LowPowerTicker.h@189:f392fc9709a3, 2019-02-20 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Feb 20 22:31:08 2019 +0000
- Revision:
- 189:f392fc9709a3
mbed library release version 165
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 189:f392fc9709a3 | 1 | /* mbed Microcontroller Library |
AnnaBridge | 189:f392fc9709a3 | 2 | * Copyright (c) 2015 ARM Limited |
AnnaBridge | 189:f392fc9709a3 | 3 | * SPDX-License-Identifier: Apache-2.0 |
AnnaBridge | 189:f392fc9709a3 | 4 | * |
AnnaBridge | 189:f392fc9709a3 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 189:f392fc9709a3 | 6 | * you may not use this file except in compliance with the License. |
AnnaBridge | 189:f392fc9709a3 | 7 | * You may obtain a copy of the License at |
AnnaBridge | 189:f392fc9709a3 | 8 | * |
AnnaBridge | 189:f392fc9709a3 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 189:f392fc9709a3 | 10 | * |
AnnaBridge | 189:f392fc9709a3 | 11 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 189:f392fc9709a3 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 189:f392fc9709a3 | 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 189:f392fc9709a3 | 14 | * See the License for the specific language governing permissions and |
AnnaBridge | 189:f392fc9709a3 | 15 | * limitations under the License. |
AnnaBridge | 189:f392fc9709a3 | 16 | */ |
AnnaBridge | 189:f392fc9709a3 | 17 | #ifndef MBED_LOWPOWERTICKER_H |
AnnaBridge | 189:f392fc9709a3 | 18 | #define MBED_LOWPOWERTICKER_H |
AnnaBridge | 189:f392fc9709a3 | 19 | |
AnnaBridge | 189:f392fc9709a3 | 20 | #include "platform/platform.h" |
AnnaBridge | 189:f392fc9709a3 | 21 | #include "drivers/Ticker.h" |
AnnaBridge | 189:f392fc9709a3 | 22 | #include "platform/NonCopyable.h" |
AnnaBridge | 189:f392fc9709a3 | 23 | |
AnnaBridge | 189:f392fc9709a3 | 24 | #if defined (DEVICE_LPTICKER) || defined(DOXYGEN_ONLY) |
AnnaBridge | 189:f392fc9709a3 | 25 | |
AnnaBridge | 189:f392fc9709a3 | 26 | #include "hal/lp_ticker_api.h" |
AnnaBridge | 189:f392fc9709a3 | 27 | |
AnnaBridge | 189:f392fc9709a3 | 28 | namespace mbed { |
AnnaBridge | 189:f392fc9709a3 | 29 | /** \addtogroup drivers */ |
AnnaBridge | 189:f392fc9709a3 | 30 | |
AnnaBridge | 189:f392fc9709a3 | 31 | /** Low Power Ticker |
AnnaBridge | 189:f392fc9709a3 | 32 | * |
AnnaBridge | 189:f392fc9709a3 | 33 | * @note Synchronization level: Interrupt safe |
AnnaBridge | 189:f392fc9709a3 | 34 | * @ingroup drivers |
AnnaBridge | 189:f392fc9709a3 | 35 | */ |
AnnaBridge | 189:f392fc9709a3 | 36 | class LowPowerTicker : public Ticker, private NonCopyable<LowPowerTicker> { |
AnnaBridge | 189:f392fc9709a3 | 37 | |
AnnaBridge | 189:f392fc9709a3 | 38 | public: |
AnnaBridge | 189:f392fc9709a3 | 39 | LowPowerTicker() : Ticker(get_lp_ticker_data()) |
AnnaBridge | 189:f392fc9709a3 | 40 | { |
AnnaBridge | 189:f392fc9709a3 | 41 | } |
AnnaBridge | 189:f392fc9709a3 | 42 | |
AnnaBridge | 189:f392fc9709a3 | 43 | virtual ~LowPowerTicker() |
AnnaBridge | 189:f392fc9709a3 | 44 | { |
AnnaBridge | 189:f392fc9709a3 | 45 | } |
AnnaBridge | 189:f392fc9709a3 | 46 | }; |
AnnaBridge | 189:f392fc9709a3 | 47 | |
AnnaBridge | 189:f392fc9709a3 | 48 | } // namespace mbed |
AnnaBridge | 189:f392fc9709a3 | 49 | |
AnnaBridge | 189:f392fc9709a3 | 50 | #endif |
AnnaBridge | 189:f392fc9709a3 | 51 | |
AnnaBridge | 189:f392fc9709a3 | 52 | #endif |