[libnfc] r1317 committed - libnfc: add nfc_device_get_supported_modulation() and nfc_device_get_s...

5 views
Skip to first unread message

lib...@googlecode.com

unread,
Feb 20, 2012, 3:37:15 AM2/20/12
to libnfc-...@googlegroups.com
Revision: 1317
Author: adi...@il4p.fr
Date: Mon Feb 20 00:36:15 2012
Log: libnfc: add nfc_device_get_supported_modulation() and
nfc_device_get_supported_baud_rate() documentation.
http://code.google.com/p/libnfc/source/detail?r=1317

Modified:
/trunk/include/nfc/nfc.h
/trunk/libnfc/nfc.c

=======================================
--- /trunk/include/nfc/nfc.h Fri Feb 17 04:09:56 2012
+++ /trunk/include/nfc/nfc.h Mon Feb 20 00:36:15 2012
@@ -73,6 +73,8 @@
NFC_EXPORT int nfc_abort_command (nfc_device *pnd);
NFC_EXPORT size_t nfc_list_devices (nfc_context *context, nfc_connstring
connstrings[], size_t connstrings_len);
NFC_EXPORT int nfc_idle (nfc_device *pnd);
+ 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);

/* NFC initiator: act as "reader" */
NFC_EXPORT int nfc_initiator_init (nfc_device *pnd);
@@ -113,8 +115,6 @@
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
=======================================
--- /trunk/libnfc/nfc.c Fri Feb 17 04:09:56 2012
+++ /trunk/libnfc/nfc.c Mon Feb 20 00:36:15 2012
@@ -264,6 +264,34 @@
log_fini ();
return szDeviceFound;
}
+
+/** @ingroup dev
+ * @brief Get supported modulations.
+ * @return Returns 0 on success, otherwise returns libnfc's error code
(negative value)
+ * @param pnd \a nfc_device struct pointer that represent currently used
device
+ * @param mode \a nfc_mode.
+ * @param supported_mt pointer of \a nfc_modulation_type array.
+ *
+ */
+int
+nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode
mode, nfc_modulation_type **supported_mt)
+{
+ HAL (get_supported_modulation, pnd, mode, supported_mt);
+}
+
+/** @ingroup dev
+ * @brief Get supported baud rates.
+ * @return Returns 0 on success, otherwise returns libnfc's error code
(negative value)
+ * @param pnd \a nfc_device struct pointer that represent currently used
device
+ * @param nmt \a nfc_modulation_type.
+ * @param supported_br pointer of \a nfc_baud_rate array.
+ *
+ */
+int
+nfc_device_get_supported_baud_rate (nfc_device *pnd, const
nfc_modulation_type nmt, nfc_baud_rate **supported_br)
+{
+ HAL (get_supported_baud_rate, pnd, nmt, supported_br);
+}

/** @ingroup properties
* @brief Set a device's integer-property value
@@ -1001,15 +1029,3 @@
return PACKAGE_VERSION;
#endif // SVN_REVISION
}
-
-int
-nfc_device_get_supported_modulation (nfc_device *pnd, const nfc_mode
mode, nfc_modulation_type **supported_mt)
-{
- HAL (get_supported_modulation, pnd, mode, supported_mt);
-}
-
-int
-nfc_device_get_supported_baud_rate (nfc_device *pnd, const
nfc_modulation_type nmt, nfc_baud_rate **supported_br)
-{
- HAL (get_supported_baud_rate, pnd, nmt, supported_br);
-}

Reply all
Reply to author
Forward
0 new messages