#include <cafe/ntag.h> typedef void (*NTAGResultCheckCallback)(s32 chan, NTAGError error_code, void* userData); NTAGError NTAGWrite ( s32 chan ,u16 time_out, const u8* uid, u16 write_size, const u8* data, NTAGResultCheckCallback callback, void* userData );
|chan||Controller number 0.|
1 through 65535 : ms
|uid||ID of the target tag (7 bytes).
Must always be specified. (Tags that do not match cannot be written to.)
|write_size||Size of the write data.
Must be equal to or less than the size of the RAM region for the tag.
|data||Pointer to the data to write.|
|callback||Callback called when data writing finishes.|
|userData||Data to pass to the callback function.|
|The command was issued normally.|
|The initialization of the NFC module is not finished.|
When tags are detected, the following registered callbacks send notifications with the following details.
Writes data to tags. When the writing is complete, specify the UID for the target tag. The write data specified in this function must be of a size equal to or less than the RAM region for the tag that handles the writing. If the size provided in the arguments does not fill the RAM region, the remaining data is filled in with random values on the system side when the tag is written.
(Writing to tags is performed for the entire region, not just part of it.) Accordingly, if you want to rewrite only some of the tag data, first read it, create changed data for only the relevant regions, and then specify it in this function.
You can also determine whether the writing succeeded from the callback that was set.
NTAGFormatfunction to redo the formatting, and then write the data again.
|Background||Do not call this function from the background.|
|Multiple threads||This function is not thread-safe.|
|Multiple Cores||Do not call this function from more than one Core.|
2013/05/08 Automated cleanup pass.
2012/12/11 Initial version.