Skip to content

Commit

Permalink
Merge pull request #323 from bhack/SCL3712
Browse files Browse the repository at this point in the history
Add SCM_SCL3712 support
  • Loading branch information
neomilium committed Nov 4, 2015
2 parents 2046fb9 + 1d47206 commit 73c2ef8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/udev/93-pn53x.rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0193", MODE="0664", GROUP="plugdev"
# PN533
ATTRS{idVendor}=="04cc", ATTRS{idProduct}=="2533", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5591", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="04e6", ATTRS{idProduct}=="5594", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="1fd3", ATTRS{idProduct}=="0608", MODE="0664", GROUP="plugdev"
ATTRS{idVendor}=="054c", ATTRS{idProduct}=="02e1", MODE="0664", GROUP="plugdev"

Expand Down
10 changes: 10 additions & 0 deletions libnfc/drivers/pn53x_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ typedef enum {
NXP_PN533,
ASK_LOGO,
SCM_SCL3711,
SCM_SCL3712,
SONY_RCS360
} pn53x_usb_model;

Expand Down Expand Up @@ -129,6 +130,7 @@ const struct pn53x_usb_supported_device pn53x_usb_supported_devices[] = {
{ 0x04CC, 0x0531, NXP_PN531, "Philips / PN531" },
{ 0x04CC, 0x2533, NXP_PN533, "NXP / PN533" },
{ 0x04E6, 0x5591, SCM_SCL3711, "SCM Micro / SCL3711-NFC&RW" },
{ 0x04E6, 0x5594, SCM_SCL3712, "SCM Micro / SCL3712-NFC&RW" },
{ 0x054c, 0x0193, SONY_PN531, "Sony / PN531" },
{ 0x1FD3, 0x0608, ASK_LOGO, "ASK / LoGO" },
{ 0x054C, 0x02E1, SONY_RCS360, "Sony / FeliCa S360 [PaSoRi]" }
Expand Down Expand Up @@ -354,6 +356,7 @@ pn53x_usb_open(const nfc_context *context, const nfc_connstring connstring)
CHIP_DATA(pnd)->timer_correction = 50;
break;
case SCM_SCL3711:
case SCM_SCL3712:
case NXP_PN533:
CHIP_DATA(pnd)->timer_correction = 46;
break;
Expand Down Expand Up @@ -693,6 +696,13 @@ pn53x_usb_set_property_bool(nfc_device *pnd, const nfc_property property, const
return res;
}
break;
case SCM_SCL3712:
if (NP_ACTIVATE_FIELD == property) {
// Switch on/off LED according to ACTIVATE_FIELD option
if ((res = pn53x_write_register(pnd, PN53X_SFR_P3, _BV(P32), bEnable ? 0 : _BV(P32))) < 0)
return res;
}
break;
case NXP_PN531:
case NXP_PN533:
case SONY_PN531:
Expand Down

0 comments on commit 73c2ef8

Please sign in to comment.