ao-tools/ao-test-gps: Improve output formatting
[fw/altos] / ao-tools / ao-sky-flash / sky_flash.h
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16  */
17
18 /* sky_serial.c */
19
20 extern int      skytraq_open_time;
21 extern int      skytraq_verbose;
22
23 int
24 skytraq_open(const char *path);
25
26 int
27 skytraq_setspeed(int fd, int baud);
28
29 int
30 skytraq_setcomm(int fd, int baudrate);
31
32 int
33 skytraq_write(int fd, const char *data, int len);
34
35 int
36 skytraq_waitchar(int fd, int timeout);
37
38 int
39 skytraq_waitstatus(int fd, const char *status, int timeout);
40
41 void
42 skytraq_flush(int fd);
43
44 int
45 skytraq_cmd_wait(int fd, const char *message, int len, const char *status, int timeout);
46
47 int
48 skytraq_cmd_nowait(int fd, const char *message, int len);
49
50 /* sky_debug.c */
51
52 void
53 skytraq_dbg_printf(int input, const char *fmt, ...);
54
55 void
56 skytraq_dbg_buf(int input, const char *buf, int len);
57
58 void
59 skytraq_dbg_char(int input, char c);
60
61 /* sky_srec.c */
62 int
63 skytraq_send_srec(int fd, const char *file);
64
65 /* sky_bin.c */
66 int
67 skytraq_send_bin(int fd, const char *filename);