nfc_erase_tag()
Erase all NDEF messages from a tag NDEF target.
Synopsis:
#include <nfc/nfc.h>
NFC_API nfc_result_t nfc_erase_tag(nfc_target_t *tag)
Arguments:
- tag
-
The tag handle found after a tag detection.
Library:
libnfcDescription:
This function erases all NDEF messages from the tag target returned from a successful write detection by replacing them with a single empty NDEF message.
Returns:
NFC_RESULT_SUCCESS, or one of the following:
- NFC_RESULT_INVALID_PARAMETER: A parameter is invalid.
- NFC_RESULT_OPERATION_NOT_SUPPORTED: The tag parameter is not a tag handle.
- NFC_RESULT_SERVICE_CONNECTION_ERROR: The application is not connected to the NFC system.
- NFC_RESULT_LOCKED: The tag is locked.
- NFC_RESULT_WRITE_FAILED: Writing the message to the tag failed.
- NFC_RESULT_NOT_NFC_TAG_BUT_CAPABLE: The tag does not currently support NFC operations, but can be formatted to be NFC compliant (type 1-4).