wut
v1.7.0
Wii U Toolchain
|
Near Field Communication (NFC). More...
Data Structures | |
struct | NFCUid |
struct | NFCTagInfo |
struct | NFCNTAGVersion |
struct | NFCReadT2TResult |
Typedefs | |
typedef int32_t | NFCError |
typedef uint8_t | NFCProtocol |
typedef uint8_t | NFCTechnology |
typedef uint8_t | NFCTechnologyMask |
typedef uint8_t | NFCNDEFFlags |
typedef struct NFCUid | NFCUid |
typedef struct NFCTagInfo | NFCTagInfo |
typedef struct NFCNTAGVersion | NFCNTAGVersion |
typedef struct NFCReadT2TResult | NFCReadT2TResult |
typedef enum NFCMode | NFCMode |
typedef enum NFCProtocolEnum | NFCProtocolEnum |
typedef enum NFCTechnologyEnum | NFCTechnologyEnum |
typedef enum NFCTechnologyMaskEnum | NFCTechnologyMaskEnum |
typedef enum NFCNDEFFlagsEnum | NFCNDEFFlagsEnum |
typedef void(* | NFCCallbackFn) (VPADChan chan, NFCError error, void *userContext) |
Generic callback function. More... | |
typedef void(* | NFCTagDetectCallbackFn) (VPADChan chan, BOOL hasTag, void *userContext) |
Callback function for NFCSetTagDetectCallback. More... | |
typedef void(* | NFCDetectCallbackFn) (VPADChan chan, NFCError error, NFCUid *uid, BOOL readOnly, BOOL hasLockedData, NFCNDEFFlags flags, void *userContext) |
Callback function for NFCDetect. More... | |
typedef void(* | NFCRawDataCallbackFn) (VPADChan chan, NFCError error, uint32_t responseSize, void *responseData, void *userContext) |
Callback function for NFCSendRawData and variations. More... | |
typedef void(* | NFCRawDataTwiceCallbackFn) (VPADChan chan, NFCError error, uint8_t numCompleted, uint32_t response0Size, void *response0Data, uint32_t response1Size, void *response1Data, void *userContext) |
Callback function for NFCSendRawDataTwice and variations. More... | |
typedef void(* | NFCReadCallbackFn) (VPADChan chan, NFCError error, NFCUid *uid, BOOL readOnly, uint32_t dataSize, void *data, uint32_t lockedDataSize, void *lockedData, void *userContext) |
Callback function for NFCRead. More... | |
typedef void(* | NFCReadT2TCallbackFn) (VPADChan chan, NFCError error, uint8_t rfDiscId, NFCProtocol protocol, NFCTechnology technology, uint8_t uidSize, uint8_t *uid, NFCNTAGVersion *version, NFCReadT2TResult *result, void *userContext) |
Callback function for NFCReadT2T. More... | |
typedef void(* | NFCGetTagInfoCallbackFn) (VPADChan chan, NFCError error, NFCTagInfo *tagInfo, void *userContext) |
Callback function for NFCGetTagInfo. More... | |
typedef void(* | NFCGetTagInfoMultiCallbackFn) (VPADChan chan, NFCError error, uint8_t numTagInfos, NFCTagInfo *tagInfo0, NFCTagInfo *tagInfo1, NFCTagInfo *tagInfo2, void *userContext) |
Callback function for NFCGetTagInfoMulti. More... | |
Enumerations | |
enum | NFCMode { NFC_MODE_INVALID = -1 , NFC_MODE_IDLE = 0 , NFC_MODE_ACTIVE = 1 } |
enum | NFCProtocolEnum { NFC_PROTOCOL_UNKNOWN = 0x00 , NFC_PROTOCOL_T1T = 0x01 , NFC_PROTOCOL_T2T = 0x02 , NFC_PROTOCOL_T3T = 0x03 , NFC_PROTOCOL_ISO_DEP = 0x04 , NFC_PROTOCOL_15693 = 0x83 } |
enum | NFCTechnologyEnum { NFC_TECHNOLOGY_A = 0x00 , NFC_TECHNOLOGY_B = 0x01 , NFC_TECHNOLOGY_F = 0x02 , NFC_TECHNOLOGY_ISO15693 = 0x06 } |
enum | NFCTechnologyMaskEnum { NFC_TECHNOLOGY_MASK_ALL = 0 , NFC_TECHNOLOGY_MASK_A = (1 << 0) , NFC_TECHNOLOGY_MASK_B = (1 << 1) , NFC_TECHNOLOGY_MASK_F = (1 << 2) , NFC_TECHNOLOGY_MASK_ISO15693 = (1 << 3) } |
enum | NFCNDEFFlagsEnum { NFC_NDEF_FLAG_READ_ONLY = (1 << 0) , NFC_NDEF_FLAG_FORMATED = (1 << 1) , NFC_NDEF_FLAG_SUPPORTED = (1 << 2) , NFC_NDEF_FLAG_UNKNOWN = (1 << 3) , NFC_NDEF_FLAG_FORMATABLE = (1 << 4) , NFC_NDEF_FLAG_SOFT_LOCKABLE = (1 << 5) , NFC_NDEF_FLAG_HARD_LOCKABLE = (1 << 6) , NFC_NDEF_FLAG_OTP = (1 << 7) } |
Functions | |
NFCError | NFCInit (VPADChan chan) |
Initializes the NFC library. More... | |
NFCError | NFCInitEx (VPADChan chan, uint32_t powerMode) |
Initializes the NFC library. More... | |
NFCError | NFCShutdown (VPADChan chan) |
Shutdown the NFC library. More... | |
BOOL | NFCIsInit (VPADChan chan) |
Check if NFC is initialized. More... | |
void | NFCProc (VPADChan chan) |
Process NFC. More... | |
void | NFCSetTagDetectCallback (VPADChan chan, NFCTagDetectCallbackFn callback, void *userContext) |
Set a callback which will be called once a tag is attached / removed. More... | |
NFCMode | NFCGetMode (VPADChan chan) |
Get the current NFC mode. More... | |
NFCError | NFCSetMode (VPADChan chan, NFCMode mode) |
Set the current NFC mode. More... | |
NFCError | NFCAbort (VPADChan chan, NFCCallbackFn callback, void *userContext) |
Abort pending NFC operations. More... | |
NFCError | NFCAntennaCheck (VPADChan chan, NFCCallbackFn callback, void *userContext) |
Check the NFC antenna. More... | |
NFCError | NFCDetect (VPADChan chan, uint32_t discoveryTimeout, NFCDetectCallbackFn callback, void *userContext) |
Start tag discovery and provide info about the first detected tag. More... | |
NFCError | NFCSetLockBitsForT1T (VPADChan chan, uint8_t numBlocks, NFCRawDataCallbackFn callback, void *userContext) |
This will lock an area of blocks at the end of a 512-byte Type 1 Tag. More... | |
NFCError | NFCRead (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, NFCReadCallbackFn callback, void *userContext) |
Read from a tag. More... | |
NFCError | NFCWrite (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, uint32_t size, void *data, NFCCallbackFn callback, void *userContext) |
Write to a tag. More... | |
NFCError | NFCSendRawData (VPADChan chan, BOOL startDiscovery, uint32_t discoveryTimeout, uint32_t commandTimeout, uint32_t commandSize, uint32_t responseSize, void *commandData, NFCRawDataCallbackFn callback, void *userContext) |
Send a raw NFC command to a tag. More... | |
NFCError | NFCSendRawDataEx (VPADChan chan, BOOL startDiscovery, uint32_t discoveryTimeout, uint32_t commandTimeout, uint32_t commandSize, uint32_t responseSize, void *commandData, BOOL disableCRC, NFCRawDataCallbackFn callback, void *userContext) |
Send a raw NFC command to a tag. More... | |
NFCError | NFCSendRawDataEx2 (VPADChan chan, BOOL startDiscovery, uint32_t discoveryTimeout, uint32_t commandTimeout, uint32_t commandSize, uint32_t responseSize, void *commandData, BOOL disableCRC, NFCTechnologyMask techMask, NFCRawDataCallbackFn callback, void *userContext) |
Send a raw NFC command to a tag. More... | |
NFCError | NFCSendRawDataWithPrePolling (VPADChan chan, BOOL startDiscovery, uint32_t discoveryTimeout, uint32_t commandTimeout, uint32_t commandSize, uint32_t responseSize, void *commandData, NFCRawDataCallbackFn callback, void *userContext) |
Send a raw NFC command to a tag. More... | |
NFCError | NFCSendRawDataWithPrePollingEx (VPADChan chan, BOOL startDiscovery, uint32_t discoveryTimeout, uint32_t commandTimeout, uint32_t commandSize, uint32_t responseSize, void *commandData, NFCRawDataCallbackFn callback, void *userContext) |
Send a raw NFC command to a tag. More... | |
NFCError | NFCSendRawDataTwice (VPADChan chan, uint32_t command0Timeout, uint32_t command0Size, uint32_t response0Size, void *command0Data, uint32_t command1Timeout, uint32_t command1Size, uint32_t response1Size, void *command1Data, NFCRawDataTwiceCallbackFn callback, void *userContext) |
Send two raw NFC commands to an activated tag. More... | |
NFCError | NFCFormat (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, NFCCallbackFn callback, void *userContext) |
Check if the tag is NDEF Formatable. More... | |
NFCError | NFCGetTagInfo (VPADChan chan, uint32_t discoveryTimeout, NFCGetTagInfoCallbackFn callback, void *userContext) |
Obtain info about tags. More... | |
NFCError | NFCGetTagInfoMulti (VPADChan chan, uint32_t discoveryTimeout, NFCGetTagInfoMultiCallbackFn callback, void *userContext) |
Obtain info about multiple tags. More... | |
NFCError | NFCIsTagPresent (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, NFCCallbackFn callback, void *userContext) |
Check if a tag is still present. More... | |
NFCError | NFCSetReadOnly (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, BOOL readOnly, NFCCallbackFn callback, void *userContext) |
Make a Type 1 Tag read only by setting the RWA byte. More... | |
NFCError | NFCReadT2T (VPADChan chan, uint32_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, NFCNTAGVersion *version, uint32_t commandTimeout, uint8_t numReads, uint8_t read0Start, uint8_t read0End, uint8_t read1Start, uint8_t read1End, uint8_t read2Start, uint8_t read2End, uint8_t read3Start, uint8_t read3End, uint8_t authenticate, NFCReadT2TCallbackFn callback, void *userContext) |
Read data from a Type 2 NTAG. More... | |
NFCError | NFCWriteT2T (VPADChan chan, uint16_t discoveryTimeout, NFCUid *uid, NFCUid *uidMask, NFCNTAGVersion *version, uint32_t commandTimeout, uint8_t numWrites, uint8_t write0Start, uint8_t write0Size, void *write0Data, uint8_t write1Start, uint8_t write1Size, void *write1Data, uint8_t write2Start, uint8_t write2Size, void *write2Data, uint8_t write3Start, uint8_t write3Size, void *write3Data, uint8_t activationStart, uint32_t *deactivationData, uint32_t *activationData, uint8_t authenticate, uint8_t activate, NFCCallbackFn callback, void *userContext) |
Write data to a Type 2 NTAG. More... | |
void | NFCGetUIDFromActivationEventData (void *data, NFCProtocol *outProtocol, NFCTechnology *outTechnology, uint8_t *outUidSize, uint8_t *outUid) |
Get the UID and other parameters from activation event data. More... | |
NFCError | __NFCSystemAbort (VPADChan chan) |
Abort and call pending callbacks. More... | |
Near Field Communication (NFC).
struct NFCTagInfo |
Data Fields | ||
---|---|---|
uint8_t | uidSize | |
uint8_t | uid[10] | |
NFCTechnology | technology | |
NFCProtocol | protocol |
struct NFCNTAGVersion |
struct NFCReadT2TResult |
typedef uint8_t NFCProtocol |
typedef uint8_t NFCTechnology |
typedef uint8_t NFCTechnologyMask |
typedef uint8_t NFCNDEFFlags |
typedef struct NFCTagInfo NFCTagInfo |
typedef struct NFCNTAGVersion NFCNTAGVersion |
typedef struct NFCReadT2TResult NFCReadT2TResult |
typedef enum NFCProtocolEnum NFCProtocolEnum |
typedef enum NFCTechnologyEnum NFCTechnologyEnum |
typedef enum NFCTechnologyMaskEnum NFCTechnologyMaskEnum |
typedef enum NFCNDEFFlagsEnum NFCNDEFFlagsEnum |
Callback function for NFCSetTagDetectCallback.
chan | The channel this callback is coming from. |
hasTag | TRUE if a tag has been attached. FALSE if a tag has been removed. |
userContext | User provided value. |
typedef void(* NFCDetectCallbackFn) (VPADChan chan, NFCError error, NFCUid *uid, BOOL readOnly, BOOL hasLockedData, NFCNDEFFlags flags, void *userContext) |
Callback function for NFCDetect.
chan | The channel this callback is coming from. |
error | 0 on success. |
uid | The UID of the tag. |
readOnly | TRUE if the tag is read only. |
hasLockedData | TRUE if the tag has a locked area. |
flags | A combination of NFCNDEFFlagsEnum flags. |
userContext | User provided value. |
typedef void(* NFCRawDataCallbackFn) (VPADChan chan, NFCError error, uint32_t responseSize, void *responseData, void *userContext) |
Callback function for NFCSendRawData and variations.
chan | The channel this callback is coming from. |
error | 0 on success. |
responseSize | The size of the responseData. |
responseData | The data received from the tag. |
userContext | User provided value. |
typedef void(* NFCRawDataTwiceCallbackFn) (VPADChan chan, NFCError error, uint8_t numCompleted, uint32_t response0Size, void *response0Data, uint32_t response1Size, void *response1Data, void *userContext) |
Callback function for NFCSendRawDataTwice and variations.
chan | The channel this callback is coming from. |
error | 0 on success. |
numCompleted | The amount of commands which have been sent to the tag. |
response0Size,response1Size | The size of the response data. |
response0Data,response1Data | The data received from each of the commands. |
userContext | User provided value. |
typedef void(* NFCReadCallbackFn) (VPADChan chan, NFCError error, NFCUid *uid, BOOL readOnly, uint32_t dataSize, void *data, uint32_t lockedDataSize, void *lockedData, void *userContext) |
Callback function for NFCRead.
chan | The channel this callback is coming from. |
error | 0 on success. |
uid | The UID of the tag. |
readOnly | TRUE if the tag is read only. |
dataSize | The size of the read data. |
data | The data payload of the first tnf 5 NDEF record. |
lockedDataSize | The size of the locked data. |
lockedData | The data of the locked area (see NFCSetLockBitsForT1T). |
userContext | User provided value. |
typedef void(* NFCReadT2TCallbackFn) (VPADChan chan, NFCError error, uint8_t rfDiscId, NFCProtocol protocol, NFCTechnology technology, uint8_t uidSize, uint8_t *uid, NFCNTAGVersion *version, NFCReadT2TResult *result, void *userContext) |
Callback function for NFCReadT2T.
chan | The channel this callback is coming from. |
error | 0 on success. |
rfDiscId | RF Discovery ID. |
protocol | The tag protocol. |
technology | Discovery type / Detected technology. |
uidSize | The size of the UID. |
uid | The UID of the tag. |
version | The response of the NTAG GET_VERSION command. |
result | The read result. |
userContext | User provided value. |
typedef void(* NFCGetTagInfoCallbackFn) (VPADChan chan, NFCError error, NFCTagInfo *tagInfo, void *userContext) |
Callback function for NFCGetTagInfo.
chan | The channel this callback is coming from. |
error | 0 on success. |
tagInfo | The tag info. |
userContext | User provided value. |
typedef void(* NFCGetTagInfoMultiCallbackFn) (VPADChan chan, NFCError error, uint8_t numTagInfos, NFCTagInfo *tagInfo0, NFCTagInfo *tagInfo1, NFCTagInfo *tagInfo2, void *userContext) |
Callback function for NFCGetTagInfoMulti.
chan | The channel this callback is coming from. |
error | 0 on success. |
numTagInfos | The amount of tag infos which have been obtained. |
tagInfo0,tagInfo1,tagInfo2 | The obtained tag infos. |
userContext | User provided value. |
enum NFCMode |
enum NFCProtocolEnum |
enum NFCTechnologyEnum |
enum NFCNDEFFlagsEnum |
Initializes the NFC library.
chan | The DRC channel to use. |
Initializes the NFC library.
chan | The DRC channel to use. |
powerMode | Unknown. |
Shutdown the NFC library.
chan | The DRC channel to use. |
Check if NFC is initialized.
chan | The DRC channel to use. |
TRUE
if initialized, FALSE
otherwise. void NFCProc | ( | VPADChan | chan | ) |
Process NFC.
This needs to be called periodically and will call pending callbacks.
chan | The DRC channel to use. |
void NFCSetTagDetectCallback | ( | VPADChan | chan, |
NFCTagDetectCallbackFn | callback, | ||
void * | userContext | ||
) |
Set a callback which will be called once a tag is attached / removed.
chan | The DRC channel to use. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
Get the current NFC mode.
chan | The DRC channel to use. |
Set the current NFC mode.
chan | The DRC channel to use. |
mode | The NFC mode to set. |
NFCError NFCAbort | ( | VPADChan | chan, |
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Abort pending NFC operations.
chan | The DRC channel to use. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCAntennaCheck | ( | VPADChan | chan, |
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Check the NFC antenna.
chan | The DRC channel to use. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCDetect | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCDetectCallbackFn | callback, | ||
void * | userContext | ||
) |
Start tag discovery and provide info about the first detected tag.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSetLockBitsForT1T | ( | VPADChan | chan, |
uint8_t | numBlocks, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
This will lock an area of blocks at the end of a 512-byte Type 1 Tag.
chan | The DRC channel to use. |
numBlocks | The amount of blocks which should be locked. Setting this to 16 would lock the last 16 blocks of the tag. The maximum value is 48 which would lock blocks 16 to 63. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCRead | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NFCReadCallbackFn | callback, | ||
void * | userContext | ||
) |
Read from a tag.
This will start by reading the locked pages from a Type 1 Tag (aka. lockedData). Then it reads the NDEF tag data and returns the payload data from the first tnf 5 record.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCWrite | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
uint32_t | size, | ||
void * | data, | ||
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Write to a tag.
This will create a NDEF structure and add the data to a TNF 5 record, then writes it to the tag.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
size | The size of the data. |
data | A pointer to the data which will be copied to the NDEF payload. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawData | ( | VPADChan | chan, |
BOOL | startDiscovery, | ||
uint32_t | discoveryTimeout, | ||
uint32_t | commandTimeout, | ||
uint32_t | commandSize, | ||
uint32_t | responseSize, | ||
void * | commandData, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Send a raw NFC command to a tag.
chan | The DRC channel to use. |
startDiscovery | If TRUE , start tag discovery and activate the tag if found. This will ignore any command data and receives the activation event data in the callback (see NFCGetUIDFromActivationEventData). |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
commandSize | Size of the command data. |
responseSize | Size of the response data from the tag. |
commandData | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawDataEx | ( | VPADChan | chan, |
BOOL | startDiscovery, | ||
uint32_t | discoveryTimeout, | ||
uint32_t | commandTimeout, | ||
uint32_t | commandSize, | ||
uint32_t | responseSize, | ||
void * | commandData, | ||
BOOL | disableCRC, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Send a raw NFC command to a tag.
chan | The DRC channel to use. |
startDiscovery | If TRUE , start tag discovery and activate the tag if found. This will ignore any command data and receives the activation event data in the callback (see NFCGetUIDFromActivationEventData). |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
commandSize | Size of the command data. |
responseSize | Size of the response data from the tag. |
commandData | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
disableCRC | TRUE if the CRC check should be disabled. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawDataEx2 | ( | VPADChan | chan, |
BOOL | startDiscovery, | ||
uint32_t | discoveryTimeout, | ||
uint32_t | commandTimeout, | ||
uint32_t | commandSize, | ||
uint32_t | responseSize, | ||
void * | commandData, | ||
BOOL | disableCRC, | ||
NFCTechnologyMask | techMask, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Send a raw NFC command to a tag.
chan | The DRC channel to use. |
startDiscovery | If TRUE , start tag discovery and activate the tag if found. This will ignore any command data and receives the activation event data in the callback (see NFCGetUIDFromActivationEventData). |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
commandSize | Size of the command data. |
responseSize | Size of the response data from the tag. |
commandData | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
disableCRC | TRUE if the CRC check should be disabled. |
techMask | One or more technology masks which should be used OR'd together. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawDataWithPrePolling | ( | VPADChan | chan, |
BOOL | startDiscovery, | ||
uint32_t | discoveryTimeout, | ||
uint32_t | commandTimeout, | ||
uint32_t | commandSize, | ||
uint32_t | responseSize, | ||
void * | commandData, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Send a raw NFC command to a tag.
Starts tag discovery and activation before sending the command data. Note: This forces NFC_TECHNOLOGY_MASK_F, see NFCSendRawDataWithPrePollingEx for a generic version.
chan | The DRC channel to use. |
startDiscovery | If TRUE , start tag discovery and activate the tag if found, before sending the command data. If FALSE this will behave exactly like NFCSendRawData. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
commandSize | Size of the command data. |
responseSize | Size of the response data from the tag. |
commandData | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawDataWithPrePollingEx | ( | VPADChan | chan, |
BOOL | startDiscovery, | ||
uint32_t | discoveryTimeout, | ||
uint32_t | commandTimeout, | ||
uint32_t | commandSize, | ||
uint32_t | responseSize, | ||
void * | commandData, | ||
NFCRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Send a raw NFC command to a tag.
Starts tag discovery and activation before sending the command data.
chan | The DRC channel to use. |
startDiscovery | If TRUE , start tag discovery and activate the tag if found, before sending the command data. If FALSE this will behave exactly like NFCSendRawData. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
commandSize | Size of the command data. |
responseSize | Size of the response data from the tag. |
commandData | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSendRawDataTwice | ( | VPADChan | chan, |
uint32_t | command0Timeout, | ||
uint32_t | command0Size, | ||
uint32_t | response0Size, | ||
void * | command0Data, | ||
uint32_t | command1Timeout, | ||
uint32_t | command1Size, | ||
uint32_t | response1Size, | ||
void * | command1Data, | ||
NFCRawDataTwiceCallbackFn | callback, | ||
void * | userContext | ||
) |
Send two raw NFC commands to an activated tag.
chan | The DRC channel to use. |
command0Timeout,command1Timeout | Timeout in ms after a command has been sent to the tag. |
command0Size,command1Size | Size of the command data. |
response0Size,response1Size | Size of the response data from the tag. |
command0Data,command1Size | Pointer to the command data. Note: The crc should not be included in the command and will be appended automatically. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCFormat | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Check if the tag is NDEF Formatable.
If yes, format the tag.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCGetTagInfo | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCGetTagInfoCallbackFn | callback, | ||
void * | userContext | ||
) |
Obtain info about tags.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCGetTagInfoMulti | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCGetTagInfoMultiCallbackFn | callback, | ||
void * | userContext | ||
) |
Obtain info about multiple tags.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCIsTagPresent | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Check if a tag is still present.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCSetReadOnly | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
BOOL | readOnly, | ||
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Make a Type 1 Tag read only by setting the RWA byte.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
readOnly | TRUE if read only, FALSE otherwise. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCReadT2T | ( | VPADChan | chan, |
uint32_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NFCNTAGVersion * | version, | ||
uint32_t | commandTimeout, | ||
uint8_t | numReads, | ||
uint8_t | read0Start, | ||
uint8_t | read0End, | ||
uint8_t | read1Start, | ||
uint8_t | read1End, | ||
uint8_t | read2Start, | ||
uint8_t | read2End, | ||
uint8_t | read3Start, | ||
uint8_t | read3End, | ||
uint8_t | authenticate, | ||
NFCReadT2TCallbackFn | callback, | ||
void * | userContext | ||
) |
Read data from a Type 2 NTAG.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
version | A pointer to the expected response data from the NTAG GET_VERSION command. The contents of this data is ignored for reads. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
numReads | The amount of read commands which should be peformed. |
read0Start,read1Start,read2Start,read3Start | The start page address. |
read0End,read1End,read2End,read3End | The end page address. |
authenticate | TRUE if authentification using PWD_AUTH should be done. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NFCError NFCWriteT2T | ( | VPADChan | chan, |
uint16_t | discoveryTimeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NFCNTAGVersion * | version, | ||
uint32_t | commandTimeout, | ||
uint8_t | numWrites, | ||
uint8_t | write0Start, | ||
uint8_t | write0Size, | ||
void * | write0Data, | ||
uint8_t | write1Start, | ||
uint8_t | write1Size, | ||
void * | write1Data, | ||
uint8_t | write2Start, | ||
uint8_t | write2Size, | ||
void * | write2Data, | ||
uint8_t | write3Start, | ||
uint8_t | write3Size, | ||
void * | write3Data, | ||
uint8_t | activationStart, | ||
uint32_t * | deactivationData, | ||
uint32_t * | activationData, | ||
uint8_t | authenticate, | ||
uint8_t | activate, | ||
NFCCallbackFn | callback, | ||
void * | userContext | ||
) |
Write data to a Type 2 NTAG.
chan | The DRC channel to use. |
discoveryTimeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID. |
version | A pointer to the expected response data from the NTAG GET_VERSION command. |
commandTimeout | Timeout in ms after a command has been sent to the tag. |
numWrites | The amount of write commands which should be peformed. |
write0Start,write1Start,write2Start,write3Start | The start page address. |
write0Size,write1Size,write2Size,write3Size | The size of the data to write in bytes. |
write0Data,write1Data,write2Data,write3Data | The data which should be written (max. 0xF0 bytes per write). |
activationStart | Page address where activation/deactivation should be performed |
deactivationData | Pointer to the deactivation data |
activationData | Pointer to the activation data |
authenticate | TRUE if (custom?) authentification using PWD_AUTH should be done. |
activate | TRUE if activation should be done. This will write the deactivation data to the activation start before performing any writes. After writing is completed the activation data will be written to the activation start. If writing fails at any point the activation data can be checked to ensure writing has completed. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
void NFCGetUIDFromActivationEventData | ( | void * | data, |
NFCProtocol * | outProtocol, | ||
NFCTechnology * | outTechnology, | ||
uint8_t * | outUidSize, | ||
uint8_t * | outUid | ||
) |
Get the UID and other parameters from activation event data.
data | Pointer to the activation event data returned by NFCRawDataCallbackFn if startDiscovery is true. |
outProtocol | Pointer to write the protocol to. |
outTechnology | Pointer to write the technology to. |
outUidSize | Pointer to write the UID size to. |
outUid | Pointer to write the UID to (max. 10 bytes). |