root / tooltron_mb.h @ a96c5547
History | View | Annotate | Download (1.04 KB)
1 |
#ifndef TOOLTRON_MB_H
|
---|---|
2 |
#define TOOLTRON_MB_H
|
3 |
|
4 |
/*
|
5 |
* Input registers, 16 bit read only
|
6 |
*/
|
7 |
|
8 |
/* Serial number from rfid reader, or 0 if there is no rfid tag present */
|
9 |
#define MB_INP_SERNOL 0 |
10 |
#define MB_INP_SERNOH 1 |
11 |
|
12 |
/* Value from current sensor */
|
13 |
#define MB_INP_CURRENT 2 |
14 |
|
15 |
/*
|
16 |
* Coils, 1 bit read/write
|
17 |
*/
|
18 |
|
19 |
/* When 1, there is a new rfid tag in the tool. Automatically cleared when the
|
20 |
* main box writes to MB_COIL_EN */
|
21 |
#define MB_COIL_NEW 0 |
22 |
|
23 |
/* When 1, the tool receives power. Write 1 or 0 to grant or deny an access
|
24 |
* request, respectively. If the tool is running, write 0 to immediately shut
|
25 |
* off the tool */
|
26 |
#define MB_COIL_EN 1 |
27 |
|
28 |
/* Write 1 to request that the tool is disabled soon (what that means will be
|
29 |
* determined later) */
|
30 |
#define MB_COIL_REQ_DIS 2 |
31 |
|
32 |
/* When 1, tool has been properly initialized. When 0, tool has lost power and
|
33 |
* the main box should rewrite values for current limits (to be implemented
|
34 |
* later) */
|
35 |
#define MB_COIL_INIT 3 |
36 |
|
37 |
/* Number of coils */
|
38 |
#define N_COILS 4 |
39 |
|
40 |
/*
|
41 |
* Other things
|
42 |
*/
|
43 |
|
44 |
#define MB_BAUD 9600 |
45 |
|
46 |
#endif
|