Grelet Jacques
/
Ni-MH_V3
example code using statis library for temperature measurement with LM35 and LM335
include/util.h@4:ffc39af07ade, 2012-11-22 (annotated)
- Committer:
- greletj
- Date:
- Thu Nov 22 15:57:35 2012 +0000
- Revision:
- 4:ffc39af07ade
- Child:
- 5:0b3569945178
version with liboutils
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
greletj | 4:ffc39af07ade | 1 | /* anciennement sys.h */ |
greletj | 4:ffc39af07ade | 2 | |
greletj | 4:ffc39af07ade | 3 | typedef void procedure; |
greletj | 4:ffc39af07ade | 4 | typedef unsigned char booleen; |
greletj | 4:ffc39af07ade | 5 | typedef void *pointeur; |
greletj | 4:ffc39af07ade | 6 | |
greletj | 4:ffc39af07ade | 7 | #ifndef FALSE |
greletj | 4:ffc39af07ade | 8 | # define FALSE 0 |
greletj | 4:ffc39af07ade | 9 | #endif |
greletj | 4:ffc39af07ade | 10 | #ifndef TRUE |
greletj | 4:ffc39af07ade | 11 | # define TRUE 1 |
greletj | 4:ffc39af07ade | 12 | #endif |
greletj | 4:ffc39af07ade | 13 | |
greletj | 4:ffc39af07ade | 14 | #define ALLOUE( nb,type ) (type *) calloc( nb,sizeof( type ) ) |
greletj | 4:ffc39af07ade | 15 | #define LIBERE( var ) if( var ) free( (void *) var ) |
greletj | 4:ffc39af07ade | 16 | |
greletj | 4:ffc39af07ade | 17 | #define FARALLOUE( nb,type ) (type *) calloc( nb, sizeof( type ) ) |
greletj | 4:ffc39af07ade | 18 | #define FARLIBERE( var ) if( var ) free( (void *) var ) |
greletj | 4:ffc39af07ade | 19 | |
greletj | 4:ffc39af07ade | 20 | /* util.h */ |
greletj | 4:ffc39af07ade | 21 | |
greletj | 4:ffc39af07ade | 22 | typedef char STRING[ 41 ]; |
greletj | 4:ffc39af07ade | 23 | #define MAX_CHAR_POOL 4096 /* 4Ko de chaines */ |
greletj | 4:ffc39af07ade | 24 | |
greletj | 4:ffc39af07ade | 25 | /***************************************************************************** |
greletj | 4:ffc39af07ade | 26 | *****************************************************************************/ |
greletj | 4:ffc39af07ade | 27 | /* |
greletj | 4:ffc39af07ade | 28 | class Delais{ |
greletj | 4:ffc39af07ade | 29 | private : |
greletj | 4:ffc39af07ade | 30 | long tick, |
greletj | 4:ffc39af07ade | 31 | tloc; |
greletj | 4:ffc39af07ade | 32 | int arme; |
greletj | 4:ffc39af07ade | 33 | |
greletj | 4:ffc39af07ade | 34 | public : |
greletj | 4:ffc39af07ade | 35 | booleen claque( void ); |
greletj | 4:ffc39af07ade | 36 | Delais( long ); |
greletj | 4:ffc39af07ade | 37 | }; |
greletj | 4:ffc39af07ade | 38 | */ |
greletj | 4:ffc39af07ade | 39 | |
greletj | 4:ffc39af07ade | 40 | double convert_position( double data ); |
greletj | 4:ffc39af07ade | 41 | double temps( unsigned jour_julien, double heure ); |
greletj | 4:ffc39af07ade | 42 | |
greletj | 4:ffc39af07ade | 43 | |
greletj | 4:ffc39af07ade | 44 | STRING *gen_str( unsigned taille /*= 80*/ ); |
greletj | 4:ffc39af07ade | 45 |