Project

General

Profile

Statistics
| Branch: | Revision:

root / mainbox / tool.h @ 75cef49f

History | View | Annotate | Download (459 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
  struct event_t *event;
18
};
19

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

    
22
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