User manual

SCM3712 REFERENCE MANUAL 68
8.7.3. IOCTL_GET_OR_SET_RW_P2P_MODES
8.7.3.1. Description
IOCTL_GET_OR_SET_RW_P2P_MODES is used to switch the device from
Reader/Writer mode to P2P mode and vice versa. It can also be used to retrieve the
current mode of the device. By default, the device is in Reader/Writer mode.
When switched to P2P mode, it can be defined whether the device shall operate in active
or in passive mode.
8.7.3.2. Input buffer
Byte #
Value
Description
B0
0x00
RW mode
0x01 P2P mode
0x02
Get the current mode
B1
0x00
Passive mode - The Initiator generates the
RF field and the Target responds to an
Initiator command in a load modulation
scheme
0x01
Active mode - Mode in which both the
Initiator and the Target use their own RF
field to enable the communication
8.7.3.3. Output buffer
NULL, if the IOCTL is to switch the modes.
If the IOCTL is used to get the current mode of the device
Byte #
Value
Description
B0
0x00
RW mode
0x01 P2P mode
8.7.3.4. Return Value
Return Value
Value
Description
ERROR _SUCCESS
0
Successful execution
ERROR_GEN_FAILURE
31
Operation failed
ERROR_INSUFFICIENT_BUFFER
122
Input or output buffer too small