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

hal_nfc_trace.h
Go to the documentation of this file.
1 #ifndef HAL_NFC_TRACE_H
2 #define HAL_NFC_TRACE_H
3
4 /* **************************** HAL NFC TRACE API declaration ****************************** */
8 /* ***************************************************************************************** */
9
10 /* ***************************************************************************************** */
17 /* ***************************************************************************************** */
18
19 #ifndef KER_NFC_TRACE_OUTCOME_ERR /* If Custom trace not defined, then use default */
24 #define KER_NFC_TRACE_OUTCOME_ERR(Err, Ref, Descr) \
25 do \
26 { \
27 if ((Ref) != KER_NULL) \
28 { \
29 hal_sprintf(KER_CTX ar_ch___InfBuffer, sizeof(ar_ch___InfBuffer), "[%s] %s", (Ref), (Descr)); \
30 KER_SYS_ERROR(Err, KER_DBG_LEVEL_ERR, ar_ch___InfBuffer); \
31 } \
32 else \
33 KER_SYS_ERROR(Err, KER_DBG_LEVEL_ERR, (Descr)); \
34 } \
35 while (0)
36 #else
37 /* empty trace outcome error macro */
38 #define KER_NFC_TRACE_OUTCOME_ERR(Err, Ref, Descr)
39 #endif /* KER_NFC_TRACE_OUTCOME_ERR */
40
41 #ifndef KER_NFC_TRACE_OUTCOME /* If Custom trace not defined, then use default */
42 /* check trace level */
43 #if (KER_DBG(KER_DBG_LEVEL_TRACE_COMMENT))
48 #define KER_NFC_TRACE_OUTCOME(Ref, Descr, OutcomeDescr) nfcOutcomeTrace(KER_CTX &(pTran->pTranNFC->Outcome), (Ref), (Descr), (OutcomeDescr))
49 #else
54 #define KER_NFC_TRACE_OUTCOME(Ref, Descr, OutcomeDescr)
55 #endif /* KER_DBG(KER_DBG_LEVEL_TRACE_COMMENT) */
56 #endif /* KER_NFC_TRACE_OUTCOME */
57
58 #ifndef KER_NFC_TRACE_EP_OUTCOME /* If Custom trace not defined, then use default */
59 /* check trace level */
60 #if (KER_DBG(KER_DBG_LEVEL_TRACE_COMMENT))
65 #define KER_NFC_TRACE_EP_OUTCOME(OutcomeDescr) nfcOutcomeTrace(KER_CTX pTran->pOutcome, KER_NULL, KER_NULL, (OutcomeDescr))
66 #else
71 #define KER_NFC_TRACE_EP_OUTCOME(OutcomeDescr)
72 #endif /* KER_DBG(KER_DBG_LEVEL_TRACE_COMMENT) */
73 #endif /* KER_NFC_TRACE_EP_OUTCOME */
74
75 /* ********************************** nfcOutcomeTrace ************************************** */
87 KER_BOOL nfcOutcomeTrace(KER_CTX_PARAM NFC_OUTCOME* pOutcome, const KER_CHAR* pchRef, const KER_CHAR* pchDescr, KER_CHAR* pchOutcome);
88
89 #endif /* HAL_NFC_TRACE_H */
KER_BOOL
KER_INT8U KER_BOOL
Definition: emv_platform.h:67
KER_CHAR
char KER_CHAR
Definition: emv_platform.h:65
KER_CTX_PARAM
#define KER_CTX_PARAM
Definition: emv_context.h:53
nfcOutcomeTrace
KER_BOOL nfcOutcomeTrace(KER_CTX_PARAM NFC_OUTCOME *pOutcome, const KER_CHAR *pchRef, const KER_CHAR *pchDescr, KER_CHAR *pchOutcome)
Trace outcome.
tag_NFC_OUTCOME
Outcome User Interface struct definition, version 0.
Definition: nfc_outcome.h:350