summaryrefslogtreecommitdiffstats
path: root/arduino/src/config.h
blob: 126e51f26d0480d16854b11883192a7a23edb963 (plain)
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
//Defines
/** 
 * Record size. 
 * @todo This should be EMEM_HASH_SIZE+1, but since we are low on epprom we save and check only first 6 bytes of hash. 
 */
#define EMEM_RECORD_SIZE (7)
/** First record ID. */
#define ENEM_MIN_ADR (1)
/** Last record ID. */
#define EMEM_MAX_ADR (100)
/** Invalid record ID. */
#define EMEM_INV_ADR (0)
/** Size of stored hash. */
#define EMEM_HASH_SIZE (32)
/** Flag that indicates (if defined) verbose mode (for diagnostic) */
#define DEBUG 1
/**
 * Flag that indicates (if defined) keyboard simulation mode (for diagnostic).
 * In this mode keyboard always return pin.
 */
//#define DEBUG_KEYPAD_SIM 1
/** Max length of message from rfid reader. */
#define RF_MAX_BYTES (16)
/** Max length of message from or to PC. */
#define PC_MAX_BYTES (2+1+4+1+EMEM_HASH_SIZE*2+1+8+1)
/** Period for quering rfid reader. */
#define RF_PERIOD_MS (500)