summaryrefslogtreecommitdiff
path: root/libtwn3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtwn3.c')
-rw-r--r--libtwn3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libtwn3.c b/libtwn3.c
index e07fbb5..4d862cd 100644
--- a/libtwn3.c
+++ b/libtwn3.c
@@ -162,6 +162,11 @@ ssize_t twn3_sync_command(int fd, uint8_t flags, uint8_t* cmd, size_t cmd_len, u
return twn3_receive_response(fd, flags, response, max_length);
}
+int twn3_sync_restart(int fd, uint8_t flags){
+ ssize_t bytes = twn3_sync_command(fd, flags, (uint8_t*) "x", 1, NULL, 0);
+ return (bytes >= 2) ? 0 : -1;
+}
+
int twn3_sync_read_version(int fd, uint8_t flags, char* version, size_t max_length){
ssize_t bytes = twn3_sync_command(fd, flags, (uint8_t*) "v", 1, (uint8_t*) version, max_length);
if(bytes >= max_length){