CHG: fiddled with the headerfiles... and makefile... Tried to make them behave nice. So it isnt a hell to add new functions from third-party (like des, aes etc)

Added a lot of #ifndef ,   extern C,
Move inside from ARMSRC -> THUMBS,  which made the compiled image smaller.. I don't know if it broke anything.
Moved MF_DBGLEVEL definitions into common.h
Moved print_result from util.c into appmain.c
Also split up some struct typedef  into header files so they could be reused in other code places.

''' danger '''  this might have broken stuff...
This commit is contained in:
iceman1001
2017-01-25 00:33:03 +01:00
parent 137f207a8d
commit 53d5dc643f
27 changed files with 153 additions and 190 deletions

View File

@@ -1,16 +1,13 @@
// ICEMAN 2017, this file looks similar to emvdataels.h headerfile.
//Data elements for EMV transactions.
#ifndef __EMVDATAELS_H
#define __EMVDATAELS_H
#include "emvdataels.h"
//Known AIDs
typedef struct{
uint8_t tag[2];
char description[255];
} tagdescription;
//Known AIDs
struct tagdescription {
uint8_t tag[2];
char description[255];
};
const uint8_t AID_VISA[] = {0xa0,0x00,0x00,0x00,0x03};
const uint8_t AID_VISA_DB[] = {0xa0,0x00,0x00,0x00,0x03,0x10,0x10};
@@ -111,18 +108,3 @@ const tagdescription EMV_TAG_LIST[] = {
{"\x9f\x66","card production life cycle"},
{"\xbf\x0c","file control information (fci) issuer discretionary data"}
};
//AIP bitmasks details
#define AIP_CHIP_SUPPORTED 0x80
#define AIP_MSR_SUPPORTED 0x40
#define AIP_SDA_SUPPORTED 0x40
#define AIP_DDA_SUPPORTED 0x20
#define AIP_CARDHOLDER_VERIFICATION 0x10
#define AIP_TERMINAL_RISK 0x08
#define AIP_ISSUER_AUTH 0x04
#define AIP_CDA_SUPPORTED 0x01
//human readable error messages
#endif //__EMVDATAELS_H