Home Alert System
Dependencies: PWM_Tone_Library DHT
mbed/LowPowerTimeout.h@5:569a4894abc1, 2019-03-08 (annotated)
- Committer:
- aziz111
- Date:
- Fri Mar 08 17:15:02 2019 +0000
- Revision:
- 5:569a4894abc1
- Parent:
- 3:78f223d34f36
Final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ethaderu | 3:78f223d34f36 | 1 | /* mbed Microcontroller Library |
ethaderu | 3:78f223d34f36 | 2 | * Copyright (c) 2015 ARM Limited |
ethaderu | 3:78f223d34f36 | 3 | * |
ethaderu | 3:78f223d34f36 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
ethaderu | 3:78f223d34f36 | 5 | * you may not use this file except in compliance with the License. |
ethaderu | 3:78f223d34f36 | 6 | * You may obtain a copy of the License at |
ethaderu | 3:78f223d34f36 | 7 | * |
ethaderu | 3:78f223d34f36 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
ethaderu | 3:78f223d34f36 | 9 | * |
ethaderu | 3:78f223d34f36 | 10 | * Unless required by applicable law or agreed to in writing, software |
ethaderu | 3:78f223d34f36 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
ethaderu | 3:78f223d34f36 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ethaderu | 3:78f223d34f36 | 13 | * See the License for the specific language governing permissions and |
ethaderu | 3:78f223d34f36 | 14 | * limitations under the License. |
ethaderu | 3:78f223d34f36 | 15 | */ |
ethaderu | 3:78f223d34f36 | 16 | #ifndef MBED_LOWPOWERTIMEOUT_H |
ethaderu | 3:78f223d34f36 | 17 | #define MBED_LOWPOWERTIMEOUT_H |
ethaderu | 3:78f223d34f36 | 18 | |
ethaderu | 3:78f223d34f36 | 19 | #include "platform.h" |
ethaderu | 3:78f223d34f36 | 20 | |
ethaderu | 3:78f223d34f36 | 21 | #if DEVICE_LOWPOWERTIMER |
ethaderu | 3:78f223d34f36 | 22 | |
ethaderu | 3:78f223d34f36 | 23 | #include "lp_ticker_api.h" |
ethaderu | 3:78f223d34f36 | 24 | #include "LowPowerTicker.h" |
ethaderu | 3:78f223d34f36 | 25 | |
ethaderu | 3:78f223d34f36 | 26 | namespace mbed { |
ethaderu | 3:78f223d34f36 | 27 | |
ethaderu | 3:78f223d34f36 | 28 | /** Low Power Timout |
ethaderu | 3:78f223d34f36 | 29 | */ |
ethaderu | 3:78f223d34f36 | 30 | class LowPowerTimeout : public LowPowerTicker { |
ethaderu | 3:78f223d34f36 | 31 | |
ethaderu | 3:78f223d34f36 | 32 | private: |
ethaderu | 3:78f223d34f36 | 33 | virtual void handler(void) { |
ethaderu | 3:78f223d34f36 | 34 | _function.call(); |
ethaderu | 3:78f223d34f36 | 35 | } |
ethaderu | 3:78f223d34f36 | 36 | }; |
ethaderu | 3:78f223d34f36 | 37 | |
ethaderu | 3:78f223d34f36 | 38 | } |
ethaderu | 3:78f223d34f36 | 39 | |
ethaderu | 3:78f223d34f36 | 40 | #endif |
ethaderu | 3:78f223d34f36 | 41 | |
ethaderu | 3:78f223d34f36 | 42 | #endif |