commit 9347f9ef1b267a53e32424127ac219db33ee6744
parent 68e18f25fd42df1ffe54bad9e0e0c8257e95fe5f
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 4 Dec 2019 13:10:34 +0100
config
Diffstat:
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -96,6 +96,7 @@ along with
* Upper lenght of the uid for a valid MIFARE target
*/
#define UID_LEN_UPPER 7
+
/**
* Lower lenght of the uid for a valid MIFARE target
*/
@@ -149,7 +150,7 @@ along with
struct MdbBlock
{
- uint8_t*bin;
+ uint8_t *bin;
size_t bin_size;
};
@@ -194,6 +195,7 @@ struct Product
char key;
};
+
/**
* Handle for a payment
*/
@@ -248,7 +250,9 @@ struct PaymentActivity
};
-
+/**
+ * Data structures associated with the MDB.
+ */
struct MdbHandle
{
@@ -400,10 +404,29 @@ static unsigned int products_length;
*/
static struct MdbHandle mdb;
+/**
+ * MDB response to the request for configuration.
+ */
static struct MdbCommand readerConfigData;
+
+/**
+ * Ask MDB to begin session (with "infinite" money)
+ */
static struct MdbCommand beginSession;
+
+/**
+ * Refuse vending request (payment failed)
+ */
static struct MdbCommand denyVend;
+
+/**
+ * Approve vending request (payment succeeded)
+ */
static struct MdbCommand approveVend;
+
+/**
+ * Terminate session.
+ */
static struct MdbCommand endSession;
/**