wut
v1.7.0
Wii U Toolchain
|
Nintendo? Tag (NTAG). More...
Data Structures | |
struct | NTAGFormatSettings |
struct | NTAGNoftHeader |
struct | NTAGInfoHeader |
struct | NTAGAreaHeader |
struct | NTAGAreaInfo |
struct | NTAGData |
struct | NTAGInfoT2T |
struct | NTAGApplicationDataT2T |
struct | NTAGRawDataT2T |
struct | NTAGRawDataContainerT2T |
struct | NTAGDataT2T |
struct | NTAGRawDataT2T.section0 |
struct | NTAGRawDataT2T.section1 |
struct | NTAGRawDataT2T.section2 |
Functions | |
NTAGError | NTAGInit (VPADChan chan) |
Initializes the NTAG library. More... | |
NTAGError | NTAGInitEx (VPADChan chan) |
Initializes the NTAG library. More... | |
BOOL | NTAGIsInit (VPADChan chan) |
Check if NTAG is initialized. More... | |
void | NTAGProc (VPADChan chan) |
Process NTAG. More... | |
NTAGError | NTAGShutdown (VPADChan chan) |
Shutdown the NTAG library. More... | |
NTAGError | NTAGAbort (VPADChan chan, NTAGCallbackFn callback, void *userContext) |
Abort pending NTAG operations. More... | |
static NFCError | NTAGDetect (VPADChan chan, uint32_t timeout, NFCDetectCallbackFn callback, void *userContext) |
Start tag discovery and provide info about the first detected tag. More... | |
NTAGError | NTAGFormat (VPADChan chan, uint32_t timeout, NFCUid *uid, uint32_t rwSize, void *rwData, NTAGCallbackFn callback, void *userContext) |
Format a Type 1 Tag. More... | |
NTAGError | NTAGSetReadOnly (VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, BOOL readOnly, NTAGCallbackFn callback, void *userContext) |
Make a Type 1 Tag read only by setting the RWA byte. More... | |
void | NTAGSetTagDetectCallback (VPADChan chan, NFCTagDetectCallbackFn callback, void *userContext) |
Set a callback which will be called once a tag is attached / removed. More... | |
void | NTAGSetFormatSettings (NTAGFormatSettings *settings) |
Set the format settings which should be checked against while reading from Type 1 tags. More... | |
NTAGError | NTAGRead (VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, NTAGReadCallbackFn callback, void *userContext) |
Read from a Type 1 Tag. More... | |
NTAGError | NTAGReadT2T (VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, NTAGReadT2TCallbackFn callback, void *userContext) |
Read from a Type 2 Tag and decrypt & convert the data. More... | |
NTAGError | NTAGReadT2TRawData (VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, NTAGReadT2TRawDataCallbackFn callback, void *userContext) |
Read raw data from a Type 2 Tag. More... | |
NTAGError | NTAGWrite (VPADChan chan, uint32_t timeout, NFCUid *uid, uint32_t rwSize, void *rwData, NTAGCallbackFn callback, void *userContext) |
Write to the RW area of a Type 1 Tag. More... | |
NTAGError | NTAGWriteT2T (VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGRawDataContainerT2T *dataContainer, NTAGCallbackFn callback, void *userContext) |
Write to a Type 2 Tag. More... | |
NTAGError | NTAGWriteT2TConfigArea (VPADChan chan, uint32_t timeout, NFCUid *uid, uint32_t *cfg0, uint32_t *cfg1, uint32_t *pwd, uint16_t *pack, NTAGCallbackFn callback, void *userContext) |
Write to the configuration fields of a Type 2 Tag. More... | |
NTAGError | NTAGWriteT2TLockArea (VPADChan chan, uint32_t timeout, NFCUid *uid, uint32_t *lockBytes, uint32_t *dynamicLock, uint32_t *cc, NTAGCallbackFn callback, void *userContext) |
Write to the lock bytes of a Type 2 Tag. More... | |
NTAGError | NTAGWriteT2TRawData (VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGRawDataT2T *data, NTAGCallbackFn callback, void *userContext) |
Write raw data to a Type 2 Tag. More... | |
NTAGError | NTAGWriteT2TRawDataEx (VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGRawDataT2T *data, NTAGCallbackFn callback, void *userContext, uint8_t authenticate) |
Write raw data to a Type 2 Tag. More... | |
NTAGError | NTAGWriteT2TWithConvert (VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGDataT2T *data, NTAGCallbackFn callback, void *userContext) |
Convert & encrypt data and write it to a Type 2 Tag. More... | |
NTAGError | NTAGConvertT2T (NTAGDataT2T *out, NTAGDataT2T *in) |
Convert and encrypt data. More... | |
NTAGError | NTAGParseHeader (void *data, NTAGNoftHeader *outNoftHeader, NTAGInfoHeader *outInfoHeader, NTAGAreaHeader *outRwHeader, NTAGAreaHeader *outRoHeader) |
Parse the headers from Type 1 Tag data. More... | |
Nintendo? Tag (NTAG).
NFC library for Amiibo and Pokemon Rumble U. For a high-level Amiibo library see nn::nfp.
struct NTAGFormatSettings |
struct NTAGNoftHeader |
struct NTAGInfoHeader |
struct NTAGAreaHeader |
struct NTAGAreaInfo |
struct NTAGData |
Data Fields | ||
---|---|---|
NFCUid | uid | |
uint8_t | readOnly | |
uint8_t | formatVersion | |
NTAGAreaInfo | rwInfo | |
NTAGAreaInfo | roInfo |
struct NTAGInfoT2T |
Data Fields | ||
---|---|---|
uint8_t | magic | |
uint16_t | writes | |
uint8_t | figureVersion | |
uint8_t | flags | |
uint8_t | characterID[3] | |
uint16_t | numberingID | |
uint8_t | figureType | |
uint8_t | seriesID | |
uint32_t | unknown | |
uint16_t | applicationAreaWrites | |
uint16_t | crcCounter | |
uint32_t | crc | |
uint8_t | fontRegion | |
uint16_t | name[10] | |
FFLStoreData | mii | |
uint8_t | country | |
uint16_t | setupDate | |
uint16_t | lastWriteDate | |
uint32_t | accessID | |
uint64_t | titleID | |
uint8_t | reserved[0x1FC] | First 0x22 bytes contain NX specific extensions. |
struct NTAGApplicationDataT2T |
struct NTAGRawDataT2T |
Data Fields | ||
---|---|---|
uint8_t | uid[9] | |
uint8_t | internal | |
uint8_t | lockBytes[2] | |
uint8_t | capabilityContainer[4] | |
struct NTAGRawDataT2T | section0 | |
struct NTAGRawDataT2T | section1 | |
struct NTAGRawDataT2T | section2 | |
uint8_t | applicationData[0xD8] | |
uint8_t | dynamicLock[3] | |
uint8_t | reserved0 | |
uint8_t | cfg0[4] | |
uint8_t | cfg1[4] | |
uint8_t | pwd[4] | |
uint8_t | pack[2] | |
uint8_t | reserved1[2] |
struct NTAGRawDataContainerT2T |
Data Fields | ||
---|---|---|
uint16_t | size | |
NTAGRawDataT2T | data |
struct NTAGDataT2T |
Data Fields | ||
---|---|---|
NFCTagInfo | tagInfo | |
uint8_t | formatVersion | |
NTAGInfoT2T | info | |
NTAGApplicationDataT2T | appData | |
NTAGRawDataContainerT2T | raw |
struct NTAGRawDataT2T.section0 |
struct NTAGRawDataT2T.section1 |
struct NTAGRawDataT2T.section2 |
Data Fields | ||
---|---|---|
FFLStoreData | mii | |
uint64_t | titleID | |
uint16_t | applicationAreaWrites | |
uint32_t | accessID | |
uint8_t | reserved[0x22] |
typedef struct NTAGFormatSettings NTAGFormatSettings |
typedef struct NTAGNoftHeader NTAGNoftHeader |
typedef struct NTAGInfoHeader NTAGInfoHeader |
typedef struct NTAGAreaHeader NTAGAreaHeader |
typedef struct NTAGAreaInfo NTAGAreaInfo |
typedef struct NTAGInfoT2T NTAGInfoT2T |
typedef struct NTAGApplicationDataT2T NTAGApplicationDataT2T |
typedef struct NTAGRawDataT2T NTAGRawDataT2T |
typedef struct NTAGRawDataContainerT2T NTAGRawDataContainerT2T |
typedef struct NTAGDataT2T NTAGDataT2T |
typedef void(* NTAGReadT2TCallbackFn) (VPADChan chan, NTAGError error, NTAGDataT2T *data, void *userContext) |
Callback function for NTAGReadT2T.
chan | The channel this callback is coming from. |
error | 0 on success. |
data | The result of the data read. |
userContext | User provided value. |
typedef void(* NTAGReadT2TRawDataCallbackFn) (VPADChan chan, NTAGError error, NFCTagInfo *tagInfo, NTAGRawDataContainerT2T *rawData, void *userContext) |
Callback function for NTAGReadT2TRawData.
chan | The channel this callback is coming from. |
error | 0 on success. |
tagInfo | The tag info of the read tag. |
data | The result of the data read. |
userContext | User provided value. |
Initializes the NTAG library.
chan | The DRC channel to use. |
Initializes the NTAG library.
chan | The DRC channel to use. |
Check if NTAG is initialized.
chan | The DRC channel to use. |
TRUE
if initialized, FALSE
otherwise. void NTAGProc | ( | VPADChan | chan | ) |
Process NTAG.
This needs to be called periodically and will call pending callbacks.
chan | The DRC channel to use. |
Shutdown the NTAG library.
chan | The DRC channel to use. |
NTAGError NTAGAbort | ( | VPADChan | chan, |
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Abort pending NTAG 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. |
|
inlinestatic |
Start tag discovery and provide info about the first detected tag.
chan | The DRC channel to use. |
timeout | 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. |
NTAGError NTAGFormat | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
uint32_t | rwSize, | ||
void * | rwData, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Format a Type 1 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
rwSize | The size of the data which should be written to initialize the RW area. |
rwData | A pointer to the data which should be written to initialize the RW area. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGSetReadOnly | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
BOOL | readOnly, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Make a Type 1 Tag read only by setting the RWA byte.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag (can be NULL ). |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID (can be NULL ). |
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. |
void NTAGSetTagDetectCallback | ( | 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. |
void NTAGSetFormatSettings | ( | NTAGFormatSettings * | settings | ) |
Set the format settings which should be checked against while reading from Type 1 tags.
settings | A pointer from which the settings should be copied from. |
NTAGError NTAGRead | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NTAGReadCallbackFn | callback, | ||
void * | userContext | ||
) |
Read from a Type 1 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag (can be NULL ). |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID (can be NULL ). |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGReadT2T | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NTAGReadT2TCallbackFn | callback, | ||
void * | userContext | ||
) |
Read from a Type 2 Tag and decrypt & convert the data.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag (can be NULL ). |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID (can be NULL ). |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGReadT2TRawData | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NFCUid * | uidMask, | ||
NTAGReadT2TRawDataCallbackFn | callback, | ||
void * | userContext | ||
) |
Read raw data from a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag (can be NULL ). |
uidMask | The UID of the tag will be masked with this mask before compared to the expected UID (can be NULL ). |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWrite | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
uint32_t | rwSize, | ||
void * | rwData, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Write to the RW area of a Type 1 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
rwSize | The size of the data which should be written to the RW area. |
rwData | A pointer to the data which should be written to the RW area. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWriteT2T | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NTAGRawDataContainerT2T * | dataContainer, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Write to a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
dataContainer | A pointer to the container which contains the data which should be written to the tag. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWriteT2TConfigArea | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
uint32_t * | cfg0, | ||
uint32_t * | cfg1, | ||
uint32_t * | pwd, | ||
uint16_t * | pack, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Write to the configuration fields of a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
cfg0 | A pointer to the data which should be written to the CFG0 field. |
cfg1 | A pointer to the data which should be written to the CFG1 field. |
pwd | A pointer to the data which should be written to the PWD field. |
pack | A pointer to the data which should be written to the PACK field. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWriteT2TLockArea | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
uint32_t * | lockBytes, | ||
uint32_t * | dynamicLock, | ||
uint32_t * | cc, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Write to the lock bytes of a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
lockBytes | A pointer to the data which should be written to the lock bytes. |
dynamicLock | A pointer to the data which should be written to the dynamic lock bytes. |
cc | A pointer to the data which should be written to the capability container. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWriteT2TRawData | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NTAGRawDataT2T * | data, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Write raw data to a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
data | A pointer to the data which should be written to the tag. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGWriteT2TRawDataEx | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NTAGRawDataT2T * | data, | ||
NTAGCallbackFn | callback, | ||
void * | userContext, | ||
uint8_t | authenticate | ||
) |
Write raw data to a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
data | A pointer to the data which should be written to the tag. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
authenticate | TRUE if authentification using PWD_AUTH should be done. |
NTAGError NTAGWriteT2TWithConvert | ( | VPADChan | chan, |
uint32_t | timeout, | ||
NFCUid * | uid, | ||
NTAGDataT2T * | data, | ||
NTAGCallbackFn | callback, | ||
void * | userContext | ||
) |
Convert & encrypt data and write it to a Type 2 Tag.
chan | The DRC channel to use. |
timeout | Timeout in ms until tag discovery is cancelled. |
uid | The UID of the expected tag. |
data | A pointer to the data which should be written to the tag. |
callback | A pointer to the callback function. |
userContext | User provided value which will be passed to the callback. |
NTAGError NTAGConvertT2T | ( | NTAGDataT2T * | out, |
NTAGDataT2T * | in | ||
) |
Convert and encrypt data.
out | A pointer to write the encrypted data to the raw field. This can be the same as |
in. | |
in | A pointer to read the data from. This can be the same as |
out. |
NTAGError NTAGParseHeader | ( | void * | data, |
NTAGNoftHeader * | outNoftHeader, | ||
NTAGInfoHeader * | outInfoHeader, | ||
NTAGAreaHeader * | outRwHeader, | ||
NTAGAreaHeader * | outRoHeader | ||
) |
Parse the headers from Type 1 Tag data.
data | The data from which the headers should be parsed from. |
outNoftHeader | A pointer to which the NOFT header should be copied to. |
outInfoHeader | A pointer to which the info header should be copied to. |
outRwHeader | A pointer to which the RW header should be copied to. |
outRoHeader | A pointer to which the RO header should be copied to. |