wut  v1.7.0
Wii U Toolchain
ntag.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include <nfc/nfc.h>
4 #include <nn/ffl/miidata.h>
5 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 typedef int32_t NTAGError;
21 typedef struct NTAGNoftHeader NTAGNoftHeader;
22 typedef struct NTAGInfoHeader NTAGInfoHeader;
23 typedef struct NTAGAreaHeader NTAGAreaHeader;
24 typedef struct NTAGAreaInfo NTAGAreaInfo;
25 typedef struct NTAGData NTAGData;
26 typedef struct NTAGInfoT2T NTAGInfoT2T;
28 typedef struct NTAGRawDataT2T NTAGRawDataT2T;
30 typedef struct NTAGDataT2T NTAGDataT2T;
31 
33 {
34  uint8_t version;
35  WUT_PADDING_BYTES(0x3);
36  uint32_t makerCode;
37  uint32_t identifyCode;
38  WUT_PADDING_BYTES(0x1C);
39 };
40 WUT_CHECK_OFFSET(NTAGFormatSettings, 0x0, version);
41 WUT_CHECK_OFFSET(NTAGFormatSettings, 0x4, makerCode);
42 WUT_CHECK_OFFSET(NTAGFormatSettings, 0x8, identifyCode);
43 WUT_CHECK_SIZE(NTAGFormatSettings, 0x28);
44 
45 struct WUT_PACKED NTAGNoftHeader
46 {
47  uint32_t magic;
48  uint8_t version;
49  uint16_t writeCount;
50  uint8_t unknown;
51 };
52 WUT_CHECK_OFFSET(NTAGNoftHeader, 0x0, magic);
53 WUT_CHECK_OFFSET(NTAGNoftHeader, 0x4, version);
54 WUT_CHECK_OFFSET(NTAGNoftHeader, 0x5, writeCount);
55 WUT_CHECK_OFFSET(NTAGNoftHeader, 0x7, unknown);
56 WUT_CHECK_SIZE(NTAGNoftHeader, 0x8);
57 
59 {
60  uint16_t rwHeaderOffset;
61  uint16_t rwSize;
62  uint16_t roHeaderOffset;
63  uint16_t roSize;
65  uint8_t formatVersion;
66 };
67 WUT_CHECK_OFFSET(NTAGInfoHeader, 0x0, rwHeaderOffset);
68 WUT_CHECK_OFFSET(NTAGInfoHeader, 0x2, rwSize);
69 WUT_CHECK_OFFSET(NTAGInfoHeader, 0x4, roHeaderOffset);
70 WUT_CHECK_OFFSET(NTAGInfoHeader, 0x6, roSize);
71 WUT_CHECK_OFFSET(NTAGInfoHeader, 0x8, uid);
72 WUT_CHECK_OFFSET(NTAGInfoHeader, 0xF, formatVersion);
73 WUT_CHECK_SIZE(NTAGInfoHeader, 0x10);
74 
76 {
77  uint16_t magic;
78  uint16_t offset;
79  uint16_t size;
80  WUT_PADDING_BYTES(0x2);
81  uint32_t makerCode;
82  uint32_t identifyCode;
83 };
84 WUT_CHECK_OFFSET(NTAGAreaHeader, 0x0, magic);
85 WUT_CHECK_OFFSET(NTAGAreaHeader, 0x2, offset);
86 WUT_CHECK_OFFSET(NTAGAreaHeader, 0x4, size);
87 WUT_CHECK_OFFSET(NTAGAreaHeader, 0x8, makerCode);
88 WUT_CHECK_OFFSET(NTAGAreaHeader, 0xC, identifyCode);
89 WUT_CHECK_SIZE(NTAGAreaHeader, 0x10);
90 
92 {
93  void *data;
94  uint16_t size;
95  WUT_PADDING_BYTES(0x2);
96  uint32_t makerCode;
97  uint32_t identifyCode;
98  WUT_PADDING_BYTES(0x20);
99 };
100 WUT_CHECK_OFFSET(NTAGAreaInfo, 0x0, data);
101 WUT_CHECK_OFFSET(NTAGAreaInfo, 0x4, size);
102 WUT_CHECK_OFFSET(NTAGAreaInfo, 0x8, makerCode);
103 WUT_CHECK_OFFSET(NTAGAreaInfo, 0xC, identifyCode);
104 WUT_CHECK_SIZE(NTAGAreaInfo, 0x30);
105 
106 struct NTAGData
107 {
109  uint8_t readOnly;
110  uint8_t formatVersion;
111  WUT_PADDING_BYTES(0x3);
114  WUT_PADDING_BYTES(0x20);
115 };
116 WUT_CHECK_OFFSET(NTAGData, 0x00, uid);
117 WUT_CHECK_OFFSET(NTAGData, 0x07, readOnly);
118 WUT_CHECK_OFFSET(NTAGData, 0x08, formatVersion);
119 WUT_CHECK_OFFSET(NTAGData, 0x0C, rwInfo);
120 WUT_CHECK_OFFSET(NTAGData, 0x3C, roInfo);
121 WUT_CHECK_SIZE(NTAGData, 0x8C);
122 
123 struct WUT_PACKED NTAGInfoT2T
124 {
125  uint8_t magic;
126  uint16_t writes;
127  uint8_t figureVersion;
128  uint8_t flags;
129  uint8_t characterID[3];
130  uint16_t numberingID;
131  uint8_t figureType;
132  uint8_t seriesID;
133  uint32_t unknown;
135  uint16_t crcCounter;
136  uint32_t crc;
137  uint8_t fontRegion;
138  uint16_t name[10];
140  uint8_t country;
141  uint16_t setupDate;
142  uint16_t lastWriteDate;
143  uint32_t accessID;
144  uint64_t titleID;
146  uint8_t reserved[0x1FC];
147 };
148 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x00, magic);
149 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x01, writes);
150 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x03, figureVersion);
151 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x04, flags);
152 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x05, characterID);
153 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x08, numberingID);
154 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x0A, figureType);
155 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x0B, seriesID);
156 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x0C, unknown);
157 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x10, applicationAreaWrites);
158 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x12, crcCounter);
159 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x14, crc);
160 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x18, fontRegion);
161 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x19, name);
162 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x2D, mii);
163 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x8D, country);
164 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x8E, setupDate);
165 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x90, lastWriteDate);
166 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x92, accessID);
167 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x96, titleID);
168 WUT_CHECK_OFFSET(NTAGInfoT2T, 0x9E, reserved);
169 WUT_CHECK_SIZE(NTAGInfoT2T, 0x29a);
170 
172 {
173  uint16_t size;
174  uint8_t data[0xD8];
175 };
176 WUT_CHECK_OFFSET(NTAGApplicationDataT2T, 0x00, size);
177 WUT_CHECK_OFFSET(NTAGApplicationDataT2T, 0x02, data);
178 WUT_CHECK_SIZE(NTAGApplicationDataT2T, 0xDA);
179 
181 {
182  uint8_t uid[9];
183  uint8_t internal;
184  uint8_t lockBytes[2];
186  struct WUT_PACKED {
187  uint8_t magic;
188  uint16_t writes;
189  uint8_t figureVersion;
190  uint8_t flags;
191  uint8_t country;
192  uint16_t crcCounter;
193  uint16_t setupDate;
194  uint16_t lastWriteDate;
195  uint32_t crc;
196  uint16_t name[10];
198  struct WUT_PACKED {
199  uint8_t tagHmac[0x20];
200  uint8_t characterID[3];
201  uint8_t figureType;
202  uint16_t numberingID;
203  uint8_t seriesID;
204  uint8_t formatVersion;
205  uint32_t unknown;
206  uint8_t keygenSalt[0x20];
207  uint8_t dataHmac[0x20];
209  struct WUT_PACKED {
210  FFLStoreData mii;
211  uint64_t titleID;
212  uint16_t applicationAreaWrites;
213  uint32_t accessID;
214  uint8_t reserved[0x22];
216  uint8_t applicationData[0xD8];
217  uint8_t dynamicLock[3];
218  uint8_t reserved0;
219  uint8_t cfg0[4];
220  uint8_t cfg1[4];
221  uint8_t pwd[4];
222  uint8_t pack[2];
223  uint8_t reserved1[2];
224 };
225 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x000, uid);
226 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x009, internal);
227 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x00A, lockBytes);
228 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x00C, capabilityContainer);
229 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x010, section0.magic);
230 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x011, section0.writes);
231 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x013, section0.figureVersion);
232 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x014, section0.flags);
233 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x015, section0.country);
234 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x016, section0.crcCounter);
235 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x018, section0.setupDate);
236 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x01A, section0.lastWriteDate);
237 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x01C, section0.crc);
238 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x020, section0.name);
239 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x034, section1.tagHmac);
240 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x054, section1.characterID);
241 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x057, section1.figureType);
242 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x058, section1.numberingID);
243 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x05A, section1.seriesID);
244 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x05B, section1.formatVersion);
245 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x05C, section1.unknown);
246 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x060, section1.keygenSalt);
247 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x080, section1.dataHmac);
248 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x0A0, section2.mii);
249 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x100, section2.titleID);
250 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x108, section2.applicationAreaWrites);
251 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x10A, section2.accessID);
252 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x10E, section2.reserved);
253 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x130, applicationData);
254 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x208, dynamicLock);
255 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x20B, reserved0);
256 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x20C, cfg0);
257 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x210, cfg1);
258 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x214, pwd);
259 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x218, pack);
260 WUT_CHECK_OFFSET(NTAGRawDataT2T, 0x21A, reserved1);
261 WUT_CHECK_SIZE(NTAGRawDataT2T, 0x21C);
262 
264 {
265  uint16_t size;
267 };
268 WUT_CHECK_OFFSET(NTAGRawDataContainerT2T, 0x00, size);
269 WUT_CHECK_OFFSET(NTAGRawDataContainerT2T, 0x02, data);
270 WUT_CHECK_SIZE(NTAGRawDataContainerT2T, 0x21E);
271 
273 {
275  uint8_t formatVersion;
279  WUT_PADDING_BYTES(0x20);
280 };
281 WUT_CHECK_OFFSET(NTAGDataT2T, 0x000, tagInfo);
282 WUT_CHECK_OFFSET(NTAGDataT2T, 0x02D, formatVersion);
283 WUT_CHECK_OFFSET(NTAGDataT2T, 0x02E, info);
284 WUT_CHECK_OFFSET(NTAGDataT2T, 0x2C8, appData);
285 WUT_CHECK_OFFSET(NTAGDataT2T, 0x3A2, raw);
286 WUT_CHECK_SIZE(NTAGDataT2T, 0x5E0);
287 
300 typedef void
301 (*NTAGCallbackFn)(VPADChan chan,
302  NTAGError error,
303  void *userContext);
304 
320 typedef void
322  NTAGError error,
323  NTAGData *data,
324  void *userContext);
325 
341 typedef void
343  NTAGError error,
344  NTAGDataT2T *data,
345  void *userContext);
346 
365 typedef void
367  NTAGError error,
368  NFCTagInfo *tagInfo,
369  NTAGRawDataContainerT2T *rawData,
370  void *userContext);
371 
381 NTAGError
383 
393 NTAGError
395 
405 BOOL
407 
415 void
417 
427 NTAGError
429 
445 NTAGError
447  NTAGCallbackFn callback,
448  void *userContext);
449 
472 static inline NFCError
474  uint32_t timeout,
475  NFCDetectCallbackFn callback,
476  void *userContext)
477 {
478  return NFCDetect(chan, timeout, callback, userContext);
479 }
480 // NTAGError
481 // NTAGDetect(VPADChan chan,
482 // uint32_t timeout,
483 // NTAGDetectCallbackFn callback,
484 // void *userContext);
485 
513 NTAGError
515  uint32_t timeout,
516  NFCUid *uid,
517  uint32_t rwSize,
518  void *rwData,
519  NTAGCallbackFn callback,
520  void *userContext);
521 
549 NTAGError
551  uint32_t timeout,
552  NFCUid *uid,
553  NFCUid *uidMask,
554  BOOL readOnly,
555  NTAGCallbackFn callback,
556  void *userContext);
557 
570 void
572  NFCTagDetectCallbackFn callback,
573  void *userContext);
574 
581 void
583 
608 NTAGError
610  uint32_t timeout,
611  NFCUid *uid,
612  NFCUid *uidMask,
613  NTAGReadCallbackFn callback,
614  void *userContext);
615 
640 NTAGError
642  uint32_t timeout,
643  NFCUid *uid,
644  NFCUid *uidMask,
645  NTAGReadT2TCallbackFn callback,
646  void *userContext);
647 
672 NTAGError
674  uint32_t timeout,
675  NFCUid *uid,
676  NFCUid *uidMask,
678  void *userContext);
679 
707 NTAGError
709  uint32_t timeout,
710  NFCUid *uid,
711  uint32_t rwSize,
712  void *rwData,
713  NTAGCallbackFn callback,
714  void *userContext);
715 
740 NTAGError
742  uint32_t timeout,
743  NFCUid *uid,
744  NTAGRawDataContainerT2T *dataContainer,
745  NTAGCallbackFn callback,
746  void *userContext);
747 
781 NTAGError
783  uint32_t timeout,
784  NFCUid *uid,
785  uint32_t *cfg0,
786  uint32_t *cfg1,
787  uint32_t *pwd,
788  uint16_t *pack,
789  NTAGCallbackFn callback,
790  void *userContext);
791 
822 NTAGError
824  uint32_t timeout,
825  NFCUid *uid,
826  uint32_t *lockBytes,
827  uint32_t *dynamicLock,
828  uint32_t *cc,
829  NTAGCallbackFn callback,
830  void *userContext);
831 
856 NTAGError
858  uint32_t timeout,
859  NFCUid *uid,
860  NTAGRawDataT2T *data,
861  NTAGCallbackFn callback,
862  void *userContext);
863 
891 NTAGError
893  uint32_t timeout,
894  NFCUid *uid,
895  NTAGRawDataT2T *data,
896  NTAGCallbackFn callback,
897  void *userContext,
898  uint8_t authenticate);
899 
924 NTAGError
926  uint32_t timeout,
927  NFCUid *uid,
928  NTAGDataT2T *data,
929  NTAGCallbackFn callback,
930  void *userContext);
931 
944 NTAGError
946  NTAGDataT2T *in);
947 
969 NTAGError
970 NTAGParseHeader(void *data,
971  NTAGNoftHeader *outNoftHeader,
972  NTAGInfoHeader *outInfoHeader,
973  NTAGAreaHeader *outRwHeader,
974  NTAGAreaHeader *outRoHeader);
975 
976 #ifdef __cplusplus
977 }
978 #endif
979 
int32_t NFCError
Definition: nfc.h:16
void(* NFCTagDetectCallbackFn)(VPADChan chan, BOOL hasTag, void *userContext)
Callback function for NFCSetTagDetectCallback.
Definition: nfc.h:182
void(* NFCDetectCallbackFn)(VPADChan chan, NFCError error, NFCUid *uid, BOOL readOnly, BOOL hasLockedData, NFCNDEFFlags flags, void *userContext)
Callback function for NFCDetect.
Definition: nfc.h:211
NFCError NFCDetect(VPADChan chan, uint32_t discoveryTimeout, NFCDetectCallbackFn callback, void *userContext)
Start tag discovery and provide info about the first detected tag.
Definition: nfc.h:90
Definition: nfc.h:83
uint8_t magic
Definition: ntag.h:125
uint32_t makerCode
Definition: ntag.h:35
NTAGInfoT2T info
Definition: ntag.h:276
uint64_t titleID
Definition: ntag.h:144
uint16_t rwSize
Definition: ntag.h:61
NTAGApplicationDataT2T appData
Definition: ntag.h:277
uint16_t numberingID
Definition: ntag.h:130
NFCTagInfo tagInfo
Definition: ntag.h:274
uint16_t writeCount
Definition: ntag.h:49
uint16_t lastWriteDate
Definition: ntag.h:142
uint8_t unknown
Definition: ntag.h:50
uint16_t applicationAreaWrites
Definition: ntag.h:134
uint8_t pwd[4]
Definition: ntag.h:221
uint16_t crcCounter
Definition: ntag.h:135
uint16_t writes
Definition: ntag.h:126
uint8_t reserved0
Definition: ntag.h:218
uint8_t figureVersion
Definition: ntag.h:127
uint8_t dynamicLock[3]
Definition: ntag.h:217
uint32_t magic
Definition: ntag.h:47
uint8_t figureType
Definition: ntag.h:131
uint8_t capabilityContainer[4]
Definition: ntag.h:185
uint8_t lockBytes[2]
Definition: ntag.h:184
uint8_t reserved1[2]
Definition: ntag.h:223
FFLStoreData mii
Definition: ntag.h:139
uint8_t cfg0[4]
Definition: ntag.h:219
void * data
Definition: ntag.h:93
uint32_t identifyCode
Definition: ntag.h:37
struct NTAGRawDataT2T::@44 section2
uint32_t crc
Definition: ntag.h:136
uint8_t country
Definition: ntag.h:140
uint16_t magic
Definition: ntag.h:77
NTAGAreaInfo roInfo
Definition: ntag.h:113
uint8_t data[0xD8]
Definition: ntag.h:174
uint16_t roHeaderOffset
Definition: ntag.h:62
uint8_t flags
Definition: ntag.h:128
uint16_t size
Definition: ntag.h:79
NFCUid uid
Definition: ntag.h:64
uint8_t pack[2]
Definition: ntag.h:222
uint8_t uid[9]
Definition: ntag.h:182
uint8_t version
Definition: ntag.h:34
NTAGRawDataT2T data
Definition: ntag.h:266
uint32_t accessID
Definition: ntag.h:143
uint8_t applicationData[0xD8]
Definition: ntag.h:216
uint16_t offset
Definition: ntag.h:78
uint8_t formatVersion
Definition: ntag.h:65
uint8_t seriesID
Definition: ntag.h:132
uint32_t unknown
Definition: ntag.h:133
uint8_t fontRegion
Definition: ntag.h:137
uint16_t roSize
Definition: ntag.h:63
NTAGRawDataContainerT2T raw
Definition: ntag.h:278
uint8_t cfg1[4]
Definition: ntag.h:220
uint16_t rwHeaderOffset
Definition: ntag.h:60
NTAGAreaInfo rwInfo
Definition: ntag.h:111
uint8_t readOnly
Definition: ntag.h:109
struct NTAGRawDataT2T::@42 section0
uint16_t setupDate
Definition: ntag.h:141
struct NTAGRawDataT2T::@43 section1
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.
void NTAGSetTagDetectCallback(VPADChan chan, NFCTagDetectCallbackFn callback, void *userContext)
Set a callback which will be called once a tag is attached / removed.
NTAGError NTAGRead(VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, NTAGReadCallbackFn callback, void *userContext)
Read from a Type 1 Tag.
NTAGError NTAGReadT2TRawData(VPADChan chan, uint32_t timeout, NFCUid *uid, NFCUid *uidMask, NTAGReadT2TRawDataCallbackFn callback, void *userContext)
Read raw data from a Type 2 Tag.
BOOL NTAGIsInit(VPADChan chan)
Check if NTAG is initialized.
void(* NTAGReadT2TRawDataCallbackFn)(VPADChan chan, NTAGError error, NFCTagInfo *tagInfo, NTAGRawDataContainerT2T *rawData, void *userContext)
Callback function for NTAGReadT2TRawData.
Definition: ntag.h:366
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.
void(* NTAGReadCallbackFn)(VPADChan chan, NTAGError error, NTAGData *data, void *userContext)
Callback function for NTAGRead.
Definition: ntag.h:321
NTAGError NTAGFormat(VPADChan chan, uint32_t timeout, NFCUid *uid, uint32_t rwSize, void *rwData, NTAGCallbackFn callback, void *userContext)
Format a Type 1 Tag.
void(* NTAGReadT2TCallbackFn)(VPADChan chan, NTAGError error, NTAGDataT2T *data, void *userContext)
Callback function for NTAGReadT2T.
Definition: ntag.h:342
void(* NTAGCallbackFn)(VPADChan chan, NTAGError error, void *userContext)
Generic callback function.
Definition: ntag.h:301
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.
NTAGError NTAGWriteT2T(VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGRawDataContainerT2T *dataContainer, NTAGCallbackFn callback, void *userContext)
Write to a Type 2 Tag.
void NTAGSetFormatSettings(NTAGFormatSettings *settings)
Set the format settings which should be checked against while reading from Type 1 tags.
NTAGError NTAGShutdown(VPADChan chan)
Shutdown the NTAG library.
NTAGError NTAGInit(VPADChan chan)
Initializes the NTAG library.
NTAGError NTAGInitEx(VPADChan chan)
Initializes the NTAG library.
NTAGError NTAGParseHeader(void *data, NTAGNoftHeader *outNoftHeader, NTAGInfoHeader *outInfoHeader, NTAGAreaHeader *outRwHeader, NTAGAreaHeader *outRoHeader)
Parse the headers from Type 1 Tag data.
NTAGError NTAGAbort(VPADChan chan, NTAGCallbackFn callback, void *userContext)
Abort pending NTAG operations.
void NTAGProc(VPADChan chan)
Process NTAG.
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.
static NFCError NTAGDetect(VPADChan chan, uint32_t timeout, NFCDetectCallbackFn callback, void *userContext)
Start tag discovery and provide info about the first detected tag.
Definition: ntag.h:473
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.
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.
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.
NTAGError NTAGWriteT2TRawData(VPADChan chan, uint32_t timeout, NFCUid *uid, NTAGRawDataT2T *data, NTAGCallbackFn callback, void *userContext)
Write raw data to a Type 2 Tag.
NTAGError NTAGConvertT2T(NTAGDataT2T *out, NTAGDataT2T *in)
Convert and encrypt data.
int32_t NTAGError
Definition: ntag.h:19
Definition: ntag.h:107
VPADChan
Wii U GamePad channel.
Definition: base.h:16
int32_t BOOL
Definition: wut_types.h:7