From 9c7c4307d4235ef3549ffb73b31635c239e369cc Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 8 Apr 2011 19:27:10 +0000 Subject: [PATCH] pn53x_usb: turn off LEDs on LoGO on exit --- libnfc/drivers/pn53x_usb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index 4d32867..05249ca 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -338,6 +338,12 @@ pn53x_usb_disconnect (nfc_device_t * pnd) pn53x_usb_ack (pnd); + if (DRIVER_DATA (pnd)->model == ASK_LOGO) { + /* Set P30, P31, P32, P33, P35 to logic 1 and P34 to 0 logic */ + /* ie. Switch all LEDs off and turn off progressive field */ + pn53x_write_register (pnd, SFR_P3, 0xFF, _BV (P30) | _BV (P31) | _BV (P32) | _BV (P33) | _BV (P35)); + } + if ((res = usb_release_interface (DRIVER_DATA (pnd)->pudh, 0)) < 0) { ERR ("usb_release_interface failed (%i)", res); }