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:
Romain Tartiere 2010-07-29 14:16:11 +00:00
parent 30e715cff0
commit daa178b18f
7 changed files with 96 additions and 63 deletions

View file

@ -81,5 +81,11 @@ bool pn53x_decode_target_data(const byte_t* pbtRawData, size_t szDataLen, nfc_ch
bool pn53x_InListPassiveTarget(const nfc_device_t* pnd, const nfc_modulation_t nmInitModulation, const byte_t szMaxTargets, const byte_t* pbtInitiatorData, const size_t szInitiatorDataLen, byte_t* pbtTargetsData, size_t* pszTargetsData);
bool pn53x_InDeselect(nfc_device_t* pnd, const uint8_t ui8Target);
const char *pn53x_strerror (const nfc_device_t *pnd);
static const struct chip_callbacks pn53x_callbacks_list = {
pn53x_strerror
};
#endif // __NFC_CHIPS_PN53X_H__