Last change
on this file since 82 was
82,
checked in by sven, 11 years ago
|
Wiring/PSeudosprache fertiggeschrieben.
|
File size:
1004 bytes
|
Rev | Line | |
---|
[79] | 1 | /* |
---|
| 2 | * pseudosprache.h |
---|
| 3 | * |
---|
| 4 | * Eine "leichtgewichtige" Loesung, um scriptartig und sehr einfach den |
---|
| 5 | * "Spielplan" zu formulieren. Ohne Compiler und Textfile - pure C. |
---|
| 6 | * |
---|
| 7 | * Created: 10.08.2013 14:05:02 |
---|
| 8 | * Author: Sven |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | #ifndef PSEUDOSPRACHE_H_ |
---|
| 13 | #define PSEUDOSPRACHE_H_ |
---|
| 14 | |
---|
[80] | 15 | #include "wiring.h" |
---|
[81] | 16 | #include "math.h" |
---|
[80] | 17 | |
---|
[79] | 18 | void abspielen(); // Header signature for main.c |
---|
| 19 | |
---|
[82] | 20 | // Deppen-True/False |
---|
| 21 | #define AN TRUE // true in C99 |
---|
| 22 | #define EIN AN |
---|
| 23 | #define AUS FALSE // false in C99 |
---|
[79] | 24 | |
---|
| 25 | // Schlafen/Warten: Einfache Formulierung |
---|
| 26 | |
---|
[80] | 27 | // Basiseinheit sind Millisekunden |
---|
[81] | 28 | #define MILLISEKUNDEN 1.0 |
---|
[80] | 29 | #define MILLISEKUNDE MILLISEKUNDEN |
---|
[81] | 30 | #define SEKUNDEN 1000.0 * MILLISEKUNDEN |
---|
[79] | 31 | #define SEKUNDE SEKUNDEN |
---|
| 32 | |
---|
[81] | 33 | #define warte(dauer) _delay_ms(dauer) |
---|
| 34 | |
---|
| 35 | /* |
---|
| 36 | #define warte(dauer) \ |
---|
| 37 | //static inline void warte(double dauer) { |
---|
| 38 | while(dauer >= SEKUNDEN) { \ |
---|
| 39 | _delay_ms((int) SEKUNDE); \ |
---|
| 40 | dauer -= SEKUNDE; \ |
---|
| 41 | } \ |
---|
[80] | 42 | while(dauer > MILLISEKUNDEN) |
---|
[81] | 43 | _delay_ms((int)); |
---|
[79] | 44 | } |
---|
[81] | 45 | */ |
---|
[79] | 46 | |
---|
| 47 | |
---|
| 48 | #endif /* PSEUDOSPRACHE_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.