Skip to content

Commit

Permalink
Fix timeout documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
neomilium committed Jan 15, 2013
1 parent 5d45718 commit f2be582
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions libnfc/nfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ nfc_initiator_poll_target(nfc_device *pnd,
* to passive communications.
*
* @note \a nfc_dep_info will be returned when the target was acquired successfully.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_initiator_select_dep_target(nfc_device *pnd,
Expand Down Expand Up @@ -607,9 +610,6 @@ nfc_initiator_deselect_target(nfc_device *pnd)
* The NFC device (configured as initiator) will transmit the supplied bytes (\a pbtTx) to the target.
* It waits for the response and stores the received bytes in the \a pbtRx byte array.
*
* If timeout is not a null pointer, it specifies the maximum interval to wait for the function to be executed.
* If timeout is a null pointer, the function blocks indefinitely (until an error is raised or function is completed).
*
* If \a NP_EASY_FRAMING option is disabled the frames will sent and received in raw mode: \e PN53x will not handle input neither output data.
*
* The parity bits are handled by the \e PN53x chip. The CRC can be generated automatically or handled manually.
Expand All @@ -621,6 +621,8 @@ nfc_initiator_deselect_target(nfc_device *pnd)
*
* @note When used with MIFARE Classic, NFC_EMFCAUTHFAIL error is returned if authentication command failed. You need to re-select the tag to operate with.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_initiator_transceive_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx,
Expand Down Expand Up @@ -785,6 +787,9 @@ nfc_initiator_transceive_bits_timed(nfc_device *pnd,
* received that is not part of the anti-collision. The RATS command for
* example would wake up the emulator. After this is received, the send and
* receive functions can be used.
*
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_target_init(nfc_device *pnd, nfc_target *pnt, uint8_t *pbtRx, const size_t szRx, int timeout)
Expand Down Expand Up @@ -862,8 +867,8 @@ nfc_abort_command(nfc_device *pnd)
* This function make the NFC device (configured as \e target) send byte frames
* (e.g. APDU responses) to the \e initiator.
*
* If timeout is not a null pointer, it specifies the maximum interval to wait for the function to be executed.
* If timeout is a null pointer, the function blocks indefinitely (until an error is raised or function is completed).
* If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed)
* If timeout equals to -1, the default timeout will be used
*/
int
nfc_target_send_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, int timeout)
Expand Down

0 comments on commit f2be582

Please sign in to comment.