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

hal_init.h
Go to the documentation of this file.
1 #ifndef HAL_INIT_H
2 #define HAL_INIT_H
3
4 /* ************************** HAL init/deinit API declaration ****************************** */
8 /* ***************************************************************************************** */
9
10 /* set struct alignment */
11 #include <emv_platform_set_align.h>
12
13 /* ***************************************************************************************** */
20 /* ***************************************************************************************** */
21
22 #ifndef KER_HAL_INIT
23 /* ************************************** hal_init ***************************************** */
40 extern KER_BOOL hal_init(KER_CTX_INIT_PARAM const KER_VOID* pConfigID, KER_INT16U usConfigIDLen, const KER_CHAR* pchKernelModuleList, KER_INT16U usKernelModuleListLen);
42 #define KER_HAL_INIT(ConfigID, ConfigIDLen, KernelBinary, KernelBinaryLen) hal_init(KER_CTX_INIT ConfigID, ConfigIDLen, KernelBinary, KernelBinaryLen)
43 #endif /* KER_HAL_INIT */
44
45 #ifndef KER_HAL_DEINIT
46 /* ************************************* hal_deinit **************************************** */
53 extern KER_BOOL hal_deinit(KER_CTX_SINGLE_PARAM);
55 #define KER_HAL_DEINIT() hal_deinit(KER_CTX_SINGLE)
56 #endif /* KER_HAL_DEINIT */
57
58 #ifndef KER_HAL_START_TRAN
59 /* *********************************** hal_start_tran ************************************** */
66 extern KER_BOOL hal_start_tran(KER_CTX_SINGLE_PARAM);
68 #define KER_HAL_START_TRAN() hal_start_tran(KER_CTX_SINGLE)
69 #endif /* KER_HAL_START_TRAN */
70
71 #ifndef KER_HAL_END_TRAN
72 /* *********************************** hal_end_tran ************************************** */
79 extern KER_BOOL hal_end_tran(KER_CTX_SINGLE_PARAM);
81 #define KER_HAL_END_TRAN() hal_end_tran(KER_CTX_SINGLE)
82 #endif /* KER_HAL_END_TRAN */
83
84 /* ********************************** hal_calc_checksum ************************************ */
96 extern KER_BOOL hal_calc_checksum(KER_CTX_PARAM KER_BYTE btType, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumLen, KER_INT16U usMaxSize);
97
98 /* ********************************* hal_calc_checksum_ex ********************************** */
112 extern KER_BOOL hal_calc_checksum_ex(KER_CTX_PARAM KER_BYTE btType, const KER_CHAR* pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE* pbtCheckSum, KER_INT16U* pusCheckSumLen, KER_INT16U usMaxSize);
113
114
115 /* ******************************** HAL callback types ************************************* */
120 #define KER_HAL_CALLBACK_HANDLE 0x00
121 /* ******************************* EMVL1 callback types ************************************ */
122 #define KER_HAL_CALLBACK_EMVL1_RESET_CARD 0x10
123 #define KER_HAL_CALLBACK_EMVL1_EXCH_APDU 0x11
124 #define KER_HAL_CALLBACK_EMVL1_IFD_SERIAL 0x12
125 /* ******************************** CV callback types ************************************** */
126 #define KER_HAL_CALLBACK_CV_CHECK_CUST_CVM_CONDITION 0x20
127 #define KER_HAL_CALLBACK_CV_CHECK_CUST_CVM 0x21
128 /* ***************************************************************************************** */
131 /* ******************************** hal_register_callback ********************************** */
144 extern KER_BOOL hal_register_callback(KER_CTX_PARAM KER_INT16U usCallbackType, KER_VOID* pCallback);
145
146
147 /* ********************************* HAL notify types ************************************** */
152 #define KER_HAL_NOTIFY_SELECTED_AID 0x01
153 #define KER_HAL_NOTIFY_SELECTED_KERNEL_ID 0x02
156 /* ********************************** HAL notify data ************************************** */
160 typedef struct tag_HAL_NOTIFY_DATA_AID
161 {
162 KER_INT16U usSize;
164 const KER_BYTE* pbt84;
165 KER_INT16U us84Len;
166 }HAL_NOTIFY_DATA_AID;
167
168 /* ************************************** hal_notify *************************************** */
182 extern KER_BOOL hal_notify(KER_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID* pNotifyData, KER_INT16U usNotifyDataLen);
183
184 /* ********************************** hal_online_check ************************************* */
191 extern KER_BOOL hal_online_check(KER_CTX_SINGLE_PARAM);
192
193 /* restore struct alignment */
194 #include <emv_platform_restore_align.h>
195
196 #endif /* HAL_CONFIG_H */
emv_platform_restore_align.h
emv_platform_set_align.h
KER_VOID
void KER_VOID
Definition: emv_platform.h:66
KER_BOOL
KER_INT8U KER_BOOL
Definition: emv_platform.h:67
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
KER_CHAR
char KER_CHAR
Definition: emv_platform.h:65
KER_CTX_PARAM
#define KER_CTX_PARAM
Definition: emv_context.h:53
KER_CTX_INIT_PARAM
#define KER_CTX_INIT_PARAM
Definition: emv_context.h:63
KER_CTX_SINGLE_PARAM
#define KER_CTX_SINGLE_PARAM
Definition: emv_context.h:58
HAL_NOTIFY_DATA_AID
struct tag_HAL_NOTIFY_DATA_AID HAL_NOTIFY_DATA_AID
KER_HAL_NOTIFY_SELECTED_AID related data struct
hal_notify
KER_BOOL hal_notify(KER_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID *pNotifyData, KER_INT16U usNotifyDataLen)
Notifies HAL about some specific event.
hal_deinit
KER_BOOL hal_deinit(KER_CTX_SINGLE_PARAM)
Performs HAL de-initialization.
hal_register_callback
KER_BOOL hal_register_callback(KER_CTX_PARAM KER_INT16U usCallbackType, KER_VOID *pCallback)
Register callback to be used by HAL. At the moment use it only for backward compatibility to provide ...
hal_calc_checksum
KER_BOOL hal_calc_checksum(KER_CTX_PARAM KER_BYTE btType, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumLen, KER_INT16U usMaxSize)
Pass checksums to the kernel.
hal_start_tran
KER_BOOL hal_start_tran(KER_CTX_SINGLE_PARAM)
Informs HAL about transaction start (to open new log, create new STAN, etc...)
hal_init
KER_BOOL hal_init(KER_CTX_INIT_PARAM const KER_VOID *pConfigID, KER_INT16U usConfigIDLen, const KER_CHAR *pchKernelModuleList, KER_INT16U usKernelModuleListLen)
Performs HAL initialization.
hal_calc_checksum_ex
KER_BOOL hal_calc_checksum_ex(KER_CTX_PARAM KER_BYTE btType, const KER_CHAR *pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumLen, KER_INT16U usMaxSize)
Pass checksums to the kernel.
hal_online_check
KER_BOOL hal_online_check(KER_CTX_SINGLE_PARAM)
Checks HAL for unable to go online condition (for AmEx C-4).
hal_end_tran
KER_BOOL hal_end_tran(KER_CTX_SINGLE_PARAM)
Informs HAL about transaction end (to close curr log, etc...)
tag_HAL_NOTIFY_DATA_AID
KER_HAL_NOTIFY_SELECTED_AID related data struct
Definition: hal_init.h:161
tag_HAL_NOTIFY_DATA_AID::usSize
KER_INT16U usSize
Definition: hal_init.h:162
tag_HAL_NOTIFY_DATA_AID::pbt84
const KER_BYTE * pbt84
Definition: hal_init.h:164
tag_HAL_NOTIFY_DATA_AID::us84Len
KER_INT16U us84Len
Definition: hal_init.h:165