root / mainbox / tool.h @ 5305e5e7
History | View | Annotate | Download (459 Bytes)
1 | 7bdb98c5 | Tom Mullins | #ifndef TOOL_H
|
---|---|---|---|
2 | #define TOOL_H
|
||
3 | |||
4 | enum toolstate_t {
|
||
5 | TS_INIT, |
||
6 | TS_OFF, |
||
7 | TS_REQ_DIS, |
||
8 | TS_ON |
||
9 | }; |
||
10 | |||
11 | struct tool_t {
|
||
12 | const char *name; |
||
13 | 15fa09f7 | Tom Mullins | int address;
|
14 | int connected;
|
||
15 | 7bdb98c5 | Tom Mullins | enum toolstate_t state;
|
16 | unsigned int user; |
||
17 | 75cef49f | Tom Mullins | struct event_t *event;
|
18 | 7bdb98c5 | Tom Mullins | }; |
19 | |||
20 | 75cef49f | Tom Mullins | #define TOOL_DECL(name, addr) {name, addr, 1, TS_INIT, 0, NULL} |
21 | 15fa09f7 | Tom Mullins | |
22 | 7bdb98c5 | Tom Mullins | int tool_init_mb(const char *device); |
23 | void tool_close_mb();
|
||
24 | void tool_request_disable(struct tool_t *tool); |
||
25 | void tool_poll(struct tool_t *tool); |
||
26 | |||
27 | #endif |