blob: a7f5363e0760f0945d1fbf7b23b3a24d68cf4a00 (
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
29
30
31
32
33
34
|
/*
* xbee_io.h
* xbee_test
*
* Created by Tymm on 11/24/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#ifndef XBEE_IO_H
#define XBEE_IO_H
#include <pthread.h>
#include "xbee.h"
#define XBEE_IO_BUFSIZ 16384
typedef struct {
int fd;
int pipe_fds[2]; // For indicating new data ready
pthread_t io_thread;
int io_done;
int io_running;
int out_buffer_start;
int out_buffer_end;
char out_buffer[XBEE_IO_BUFSIZ];
} xbee_io_context_t;
int xbee_new_io_thread(xbee_t *xbee);
int xbee_kill_io_thread(xbee_t *xbee);
#endif /* #ifndef XBEE_IO_H ... */
|