Minor code cleanup.

This commit is contained in:
Romuald Conty 2010-01-12 11:50:09 +00:00
parent fe0396e392
commit 864a482e88
2 changed files with 19 additions and 24 deletions

View file

@ -1,4 +1,4 @@
/**
/*-
* Public platform independent Near Field Communication (NFC) library
*
* Copyright (C) 2009, Roel Verdult
@ -15,10 +15,11 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*
*/
/**
* @file nfc.h
* @brief nfc interface
* @brief libnfc interface
*
* Provide all usefull functions (API) to handle NFC devices.
*/
@ -36,26 +37,23 @@
extern "C" {
#endif // __cplusplus
/* NFC Device/Hardware manipulation */
void nfc_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound);
nfc_device_t* nfc_connect(nfc_device_desc_t* pndd);
void nfc_disconnect(nfc_device_t* pnd);
bool nfc_configure(nfc_device_t* pnd, const nfc_device_option_t ndo, const bool bEnable);
/* NFC initiator: act as "reader" */
bool nfc_initiator_init(const nfc_device_t* pnd);
bool nfc_initiator_select_tag(const nfc_device_t* pnd, const nfc_modulation_t nmInitModulation, const byte_t* pbtInitData, const size_t szInitDataLen, nfc_target_info_t* pti);
bool nfc_initiator_select_dep_target(const nfc_device_t* pnd, const nfc_modulation_t nmInitModulation, const byte_t* pbtPidData, const size_t szPidDataLen, const byte_t* pbtNFCID3i, const size_t szNFCID3iDataLen, const byte_t *pbtGbData, const size_t szGbDataLen, nfc_target_info_t* pti);
bool nfc_initiator_deselect_tag(const nfc_device_t* pnd);
bool nfc_initiator_transceive_bits(const nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxBits, const byte_t* pbtTxPar, byte_t* pbtRx, size_t* pszRxBits, byte_t* pbtRxPar);
bool nfc_initiator_transceive_bytes(const nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen);
bool nfc_initiator_transceive_dep_bytes(const nfc_device_t* pnd, const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen);
bool nfc_initiator_mifare_cmd(const nfc_device_t* pnd, const mifare_cmd mc, const uint8_t ui8Block, mifare_param* pmp);
/* NFC target: act as tag (i.e. MIFARE Classic) or NFC target device. */
bool nfc_target_init(const nfc_device_t* pnd, byte_t* pbtRx, size_t* pszRxBits);
bool nfc_target_receive_bits(const nfc_device_t* pnd, byte_t* pbtRx, size_t* pszRxBits, byte_t* pbtRxPar);
bool nfc_target_receive_bytes(const nfc_device_t* pnd, byte_t* pbtRx, size_t* pszRxLen);