From 87af39a2696a34d445064935b89359560fc3e38e Mon Sep 17 00:00:00 2001 From: Tau Date: Sat, 19 Oct 2019 15:50:07 -0400 Subject: [PATCH] iccard/mifare.h: Add MIFARE IC card definitions --- iccard/meson.build | 1 + iccard/mifare.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 iccard/mifare.h diff --git a/iccard/meson.build b/iccard/meson.build index 1da0d1e..08c5a3f 100644 --- a/iccard/meson.build +++ b/iccard/meson.build @@ -9,5 +9,6 @@ iccard_lib = static_library( sources : [ 'felica.c', 'felica.h', + 'mifare.h', ], ) diff --git a/iccard/mifare.h b/iccard/mifare.h new file mode 100644 index 0000000..10dbc34 --- /dev/null +++ b/iccard/mifare.h @@ -0,0 +1,15 @@ +#pragma once + +#include + +struct mifare_block { + uint8_t bytes[16]; +}; + +struct mifare_sector { + struct mifare_block blocks[4]; +}; + +struct mifare { + struct mifare_sector sectors[16]; +};