Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

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  */
00045 
00046 /** Waits for a number of seconds, with microsecond resolution (within
00047  *  the accuracy of single precision floating point).
00048  *
00049  *  @param s number of seconds to wait
00050  */
00051 void wait(float s);
00052 
00053 /** Waits a number of milliseconds.
00054  *
00055  *  @param ms the whole number of milliseconds to wait
00056  */
00057 void wait_ms(int ms);
00058 
00059 /** Waits a number of microseconds.
00060  *
00061  *  @param us the whole number of microseconds to wait
00062  */
00063 void wait_us(int us);
00064 
00065 #ifdef __cplusplus
00066 }
00067 #endif
00068 
00069 #endif
00070 
00071 /** @}*/