nfc_get_iso14443_4_emulation_command()
Retrieve an ISO 14443-4 command from the NFC_ISO14443_4_COMMAND_EVENT event.
Synopsis:
#include <nfc/nfc.h>
NFC_API nfc_result_t nfc_get_iso14443_4_emulation_command(const nfc_target_t *target, uchar_t *command, size_t max_command_length, size_t *command_length)
Arguments:
- target
-
The target returned from the nfc_get_target() function during ISO 14443-4 emulation.
- command
-
A pointer to a preallocated command buffer.
- max_command_length
-
The length of the preallocated command buffer. The length should be at least NFC_ISO14443_4_COMMAND_BUFFER_LENGTH to ensure there is enough space to accommodate the returned command from the NFC driver.
- command_length
-
The length of the returned command copied into the command buffer.
Library:
libnfcDescription:
This function lets you retrieve the data for a command sent by a reader during successful emulation. If this function fails to return NFC_RESULT_SUCCESS, command and command_length will remain unchanged.
Returns:
NFC_RESULT_SUCCESS, or one of the following:
- NFC_RESULT_INVALID_PARAMETER: A parameter is invalid.
- NFC_RESULT_NOT_ENOUGH_SPACE: The provided command buffer is too small.