Difference between revisions of "NFC:GetTagState"

From 3dbrew
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:
 
|-
 
|-
 
| 0
 
| 0
| [[NFC:Initialize]] was just used.
+
| [[NFC:Initialize]] was not used yet.
 
|-
 
|-
 
| 1
 
| 1
Line 39: Line 39:
 
| 2
 
| 2
 
| Currently scanning for NFC tags. Set by [[NFC:StartTagScanning]] when successful.
 
| Currently scanning for NFC tags. Set by [[NFC:StartTagScanning]] when successful.
 +
|-
 +
| 3
 +
| NFC tag is in range. The state automatically changes to this when the state was previous value 3, without using any NFC service commands.
 +
|-
 +
| 4
 +
| NFC tag is now out of range, where the NFC tag was previously in range. This occurs automatically without using any NFC service commands. Once this state is entered, it won't automatically change to anything else when the tag is moved in range again. Hence, if you want to keep doing tag scanning after this, you must [[NFC:StopTagScanning|stop]]+[[NFC:StartTagScanning|start]] scanning.
 +
|-
 +
| 5
 +
| NFC tag data was successfully loaded. This is set by [[NFC:LoadAmiiboData]] when successful.
 
|}
 
|}
  
 
=Description=
 
=Description=
 
This returns the current NFC tag state.
 
This returns the current NFC tag state.

Latest revision as of 03:08, 1 January 2016

Request[edit]

Index Word Description
0 Header code [Starting with 9.3.0-X: 0x000D0000]

Response[edit]

Index Word Description
0 Header code
1 Result code
2 u8 output state

Tag state values[edit]

Value Description
0 NFC:Initialize was not used yet.
1 Not currently scanning for NFC tags. Set by NFC:StopTagScanning and NFC:Initialize, when successful.
2 Currently scanning for NFC tags. Set by NFC:StartTagScanning when successful.
3 NFC tag is in range. The state automatically changes to this when the state was previous value 3, without using any NFC service commands.
4 NFC tag is now out of range, where the NFC tag was previously in range. This occurs automatically without using any NFC service commands. Once this state is entered, it won't automatically change to anything else when the tag is moved in range again. Hence, if you want to keep doing tag scanning after this, you must stop+start scanning.
5 NFC tag data was successfully loaded. This is set by NFC:LoadAmiiboData when successful.

Description[edit]

This returns the current NFC tag state.