blob: 7383d1c9387ecf2abe6e7d670a888d5001e4b482 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef foomodemhfoo
#define foomodemhfoo
enum modem_state { MODEM_STATE_INIT, MODEM_STATE_AUDIO_SIMPLE, MODEM_STATE_AUDIO_SHBUF, MODEM_STATE_DONE };
#define MODEM_BUF_LEN (10*1024)
struct modem {
char *dev;
int fd;
char *ouput_buf;
size_t output_buf_len;
char *input_buf;
size_t input_buf_len;
enum modem_state state;
pid_t child_pid;
struct timeval timeout;
};
struct modem *modem_open(const char *dev);
void modem_close(struct modem *m);
#endif
|