nfc/ntag_demo

Location

$CAFE_ROOT/system/src/demo/drc/ntag

Description

This sample program demonstrates NFC features. With this program, you can try out the features of the NTAG library, starting with the feature for writing to and reading from Nintendo's proprietary NFC tag (NOFT). You can also try some of the functions of the NFC library. To use this sample program to read and write NOFT tags, create the NOFT tags beforehand using the tool for creating NFC tags in Nintendo's proprietary format. Nintendo's proprietary format does not allow data that does not match the format to be read or written. This sample supports reading NOFT tags with the following content.

Format versionVer0
Regions used by tagsRAM : 288 byte
ROM : 16 bytes
Maker code0x30303031

Screen Display

Functions All of the functions that can be used in the NTAG library can be issued.
NTAG DEMO MAN Information about how to operate the sample demo.
Status Shows whether the NTAG library has been initialized and whether tags have been detected.
Result Shows the result of executing the various functions. When data is read, it shows the size and UID that were read and displays the image data used as samples. When NFCGetTagInfo was executed, it shows the tag information obtained.

DRC Display

Shows the same screen as the TV screen.

How to Use

First, select and execute NTAGInit. Next, confirm that the initialization has finished in Status, and then execute the various functions. For example, after writing data to a tag, execute a sequence of commands like the following to read that data.

  1. Execute NTAGInit, and then look at the Status field to confirm that the initialization has finished.
  2. Execute NTAGRead and confirm that Now discovering ... is displayed in the Status field.
  3. Hold the tag over the lower left part of the GamePad.
  4. Confirm that the error code in the Result area is NTAG_ERR_NONE.
    (Read once to get the UID.)
  5. Select the data to write by using the L Button and the R Button.
  6. Execute NTAGWrite and confirm that Now discovering ... is displayed in the Status field.
  7. Hold the tag over the lower left part of the GamePad.
  8. Confirm that the error code in the Result area is NTAG_ERR_NONE.
  9. Execute NTAGRead and confirm that Now discovering ... is displayed in the Status field.
  10. Hold the tag over the lower left part of the GamePad.
  11. Confirm that the error code in the Result area is NTAG_ERR_NONE and that the image data written is displayed.

Source Code Files

main.c The application that handles the NTAG processes.
gfxutil.h
gfxutil.c
The collection of subroutines for rendering simple graphics.

Revision History

2013/05/08 Automated cleanup pass.
2012/11/15 Initial version.


CONFIDENTIAL