CDY version that shares functionality with Counter
Dependencies: SDFileSystem_HelloWorld mbed FATFileSystem
mbed/drivers/LowPowerTicker.h@3:c547dba5d39b, 2018-11-05 (annotated)
- Committer:
- Charles David Young
- Date:
- Mon Nov 05 09:52:17 2018 -0700
- Revision:
- 3:c547dba5d39b
- Parent:
- 0:aa13e1c335cd
debug
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Charles David Young |
0:aa13e1c335cd | 1 | /* mbed Microcontroller Library |
Charles David Young |
0:aa13e1c335cd | 2 | * Copyright (c) 2015 ARM Limited |
Charles David Young |
0:aa13e1c335cd | 3 | * |
Charles David Young |
0:aa13e1c335cd | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Charles David Young |
0:aa13e1c335cd | 5 | * you may not use this file except in compliance with the License. |
Charles David Young |
0:aa13e1c335cd | 6 | * You may obtain a copy of the License at |
Charles David Young |
0:aa13e1c335cd | 7 | * |
Charles David Young |
0:aa13e1c335cd | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Charles David Young |
0:aa13e1c335cd | 9 | * |
Charles David Young |
0:aa13e1c335cd | 10 | * Unless required by applicable law or agreed to in writing, software |
Charles David Young |
0:aa13e1c335cd | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Charles David Young |
0:aa13e1c335cd | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Charles David Young |
0:aa13e1c335cd | 13 | * See the License for the specific language governing permissions and |
Charles David Young |
0:aa13e1c335cd | 14 | * limitations under the License. |
Charles David Young |
0:aa13e1c335cd | 15 | */ |
Charles David Young |
0:aa13e1c335cd | 16 | #ifndef MBED_LOWPOWERTICKER_H |
Charles David Young |
0:aa13e1c335cd | 17 | #define MBED_LOWPOWERTICKER_H |
Charles David Young |
0:aa13e1c335cd | 18 | |
Charles David Young |
0:aa13e1c335cd | 19 | #include "platform/platform.h" |
Charles David Young |
0:aa13e1c335cd | 20 | #include "drivers/Ticker.h" |
Charles David Young |
0:aa13e1c335cd | 21 | |
Charles David Young |
0:aa13e1c335cd | 22 | #if DEVICE_LOWPOWERTIMER |
Charles David Young |
0:aa13e1c335cd | 23 | |
Charles David Young |
0:aa13e1c335cd | 24 | #include "hal/lp_ticker_api.h" |
Charles David Young |
0:aa13e1c335cd | 25 | |
Charles David Young |
0:aa13e1c335cd | 26 | namespace mbed { |
Charles David Young |
0:aa13e1c335cd | 27 | /** \addtogroup drivers */ |
Charles David Young |
0:aa13e1c335cd | 28 | /** @{*/ |
Charles David Young |
0:aa13e1c335cd | 29 | |
Charles David Young |
0:aa13e1c335cd | 30 | /** Low Power Ticker |
Charles David Young |
0:aa13e1c335cd | 31 | * |
Charles David Young |
0:aa13e1c335cd | 32 | * @Note Synchronization level: Interrupt safe |
Charles David Young |
0:aa13e1c335cd | 33 | */ |
Charles David Young |
0:aa13e1c335cd | 34 | class LowPowerTicker : public Ticker { |
Charles David Young |
0:aa13e1c335cd | 35 | |
Charles David Young |
0:aa13e1c335cd | 36 | public: |
Charles David Young |
0:aa13e1c335cd | 37 | LowPowerTicker() : Ticker(get_lp_ticker_data()) { |
Charles David Young |
0:aa13e1c335cd | 38 | } |
Charles David Young |
0:aa13e1c335cd | 39 | |
Charles David Young |
0:aa13e1c335cd | 40 | virtual ~LowPowerTicker() { |
Charles David Young |
0:aa13e1c335cd | 41 | } |
Charles David Young |
0:aa13e1c335cd | 42 | }; |
Charles David Young |
0:aa13e1c335cd | 43 | |
Charles David Young |
0:aa13e1c335cd | 44 | } // namespace mbed |
Charles David Young |
0:aa13e1c335cd | 45 | |
Charles David Young |
0:aa13e1c335cd | 46 | #endif |
Charles David Young |
0:aa13e1c335cd | 47 | |
Charles David Young |
0:aa13e1c335cd | 48 | #endif |
Charles David Young |
0:aa13e1c335cd | 49 | |
Charles David Young |
0:aa13e1c335cd | 50 | /** @}*/ |