add SCM SCL3711 led support: the led is now On/Off accordingly to field activation.
This commit is contained in:
parent
bd7c9a2b85
commit
0daa5822f5
1 changed files with 17 additions and 7 deletions
|
@ -583,13 +583,23 @@ pn53x_usb_configure (nfc_device_t * pnd, const nfc_device_option_t ndo, const bo
|
||||||
if (!pn53x_configure (pnd, ndo, bEnable))
|
if (!pn53x_configure (pnd, ndo, bEnable))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ASK_LOGO == DRIVER_DATA (pnd)->model) {
|
switch (DRIVER_DATA (pnd)->model) {
|
||||||
if (NDO_ACTIVATE_FIELD == ndo) {
|
case ASK_LOGO:
|
||||||
// Switch on/off progressive field according to ACTIVATE_FIELD option
|
if (NDO_ACTIVATE_FIELD == ndo) {
|
||||||
DBG ("Switch progressive field %s", bEnable ? "On" : "Off");
|
// Switch on/off progressive field according to ACTIVATE_FIELD option
|
||||||
if (!pn53x_write_register (pnd, SFR_P3, _BV(P31) | _BV (P34), bEnable ? _BV (P34) : _BV (P31)))
|
DBG ("Switch progressive field %s", bEnable ? "On" : "Off");
|
||||||
return false;
|
if (!pn53x_write_register (pnd, SFR_P3, _BV(P31) | _BV (P34), bEnable ? _BV (P34) : _BV (P31)))
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SCM_SCL3711:
|
||||||
|
if (NDO_ACTIVATE_FIELD == ndo) {
|
||||||
|
if (!pn53x_write_register (pnd, SFR_P3, _BV (P32), bEnable ? 0 : _BV (P32)))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue