AT-NFC 2.1 (win) AT-NFC kernel set

emv_platform.h
Go to the documentation of this file.
1 #ifndef EMV_PLATFORM_H
2 #define EMV_PLATFORM_H
3
4 #include <stdint.h>
5
6 /* *************************** platform-depended definitions ******************************* */
10 /* ***************************************************************************************** */
11
12 #ifdef __linux__
13
14 /* binary file name prefix */
15 #define LIB_FILE_PREFIX "lib"
16 /* binary file name postfix */
17 #define LIB_FILE_POSTFIX "_u64.so"
18
19 /* define calling convention */
20 #define KER_API
21 #define KER_CDECL
22 /* define export/import declarations */
23 #define KER_EXP_API __attribute__ ((visibility ("default")))
24 #define KER_IMP_API
25
26 #elif defined (_WIN32)
27
28 /* define calling convention */
29 #define KER_API __stdcall
30 #define KER_CDECL __cdecl
31 /* define export/import declarations */
32 #define KER_EXP_API __declspec(dllexport)
33 #define KER_IMP_API __declspec(dllimport)
34
35 #ifdef _WIN64
36 /* x64 binary file name prefix */
37 #define LIB_FILE_PREFIX ""
38 /* binary file name postfix */
39 #define LIB_FILE_POSTFIX "_w64.dll"
40 #else
41 /* x32 binary file name prefix */
42 #define LIB_FILE_PREFIX /* do not use blank string macros because of rc compiler issue!!! */
43 /* binary file name postfix */
44 #define LIB_FILE_POSTFIX "_w32.dll"
45 #endif
46
47 #endif
48
49 /* ****************************** Basic Datatypes used in code ***************************** */
58 /* ***************************************************************************************** */
59 typedef unsigned char KER_INT8U;
60 typedef signed char KER_INT8S;
61 typedef unsigned short KER_INT16U;
62 typedef signed short KER_INT16S;
63 typedef unsigned int KER_INT32U;
64 typedef signed int KER_INT32S;
65 typedef char KER_CHAR;
66 typedef void KER_VOID;
67 typedef KER_INT8U KER_BOOL;
68 typedef KER_INT16U KER_RES;
69 /* ***************************************************************************************** */
70 typedef uint8_t KER_BYTE;
71 typedef uint32_t KER_FIXED_INT32U;
72 typedef int32_t KER_FIXED_INT32S;
73 /* ***************************************************************************************** */
74 typedef unsigned long KER_NATIVE_ULONG;
75 typedef unsigned int KER_NATIVE_UINT;
76 /* ***************************************************************************************** */
77 #define KER_FALSE 0
78 #define KER_TRUE 1
79 /* ***************************************************************************************** */
80 #define KER_NULL 0
81 /* ***************************************************************************************** */
82 #define KER_INT32U_MAX_VAL 0xFFFFFFFF
83 #define KER_INT16U_MAX_VAL 0xFFFF
86 #endif /* EMV_PLATFORM_H */
KER_VOID
void KER_VOID
Definition: emv_platform.h:66
KER_INT16S
signed short KER_INT16S
Definition: emv_platform.h:62
KER_BOOL
KER_INT8U KER_BOOL
Definition: emv_platform.h:67
KER_FIXED_INT32S
int32_t KER_FIXED_INT32S
Definition: emv_platform.h:72
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_INT8S
signed char KER_INT8S
Definition: emv_platform.h:60
KER_RES
KER_INT16U KER_RES
Definition: emv_platform.h:68
KER_INT32U
unsigned int KER_INT32U
Definition: emv_platform.h:63
KER_NATIVE_ULONG
unsigned long KER_NATIVE_ULONG
Definition: emv_platform.h:74
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
KER_NATIVE_UINT
unsigned int KER_NATIVE_UINT
Definition: emv_platform.h:75
KER_FIXED_INT32U
uint32_t KER_FIXED_INT32U
Definition: emv_platform.h:71
KER_INT8U
unsigned char KER_INT8U
Definition: emv_platform.h:59
KER_CHAR
char KER_CHAR
Definition: emv_platform.h:65
KER_INT32S
signed int KER_INT32S
Definition: emv_platform.h:64