RC-S360, work-in-progress

This commit is contained in:
Philippe Teuwen 2011-06-09 08:59:06 +00:00
parent 082edbf598
commit 7c88fc27b5
2 changed files with 15 additions and 14 deletions

View file

@ -38,6 +38,7 @@
#define SAMConfiguration 0x14
#define PowerDown 0x16
#define AlparCommandForTDA 0x18
// RC-S360 has another command 0x18 for reset &..?
// RF communication
#define RFConfiguration 0x32
@ -141,34 +142,34 @@ typedef enum {
static const pn53x_command pn53x_commands[] = {
// Miscellaneous
PNCMD( Diagnose, PN531|PN532|PN533 ),
PNCMD( Diagnose, PN531|PN532|PN533|RCS360 ),
PNCMD( GetFirmwareVersion, PN531|PN532|PN533|RCS360 ),
PNCMD( GetGeneralStatus, PN531|PN532|PN533 ),
PNCMD( ReadRegister, PN531|PN532|PN533 ),
PNCMD( WriteRegister, PN531|PN532|PN533 ),
PNCMD( GetGeneralStatus, PN531|PN532|PN533|RCS360 ),
PNCMD( ReadRegister, PN531|PN532|PN533|RCS360 ),
PNCMD( WriteRegister, PN531|PN532|PN533|RCS360 ),
PNCMD( ReadGPIO, PN531|PN532|PN533 ),
PNCMD( WriteGPIO, PN531|PN532|PN533 ),
PNCMD( SetSerialBaudRate, PN531|PN532|PN533 ),
PNCMD( SetParameters, PN531|PN532|PN533 ),
PNCMD( SetParameters, PN531|PN532|PN533|RCS360 ),
PNCMD( SAMConfiguration, PN531|PN532 ),
PNCMD( PowerDown, PN531|PN532 ),
PNCMD( AlparCommandForTDA, PN533 ),
PNCMD( AlparCommandForTDA, PN533|RCS360 ), // Has another usage on RC-S360...
// RF communication
PNCMD( RFConfiguration, PN531|PN532|PN533 ),
PNCMD( RFConfiguration, PN531|PN532|PN533|RCS360 ),
PNCMD( RFRegulationTest, PN531|PN532|PN533 ),
// Initiator
PNCMD( InJumpForDEP, PN531|PN532|PN533 ),
PNCMD( InJumpForDEP, PN531|PN532|PN533|RCS360 ),
PNCMD( InJumpForPSL, PN531|PN532|PN533 ),
PNCMD( InListPassiveTarget, PN531|PN532|PN533 ),
PNCMD( InListPassiveTarget, PN531|PN532|PN533|RCS360 ),
PNCMD( InATR, PN531|PN532|PN533 ),
PNCMD( InPSL, PN531|PN532|PN533 ),
PNCMD( InDataExchange, PN531|PN532|PN533 ),
PNCMD( InCommunicateThru, PN531|PN532|PN533 ),
PNCMD( InCommunicateThru, PN531|PN532|PN533|RCS360 ),
PNCMD( InQuartetByteExchange, PN533 ),
PNCMD( InDeselect, PN531|PN532|PN533 ),
PNCMD( InRelease, PN531|PN532|PN533 ),
PNCMD( InDeselect, PN531|PN532|PN533|RCS360 ),
PNCMD( InRelease, PN531|PN532|PN533|RCS360 ),
PNCMD( InSelect, PN531|PN532|PN533 ),
PNCMD( InAutoPoll, PN532 ),
PNCMD( InActivateDeactivatePaypass, PN533 ),

View file

@ -2199,7 +2199,7 @@ pn53x_TgInitAsTarget (nfc_device_t * pnd, pn53x_target_mode_t ptm,
memcpy(abtCmd+26, pbtNFCID3t, 10);
}
// General Bytes (ISO/IEC 18092)
if (CHIP_DATA(pnd)->type == PN531) {
if ((CHIP_DATA(pnd)->type == PN531) || (CHIP_DATA(pnd)->type == RCS360)) {
if (szGBt) {
memcpy (abtCmd+36, pbtGBt, szGBt);
szOptionalBytes = szGBt;
@ -2212,7 +2212,7 @@ pn53x_TgInitAsTarget (nfc_device_t * pnd, pn53x_target_mode_t ptm,
szOptionalBytes = szGBt + 1;
}
// 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);
if (szTkt) {
memcpy (abtCmd+37+szOptionalBytes, pbtTkt, szTkt);