Project

General

Profile

Statistics
| Branch: | Revision:

root / mainbox / tool.h @ 15fa09f7

History | View | Annotate | Download (428 Bytes)

1
#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
  int address;
14
  int connected;
15
  enum toolstate_t state;
16
  unsigned int user;
17
};
18

    
19
#define TOOL_DECL(name, addr) {name, addr, 1, TS_INIT, 0}
20

    
21
int tool_init_mb(const char *device);
22
void tool_close_mb();
23
void tool_request_disable(struct tool_t *tool);
24
void tool_poll(struct tool_t *tool);
25

    
26
#endif