-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefines.h
executable file
·74 lines (44 loc) · 1.29 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* defines.h
*/
#ifndef __DEFINES_H
#define __DEFINES_H
#define PORT_OUT 0
#define PORT_IN 1
#define USE_ECAN
#define RP(N) N
#define NO_OPEN_DRAIN 0
#define OPEN_DRAIN 1
#define ON 1
#define OFF 0
#define OK 1
#define WARNING 0
#define TRUE 1
#define FALSE 0
#define INSIDE 1
#define OUTSIDE 0
//define batmeter
#define N_SENS 12 //sensori totali (numero pari in quanto divisi in due file)
//~ da 0 a N_SENS/2 -1 si hanno i sensori del lato interno
//~ da N_SENS/2 fino a N_SENS -1 si hanno i sensori esterni
#define QUEUETIMEOUT 200 // TODO: definire tale valore sperimentalmente
#define RESET_TIME 1000 // TODO: mettere un valore più alto
#define FREQ_CAMPIONAMENTO 272 // campionamento ogni 0.0072 Sec.
//(5 campionamenti per un pipistrello lungo 5 cm che viaggia a 50 km/h)
//#define FREQ_CAMPIONAMENTO 3000 //test value
//#define EXTERNAL_CLOCK
#define INTERNAL_CLOCK
#if defined(EXTERNAL_CLOCK) && defined(INTERNAL_CLOCK)
#error Both EXTERNAL_CLOCK and INTERNAL_CLOCK defined
#endif
#if !defined(EXTERNAL_CLOCK) && !defined(INTERNAL_CLOCK)
#error None of EXTERNAL_CLOCK and INTERNAL_CLOCK defined
#endif
#ifdef EXTERNAL_CLOCK
#define FCY (77414400 / 2)
#endif
#ifdef INTERNAL_CLOCK
#define FCY (77385000 / 2)
#endif
typedef unsigned char uint8_t;
#endif