add nfc_device_get_supported_modulation() and nfc_device_get_supported_baud_rate() functions.

This commit is contained in:
Audrey Diacre 2012-02-17 12:09:56 +00:00
parent 75e776ffd0
commit 5a5bdf1d66
11 changed files with 126 additions and 1 deletions

View file

@ -276,7 +276,7 @@ typedef enum {
* @brief NFC modulation type enumeration
*/
typedef enum {
NMT_ISO14443A,
NMT_ISO14443A = 1,
NMT_JEWEL,
NMT_ISO14443B,
NMT_ISO14443BI, // pre-ISO14443B aka ISO/IEC 14443 B' or Type B'
@ -286,6 +286,15 @@ typedef enum {
NMT_DEP,
} nfc_modulation_type;
/**
* @enum nfc_mode
* @brief NFC mode type enumeration
*/
typedef enum {
N_TARGET,
N_INITIATOR,
} nfc_mode;
/**
* @struct nfc_modulation
* @brief NFC modulation structure

View file

@ -113,6 +113,8 @@ extern "C" {
NFC_EXPORT void iso14443a_crc_append (uint8_t *pbtData, size_t szLen);
NFC_EXPORT uint8_t *iso14443a_locate_historical_bytes (uint8_t *pbtAts, size_t szAts, size_t *pszTk);
NFC_EXPORT const char *nfc_version (void);
NFC_EXPORT int nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode mode, nfc_modulation_type **supported_mt);
NFC_EXPORT int nfc_device_get_supported_baud_rate (nfc_device *pnd, const nfc_modulation_type nmt, nfc_baud_rate **supported_br);
/* Error codes */
/** @ingroup error