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,10 +229,10 @@ void pn53x_usb_disconnect(nfc_device_t* pnd)
|
||||||
usb_spec_t* pus = (usb_spec_t*)pnd->nds;
|
usb_spec_t* pus = (usb_spec_t*)pnd->nds;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DBG("%s","resetting USB");
|
|
||||||
usb_reset(pus->pudh);
|
|
||||||
if((ret = usb_release_interface(pus->pudh,0)) < 0)
|
if((ret = usb_release_interface(pus->pudh,0)) < 0)
|
||||||
DBG("usb_release failed %i",ret);
|
DBG("usb_release failed %i",ret);
|
||||||
|
DBG("%s","resetting USB");
|
||||||
|
usb_reset(pus->pudh);
|
||||||
if((ret = usb_close(pus->pudh)) < 0)
|
if((ret = usb_close(pus->pudh)) < 0)
|
||||||
DBG("usb_close failed %i",ret);
|
DBG("usb_close failed %i",ret);
|
||||||
free(pnd->nds);
|
free(pnd->nds);
|
||||||
|
|
Loading…
Reference in a new issue