RC-S360, work-in-progress
This commit is contained in:
parent
082edbf598
commit
7c88fc27b5
2 changed files with 15 additions and 14 deletions
|
@ -38,6 +38,7 @@
|
||||||
#define SAMConfiguration 0x14
|
#define SAMConfiguration 0x14
|
||||||
#define PowerDown 0x16
|
#define PowerDown 0x16
|
||||||
#define AlparCommandForTDA 0x18
|
#define AlparCommandForTDA 0x18
|
||||||
|
// RC-S360 has another command 0x18 for reset &..?
|
||||||
|
|
||||||
// RF communication
|
// RF communication
|
||||||
#define RFConfiguration 0x32
|
#define RFConfiguration 0x32
|
||||||
|
@ -141,34 +142,34 @@ typedef enum {
|
||||||
|
|
||||||
static const pn53x_command pn53x_commands[] = {
|
static const pn53x_command pn53x_commands[] = {
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
PNCMD( Diagnose, PN531|PN532|PN533 ),
|
PNCMD( Diagnose, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( GetFirmwareVersion, PN531|PN532|PN533|RCS360 ),
|
PNCMD( GetFirmwareVersion, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( GetGeneralStatus, PN531|PN532|PN533 ),
|
PNCMD( GetGeneralStatus, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( ReadRegister, PN531|PN532|PN533 ),
|
PNCMD( ReadRegister, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( WriteRegister, PN531|PN532|PN533 ),
|
PNCMD( WriteRegister, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( ReadGPIO, PN531|PN532|PN533 ),
|
PNCMD( ReadGPIO, PN531|PN532|PN533 ),
|
||||||
PNCMD( WriteGPIO, PN531|PN532|PN533 ),
|
PNCMD( WriteGPIO, PN531|PN532|PN533 ),
|
||||||
PNCMD( SetSerialBaudRate, PN531|PN532|PN533 ),
|
PNCMD( SetSerialBaudRate, PN531|PN532|PN533 ),
|
||||||
PNCMD( SetParameters, PN531|PN532|PN533 ),
|
PNCMD( SetParameters, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( SAMConfiguration, PN531|PN532 ),
|
PNCMD( SAMConfiguration, PN531|PN532 ),
|
||||||
PNCMD( PowerDown, PN531|PN532 ),
|
PNCMD( PowerDown, PN531|PN532 ),
|
||||||
PNCMD( AlparCommandForTDA, PN533 ),
|
PNCMD( AlparCommandForTDA, PN533|RCS360 ), // Has another usage on RC-S360...
|
||||||
|
|
||||||
// RF communication
|
// RF communication
|
||||||
PNCMD( RFConfiguration, PN531|PN532|PN533 ),
|
PNCMD( RFConfiguration, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( RFRegulationTest, PN531|PN532|PN533 ),
|
PNCMD( RFRegulationTest, PN531|PN532|PN533 ),
|
||||||
|
|
||||||
// Initiator
|
// Initiator
|
||||||
PNCMD( InJumpForDEP, PN531|PN532|PN533 ),
|
PNCMD( InJumpForDEP, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( InJumpForPSL, PN531|PN532|PN533 ),
|
PNCMD( InJumpForPSL, PN531|PN532|PN533 ),
|
||||||
PNCMD( InListPassiveTarget, PN531|PN532|PN533 ),
|
PNCMD( InListPassiveTarget, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( InATR, PN531|PN532|PN533 ),
|
PNCMD( InATR, PN531|PN532|PN533 ),
|
||||||
PNCMD( InPSL, PN531|PN532|PN533 ),
|
PNCMD( InPSL, PN531|PN532|PN533 ),
|
||||||
PNCMD( InDataExchange, PN531|PN532|PN533 ),
|
PNCMD( InDataExchange, PN531|PN532|PN533 ),
|
||||||
PNCMD( InCommunicateThru, PN531|PN532|PN533 ),
|
PNCMD( InCommunicateThru, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( InQuartetByteExchange, PN533 ),
|
PNCMD( InQuartetByteExchange, PN533 ),
|
||||||
PNCMD( InDeselect, PN531|PN532|PN533 ),
|
PNCMD( InDeselect, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( InRelease, PN531|PN532|PN533 ),
|
PNCMD( InRelease, PN531|PN532|PN533|RCS360 ),
|
||||||
PNCMD( InSelect, PN531|PN532|PN533 ),
|
PNCMD( InSelect, PN531|PN532|PN533 ),
|
||||||
PNCMD( InAutoPoll, PN532 ),
|
PNCMD( InAutoPoll, PN532 ),
|
||||||
PNCMD( InActivateDeactivatePaypass, PN533 ),
|
PNCMD( InActivateDeactivatePaypass, PN533 ),
|
||||||
|
|
|
@ -2199,7 +2199,7 @@ pn53x_TgInitAsTarget (nfc_device_t * pnd, pn53x_target_mode_t ptm,
|
||||||
memcpy(abtCmd+26, pbtNFCID3t, 10);
|
memcpy(abtCmd+26, pbtNFCID3t, 10);
|
||||||
}
|
}
|
||||||
// General Bytes (ISO/IEC 18092)
|
// General Bytes (ISO/IEC 18092)
|
||||||
if (CHIP_DATA(pnd)->type == PN531) {
|
if ((CHIP_DATA(pnd)->type == PN531) || (CHIP_DATA(pnd)->type == RCS360)) {
|
||||||
if (szGBt) {
|
if (szGBt) {
|
||||||
memcpy (abtCmd+36, pbtGBt, szGBt);
|
memcpy (abtCmd+36, pbtGBt, szGBt);
|
||||||
szOptionalBytes = szGBt;
|
szOptionalBytes = szGBt;
|
||||||
|
@ -2212,7 +2212,7 @@ pn53x_TgInitAsTarget (nfc_device_t * pnd, pn53x_target_mode_t ptm,
|
||||||
szOptionalBytes = szGBt + 1;
|
szOptionalBytes = szGBt + 1;
|
||||||
}
|
}
|
||||||
// Historical bytes (ISO/IEC 14443-4)
|
// Historical bytes (ISO/IEC 14443-4)
|
||||||
if (CHIP_DATA(pnd)->type != PN531) { // PN531 does not handle Historical Bytes
|
if ((CHIP_DATA(pnd)->type != PN531) && (CHIP_DATA(pnd)->type != RCS360)) { // PN531 does not handle Historical Bytes
|
||||||
abtCmd[36+szOptionalBytes] = (byte_t)(szTkt);
|
abtCmd[36+szOptionalBytes] = (byte_t)(szTkt);
|
||||||
if (szTkt) {
|
if (szTkt) {
|
||||||
memcpy (abtCmd+37+szOptionalBytes, pbtTkt, szTkt);
|
memcpy (abtCmd+37+szOptionalBytes, pbtTkt, szTkt);
|
||||||
|
|
Loading…
Reference in a new issue