Skip to content

Commit

Permalink
pynfc: proper nfc_exit
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Jan 14, 2013
1 parent 9980e1d commit 88ec1f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rfidiot/pynfc.py
Expand Up @@ -355,9 +355,11 @@ def deconfigure(self):
self.log.debug("Deconfiguring NFC reader") self.log.debug("Deconfiguring NFC reader")
#self.powerOff() #self.powerOff()
self.libnfc.nfc_close(self.device) self.libnfc.nfc_close(self.device)
self.libnfc.nfc_exit(self.context)
if rfidiotglobals.Debug: if rfidiotglobals.Debug:
self.log.debug("Disconnected NFC reader") self.log.debug("Disconnected NFC reader")
self.device == None self.device = None
self.context = ctypes.POINTER(ctypes.c_int)()


def powerOn(self): def powerOn(self):
self.libnfc.nfc_device_set_property_bool(self.device, NP_ACTIVATE_FIELD, True) self.libnfc.nfc_device_set_property_bool(self.device, NP_ACTIVATE_FIELD, True)
Expand Down

0 comments on commit 88ec1f6

Please sign in to comment.