mbed library sources. Supersedes mbed-src. Fixed broken STM32F1xx RTC on rtc_api.c

Dependents:   Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay

Fork of mbed-dev by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_wait_api.h Source File

mbed_wait_api.h

00001 
00002 /** \addtogroup platform */
00003 /** @{*/
00004 /* mbed Microcontroller Library
00005  * Copyright (c) 2006-2013 ARM Limited
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 #ifndef MBED_WAIT_API_H
00020 #define MBED_WAIT_API_H
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 /** Generic wait functions.
00027  *
00028  * These provide simple NOP type wait capabilities.
00029  *
00030  * Example:
00031  * @code
00032  * #include "mbed.h"
00033  *
00034  * DigitalOut heartbeat(LED1);
00035  *
00036  * int main() {
00037  *     while (1) {
00038  *         heartbeat = 1;
00039  *         wait(0.5);
00040  *         heartbeat = 0;
00041  *         wait(0.5);
00042  *     }
00043  * }
00044  * @endcode
00045  */
00046 
00047 /** Waits for a number of seconds, with microsecond resolution (within
00048  *  the accuracy of single precision floating point).
00049  *
00050  *  @param s number of seconds to wait
00051  */
00052 void wait(float s);
00053 
00054 /** Waits a number of milliseconds.
00055  *
00056  *  @param ms the whole number of milliseconds to wait
00057  */
00058 void wait_ms(int ms);
00059 
00060 /** Waits a number of microseconds.
00061  *
00062  *  @param us the whole number of microseconds to wait
00063  */
00064 void wait_us(int us);
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif
00071 
00072 /** @}*/