NTAGSetTagDetectCallback

Syntax

#include <cafe/ntag.h>

typedef void (*NTAGTagDetectCallback)(s32 chan, BOOL detect, void* userData); 

void NTAGSetTagDetectCallback( s32 chan, NTAGTagDetectCallback callback, void* userData );

Parameters

chan Controller number 0.
callback Callback called when tags are detected.
userData Data to pass to the callback function.

Return Values

None.

Description

With this function, you can register a callback to call when tags are detected. You can use this callback to obtain the events when tags are detected and when processing finishes. For example, after calling the NTAGWrite function to start polling tags, the instant that tags are detected can be determined by using this function. When the callback's detect parameter is TRUE, it indicates that tags were detected; if FALSE, it indicates that a series of processes has finished.

The callback function that can be set with this function is cleared at initialization (when NTAGInit is called) and at shutdown (when NTAGShutdown is called). Accordingly, in cases such as reinitializing to reconnect a disconnected wireless connection, use this function after initialization to register the callback again.

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.
2013/01/31 Added a description of reinitialization cases.
2012/12/11 Initial version.


CONFIDENTIAL