pn53x_usb: add comments on LED switching

This commit is contained in:
Philippe Teuwen 2011-04-08 19:11:42 +00:00
parent 174c916961
commit ed715056e2

View file

@ -586,7 +586,9 @@ pn53x_usb_configure (nfc_device_t * pnd, const nfc_device_option_t ndo, const bo
switch (DRIVER_DATA (pnd)->model) { switch (DRIVER_DATA (pnd)->model) {
case ASK_LOGO: case ASK_LOGO:
if (NDO_ACTIVATE_FIELD == ndo) { if (NDO_ACTIVATE_FIELD == ndo) {
// Switch on/off progressive field according to ACTIVATE_FIELD option // Switch on/off progressive field
// and switch on/off LED2
// according to ACTIVATE_FIELD option
DBG ("Switch progressive field %s", bEnable ? "On" : "Off"); DBG ("Switch progressive field %s", bEnable ? "On" : "Off");
if (!pn53x_write_register (pnd, SFR_P3, _BV(P31) | _BV (P34), bEnable ? _BV (P34) : _BV (P31))) if (!pn53x_write_register (pnd, SFR_P3, _BV(P31) | _BV (P34), bEnable ? _BV (P34) : _BV (P31)))
return false; return false;
@ -594,6 +596,7 @@ pn53x_usb_configure (nfc_device_t * pnd, const nfc_device_option_t ndo, const bo
break; break;
case SCM_SCL3711: case SCM_SCL3711:
if (NDO_ACTIVATE_FIELD == ndo) { if (NDO_ACTIVATE_FIELD == ndo) {
// Switch on/off LED according to ACTIVATE_FIELD option
if (!pn53x_write_register (pnd, SFR_P3, _BV (P32), bEnable ? 0 : _BV (P32))) if (!pn53x_write_register (pnd, SFR_P3, _BV (P32), bEnable ? 0 : _BV (P32)))
return false; return false;
} }