mbed library sources, mbed-dev only for TYBLE16
Fork of mbed-dev by
Please refer flowing link.
/users/kenjiArai/notebook/tyble16-module-will-become-a-mbed-family--mbedliza/
platform/mbed_wait_api.h@167:e84263d55307, 2017-06-21 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Jun 21 17:46:44 2017 +0100
- Revision:
- 167:e84263d55307
- Parent:
- 160:d5399cc887bb
- Child:
- 178:79309dc6340a
This updates the lib to the mbed lib v 145
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 160:d5399cc887bb | 1 | |
<> | 160:d5399cc887bb | 2 | /** \addtogroup platform */ |
<> | 160:d5399cc887bb | 3 | /** @{*/ |
<> | 160:d5399cc887bb | 4 | /* mbed Microcontroller Library |
<> | 160:d5399cc887bb | 5 | * Copyright (c) 2006-2013 ARM Limited |
<> | 160:d5399cc887bb | 6 | * |
<> | 160:d5399cc887bb | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
<> | 160:d5399cc887bb | 8 | * you may not use this file except in compliance with the License. |
<> | 160:d5399cc887bb | 9 | * You may obtain a copy of the License at |
<> | 160:d5399cc887bb | 10 | * |
<> | 160:d5399cc887bb | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 160:d5399cc887bb | 12 | * |
<> | 160:d5399cc887bb | 13 | * Unless required by applicable law or agreed to in writing, software |
<> | 160:d5399cc887bb | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
<> | 160:d5399cc887bb | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 160:d5399cc887bb | 16 | * See the License for the specific language governing permissions and |
<> | 160:d5399cc887bb | 17 | * limitations under the License. |
<> | 160:d5399cc887bb | 18 | */ |
<> | 160:d5399cc887bb | 19 | #ifndef MBED_WAIT_API_H |
<> | 160:d5399cc887bb | 20 | #define MBED_WAIT_API_H |
<> | 160:d5399cc887bb | 21 | |
<> | 160:d5399cc887bb | 22 | #ifdef __cplusplus |
<> | 160:d5399cc887bb | 23 | extern "C" { |
<> | 160:d5399cc887bb | 24 | #endif |
<> | 160:d5399cc887bb | 25 | |
<> | 160:d5399cc887bb | 26 | /** Generic wait functions. |
<> | 160:d5399cc887bb | 27 | * |
<> | 160:d5399cc887bb | 28 | * These provide simple NOP type wait capabilities. |
<> | 160:d5399cc887bb | 29 | * |
<> | 160:d5399cc887bb | 30 | * Example: |
<> | 160:d5399cc887bb | 31 | * @code |
<> | 160:d5399cc887bb | 32 | * #include "mbed.h" |
<> | 160:d5399cc887bb | 33 | * |
<> | 160:d5399cc887bb | 34 | * DigitalOut heartbeat(LED1); |
<> | 160:d5399cc887bb | 35 | * |
<> | 160:d5399cc887bb | 36 | * int main() { |
<> | 160:d5399cc887bb | 37 | * while (1) { |
<> | 160:d5399cc887bb | 38 | * heartbeat = 1; |
<> | 160:d5399cc887bb | 39 | * wait(0.5); |
<> | 160:d5399cc887bb | 40 | * heartbeat = 0; |
<> | 160:d5399cc887bb | 41 | * wait(0.5); |
<> | 160:d5399cc887bb | 42 | * } |
<> | 160:d5399cc887bb | 43 | * } |
AnnaBridge | 167:e84263d55307 | 44 | * @endcode |
<> | 160:d5399cc887bb | 45 | */ |
<> | 160:d5399cc887bb | 46 | |
<> | 160:d5399cc887bb | 47 | /** Waits for a number of seconds, with microsecond resolution (within |
<> | 160:d5399cc887bb | 48 | * the accuracy of single precision floating point). |
<> | 160:d5399cc887bb | 49 | * |
<> | 160:d5399cc887bb | 50 | * @param s number of seconds to wait |
<> | 160:d5399cc887bb | 51 | */ |
<> | 160:d5399cc887bb | 52 | void wait(float s); |
<> | 160:d5399cc887bb | 53 | |
<> | 160:d5399cc887bb | 54 | /** Waits a number of milliseconds. |
<> | 160:d5399cc887bb | 55 | * |
<> | 160:d5399cc887bb | 56 | * @param ms the whole number of milliseconds to wait |
<> | 160:d5399cc887bb | 57 | */ |
<> | 160:d5399cc887bb | 58 | void wait_ms(int ms); |
<> | 160:d5399cc887bb | 59 | |
<> | 160:d5399cc887bb | 60 | /** Waits a number of microseconds. |
<> | 160:d5399cc887bb | 61 | * |
<> | 160:d5399cc887bb | 62 | * @param us the whole number of microseconds to wait |
<> | 160:d5399cc887bb | 63 | */ |
<> | 160:d5399cc887bb | 64 | void wait_us(int us); |
<> | 160:d5399cc887bb | 65 | |
<> | 160:d5399cc887bb | 66 | #ifdef __cplusplus |
<> | 160:d5399cc887bb | 67 | } |
<> | 160:d5399cc887bb | 68 | #endif |
<> | 160:d5399cc887bb | 69 | |
<> | 160:d5399cc887bb | 70 | #endif |
<> | 160:d5399cc887bb | 71 | |
<> | 160:d5399cc887bb | 72 | /** @}*/ |