NFCGetTagInfo

Syntax

#include <cafe/nfc.h>

typedef void (*NFCGetTagInfoCallback)(s32 chan,  NFCError errorCode, 
                                      const NFCTagInfo* tagInfo, void* userData );

NFCError NFCGetTagInfo(s32 chan, u16 polling_time, 
                       NFCGetTagInfoCallback callback, void* userData);

Parameters

chan Controller number 0.
time_out Timeout intervals.
0: Infinite
1 through 65535 : ms
callback Callback called when a tag is detected and its basic information is obtained.
userData Data to pass to the callback function.

Return Values

NFC_ERR_NONEThe command was issued normally.
NFC_ERR_NOT_INITThe initialization of the NFC module is not finished.
NFC_ERR_INVALID_COMMANDInvalid command.

Callback Notification Details

When tags are detected, the following registered callbacks send notifications with the following details.

chanController number.
error_code Error code:
  • NFC_ERR_NONE : The process finished normally.
  • NFC_ERR_TIMEOUT : Timeout occurred.
  • NFC_ERR_GET_TAG_INFO : An error occurred during reading.
  • NFC_ERR_ABORT : The process was ended partway by the system.
    (When the HOME Menu is called or the TV control button is pressed.)
tagInfoInformation for the detected tag (NFCTagInfo).
userDataUser data.

Description

Detects tags and gets their basic information (tag type and UID).

Do Not Call From

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.

Revision History

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


CONFIDENTIAL