Project

General

Profile

Statistics
| Branch: | Revision:

root / tooltron_mb.h @ 20e5429c

History | View | Annotate | Download (1.05 KB)

1 20e5429c Tom Mullins
#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. The main box should either
20
 * write 1 to MB_COIL_EN, which automatically clears MB_COIL_NEW, or it should
21
 * write 0 directly to MB_COIL_NEW which denies the request */
22
#define MB_COIL_NEW     0
23
24
/* When 1, tool can be turned on. Write 0 to immediately shut off tool */
25
#define MB_COIL_EN      1
26
27
/* Write 1 to request that the tool is disabled soon (what that means will be
28
 * determined later) */
29
#define MB_COIL_REQ_DIS 2
30
31
/* When 1, tool has been properly initialized. When 0, tool has lost power and
32
 * the main box should rewrite values for current limits (to be implemented
33
 * later) */
34
#define MB_COIL_INIT    3
35
36
/*
37
 * Other things
38
 */
39
#define SLAVE_ADDR 4 // TODO move to makefile?
40
#define MB_BAUD 9600
41
42
#endif