summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2023-08-26 22:33:11 +0200
committercbdev <cb@cbcdn.com>2023-08-26 22:33:11 +0200
commit5bae6490866936e519c526f94afa2b8444201d30 (patch)
treee1924385c0fd18c054d41ecd537bd49b85aaccd4
parent2d2c7d80ca6a90d0b0eef469fa4bf68c0d71c722 (diff)
downloadlibtwn-master.tar.gz
libtwn-master.tar.bz2
libtwn-master.zip
Namespace enum constantsHEADmaster
-rw-r--r--libtwn3.c4
-rw-r--r--libtwn3.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/libtwn3.c b/libtwn3.c
index 6359995..4a63186 100644
--- a/libtwn3.c
+++ b/libtwn3.c
@@ -273,9 +273,9 @@ int twn3_sync_select_first(int fd, uint8_t flags, uint8_t* type, uint8_t* uid, s
size_t u = 0;
ssize_t bytes = twn3_sync_command(fd, flags, (uint8_t*) "s", 1, (uint8_t*) data, sizeof(data));
- *type = tag_none;
+ *type = twn3_tag_none;
if(bytes > 2 && data[0] != 'N'){
- *type = tag_unknown;
+ *type = twn3_tag_unknown;
u = decode_ascii_inplace((uint8_t*) data, bytes - 2);
diff --git a/libtwn3.h b/libtwn3.h
index d998c24..16e21c8 100644
--- a/libtwn3.h
+++ b/libtwn3.h
@@ -3,14 +3,14 @@
#include <inttypes.h>
typedef enum /*_twn3_tag_type*/ {
- tag_none = 0x00,
- tag_mf_light = 0x01,
- tag_mf_classic_1k = 0x02,
- tag_mf_classic_4l = 0x03,
- tag_mf_prox = 0x04,
- tag_mf_ultralight = 0x05,
- tag_mf_desfire = 0x06,
- tag_unknown = 0xFF
+ twn3_tag_none = 0x00,
+ twn3_tag_mf_light = 0x01,
+ twn3_tag_mf_classic_1k = 0x02,
+ twn3_tag_mf_classic_4k = 0x03,
+ twn3_tag_mf_prox = 0x04,
+ twn3_tag_mf_ultralight = 0x05,
+ twn3_tag_mf_desfire = 0x06,
+ twn3_tag_unknown = 0xFF
} twn3_tag_type_t;
/* Open a device port */