Enhance error handeling.
- New API functions: nfc_strerror(), nfc_strerror_r() and nfc_perror(); - Drivers now have a reference to chips callback methods; - Rename -pn53x_err2string to pn53x_strerror and add it to pn53x_callbacks_list.
This commit is contained in:
parent
30e715cff0
commit
daa178b18f
7 changed files with 96 additions and 63 deletions
|
|
@ -78,6 +78,11 @@ NFC_EXPORT bool nfc_target_send_bits(nfc_device_t* pnd, const byte_t* pbtTx, con
|
|||
NFC_EXPORT bool nfc_target_send_bytes(nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxLen);
|
||||
NFC_EXPORT bool nfc_target_send_dep_bytes(nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxLen);
|
||||
|
||||
/* Error reporting */
|
||||
NFC_EXPORT const char *nfc_strerror (const nfc_device_t *pnd);
|
||||
NFC_EXPORT int nfc_strerror_r (const nfc_device_t *pnd, char *pcStrErrBuf, size_t szBufLen);
|
||||
NFC_EXPORT void nfc_perror (const nfc_device_t *pnd, const char *pcString);
|
||||
|
||||
/* Special data accessors */
|
||||
NFC_EXPORT const char* nfc_device_name(nfc_device_t* pnd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue