mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

Committer:
emilmont
Date:
Fri Nov 09 11:33:53 2012 +0000
Revision:
8:c14af7958ef5
Parent:
0:8024c367e29f
Child:
9:663789d7729f
SPI driver; ADC driver; DAC driver; microlib support; general bugfixing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 8:c14af7958ef5 1 /** Generic wait functions.
emilmont 0:8024c367e29f 2 *
emilmont 0:8024c367e29f 3 * These provide simple NOP type wait capabilities.
emilmont 0:8024c367e29f 4 *
emilmont 0:8024c367e29f 5 * Example:
emilmont 8:c14af7958ef5 6 * @code
emilmont 8:c14af7958ef5 7 * #include "mbed.h"
emilmont 8:c14af7958ef5 8 *
emilmont 8:c14af7958ef5 9 * DigitalOut heartbeat(LED1);
emilmont 8:c14af7958ef5 10 *
emilmont 8:c14af7958ef5 11 * int main() {
emilmont 8:c14af7958ef5 12 * while (1) {
emilmont 8:c14af7958ef5 13 * heartbeat = 1;
emilmont 8:c14af7958ef5 14 * wait(0.5);
emilmont 8:c14af7958ef5 15 * heartbeat = 0;
emilmont 8:c14af7958ef5 16 * wait(0.5);
emilmont 8:c14af7958ef5 17 * }
emilmont 8:c14af7958ef5 18 * }
emilmont 0:8024c367e29f 19 */
emilmont 0:8024c367e29f 20
emilmont 0:8024c367e29f 21 /* mbed Microcontroller Library - wait_api
emilmont 0:8024c367e29f 22 * Copyright (c) 2009 ARM Limited. All rights reserved.
emilmont 0:8024c367e29f 23 */
emilmont 0:8024c367e29f 24
emilmont 0:8024c367e29f 25 #ifndef MBED_WAIT_API_H
emilmont 0:8024c367e29f 26 #define MBED_WAIT_API_H
emilmont 0:8024c367e29f 27
emilmont 0:8024c367e29f 28 #ifdef __cplusplus
emilmont 0:8024c367e29f 29 extern "C" {
emilmont 0:8024c367e29f 30 #endif
emilmont 0:8024c367e29f 31
emilmont 8:c14af7958ef5 32 /** Waits for a number of seconds, with microsecond resolution (within
emilmont 0:8024c367e29f 33 * the accuracy of single precision floating point).
emilmont 0:8024c367e29f 34 *
emilmont 8:c14af7958ef5 35 * @param s number of seconds to wait
emilmont 0:8024c367e29f 36 */
emilmont 0:8024c367e29f 37 void wait(float s);
emilmont 0:8024c367e29f 38
emilmont 8:c14af7958ef5 39 /** Waits a number of milliseconds.
emilmont 0:8024c367e29f 40 *
emilmont 8:c14af7958ef5 41 * @param ms the whole number of milliseconds to wait
emilmont 0:8024c367e29f 42 */
emilmont 0:8024c367e29f 43 void wait_ms(int ms);
emilmont 0:8024c367e29f 44
emilmont 8:c14af7958ef5 45 /** Waits a number of microseconds.
emilmont 0:8024c367e29f 46 *
emilmont 8:c14af7958ef5 47 * @param us the whole number of microseconds to wait
emilmont 0:8024c367e29f 48 */
emilmont 0:8024c367e29f 49 void wait_us(int us);
emilmont 0:8024c367e29f 50
emilmont 0:8024c367e29f 51 #ifdef __cplusplus
emilmont 0:8024c367e29f 52 }
emilmont 0:8024c367e29f 53 #endif
emilmont 0:8024c367e29f 54
emilmont 0:8024c367e29f 55 #endif