lib_Mbed_LPS

Committer:
YSI
Date:
Fri Oct 23 08:07:07 2015 +0000
Revision:
0:a217c0617441
Child:
1:4d90513f226d
lib_Mbed_LPS

Who changed what in which revision?

UserRevisionLine numberNew contents of line
YSI 0:a217c0617441 1 /** Lib Mbed LPS
YSI 0:a217c0617441 2 *
YSI 0:a217c0617441 3 * Copyright (c) 2014, cstyles (http://mbed.org)
YSI 0:a217c0617441 4 *
YSI 0:a217c0617441 5 * Exemple:
YSI 0:a217c0617441 6 * @code
YSI 0:a217c0617441 7 * #include "mbed.h"
YSI 0:a217c0617441 8 * #include "lib_Mbed_LPS.h"
YSI 0:a217c0617441 9 *
YSI 0:a217c0617441 10 *
YSI 0:a217c0617441 11 * Serial pc(USBTX,USBRX);
YSI 0:a217c0617441 12 *
YSI 0:a217c0617441 13 * void interruption_serie(void);
YSI 0:a217c0617441 14 *
YSI 0:a217c0617441 15 *
YSI 0:a217c0617441 16 * int main()
YSI 0:a217c0617441 17 * {
YSI 0:a217c0617441 18 * if(checkIDs()) return 0;
YSI 0:a217c0617441 19 * pc.attach(&interruption_serie);
YSI 0:a217c0617441 20 *
YSI 0:a217c0617441 21 * while(1)
YSI 0:a217c0617441 22 * {
YSI 0:a217c0617441 23 * wait(0.25);
YSI 0:a217c0617441 24 * }
YSI 0:a217c0617441 25 * }
YSI 0:a217c0617441 26 *
YSI 0:a217c0617441 27 * void interruption_serie(void)
YSI 0:a217c0617441 28 * {
YSI 0:a217c0617441 29 * char caractere = pc.getc();
YSI 0:a217c0617441 30 * switch(caractere)
YSI 0:a217c0617441 31 * {
YSI 0:a217c0617441 32 * case '?':
YSI 0:a217c0617441 33 * pc.printf("%s\r\n",getLastMbedFileName());
YSI 0:a217c0617441 34 * break;
YSI 0:a217c0617441 35 * }
YSI 0:a217c0617441 36 * }
YSI 0:a217c0617441 37 * @endcode
YSI 0:a217c0617441 38 * @file lib_Mbed_LPS.h
YSI 0:a217c0617441 39 * @purpose library for Mbed LPS
YSI 0:a217c0617441 40 * @date 2015
YSI 0:a217c0617441 41 * @author Yannic Simon
YSI 0:a217c0617441 42 */
YSI 0:a217c0617441 43
YSI 0:a217c0617441 44 #ifndef DEF_lib_Mbed_LPS_H
YSI 0:a217c0617441 45 #define DEF_lib_Mbed_LPS_H
YSI 0:a217c0617441 46
YSI 0:a217c0617441 47 #include "mbed.h"
YSI 0:a217c0617441 48
YSI 0:a217c0617441 49 void getMbedID(char *ID);
YSI 0:a217c0617441 50
YSI 0:a217c0617441 51 bool checkIDs(void);
YSI 0:a217c0617441 52
YSI 0:a217c0617441 53 char * getLastMbedFileName(void);
YSI 0:a217c0617441 54
YSI 0:a217c0617441 55 #endif