From a7c6ecb320ff1ba6ee85767bffde41cfab1a0cd0 Mon Sep 17 00:00:00 2001 From: cbdev Date: Thu, 24 Aug 2023 02:06:48 +0200 Subject: Mifare prototypes --- libtwn3.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libtwn3.c') 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){ -- cgit v1.2.3