summaryrefslogtreecommitdiff
path: root/gpsflash.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-07-29 20:21:23 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-07-29 20:21:23 +0000
commite217ee3a26ee0083dee63d328de20efefc45dc04 (patch)
tree14d33dabf0c0ad83f629dee89c3f98bdd53abf6a /gpsflash.h
parentc19f8598ae3148d7ebd8f0907a1d8114e017ce2f (diff)
downloadgpsd-e217ee3a26ee0083dee63d328de20efefc45dc04.tar.gz
Added expect(), so we can get a version string from the GPS.
Diffstat (limited to 'gpsflash.h')
-rw-r--r--gpsflash.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gpsflash.h b/gpsflash.h
index a8c3d92c..0185b17a 100644
--- a/gpsflash.h
+++ b/gpsflash.h
@@ -36,11 +36,13 @@
#include <stdbool.h>
struct flashloader_t {
+ const char *name;
const char *flashloader;
size_t min_loader_size, max_loader_size;
size_t min_firmware_size, max_firmware_size;
+ int (*probe)(int fd, char **version);
int (*port_setup)(int fd, struct termios *term);
- int (*version_check)(int fd);
+ int (*version_check)(int fd, const char *);
int (*stage1_command)(int fd);
int (*loader_send)(int pfd, struct termios *term, char *loader, size_t ls);
int (*stage2_command)(int fd);
@@ -54,5 +56,6 @@ int serialConfig(int, struct termios *, int);
int serialSpeed(int, struct termios *, int);
int srecord_send(int pfd, char *fw, size_t len);
int binary_send(int pfd, char *data, size_t ls);
+bool expect(int pfd, const char *str, size_t len, time_t timeout);
#endif /* _GPSFLASH_H_ */