usb_release() must be called before usb_reset(). Fix Issue 81 (Thanks to thaolx).
This commit is contained in:
parent
9941191cfc
commit
404dfba6e8
1 changed files with 3 additions and 3 deletions
|
@ -229,11 +229,11 @@ void pn53x_usb_disconnect(nfc_device_t* pnd)
|
|||
usb_spec_t* pus = (usb_spec_t*)pnd->nds;
|
||||
int ret;
|
||||
|
||||
if((ret = usb_release_interface(pus->pudh,0)) < 0)
|
||||
DBG("usb_release failed %i",ret);
|
||||
DBG("%s","resetting USB");
|
||||
usb_reset(pus->pudh);
|
||||
if((ret= usb_release_interface(pus->pudh,0)) < 0)
|
||||
DBG("usb_release failed %i",ret);
|
||||
if((ret= usb_close(pus->pudh)) < 0)
|
||||
if((ret = usb_close(pus->pudh)) < 0)
|
||||
DBG("usb_close failed %i",ret);
|
||||
free(pnd->nds);
|
||||
free(pnd);
|
||||
|
|
Loading…
Reference in a new issue