Code cleanup.
This commit is contained in:
parent
30c2fc4c93
commit
67aa84ad76
5 changed files with 28 additions and 34 deletions
|
@ -118,9 +118,7 @@ dev_info* dev_pn533_connect(const nfc_device_desc_t* device_desc)
|
|||
uiDevIndex--;
|
||||
continue;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("Found PN533 device\n");
|
||||
#endif
|
||||
DBG("Found PN533 device.");
|
||||
|
||||
// Open the PN533 USB device
|
||||
dsp.pudh = usb_open(dev);
|
||||
|
@ -128,18 +126,14 @@ dev_info* dev_pn533_connect(const nfc_device_desc_t* device_desc)
|
|||
get_end_points(dev,&dsp);
|
||||
if(usb_set_configuration(dsp.pudh,1) < 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Setting config failed\n");
|
||||
#endif
|
||||
DBG("Setting config failed");
|
||||
usb_close(dsp.pudh);
|
||||
return INVALID_DEVICE_INFO;
|
||||
}
|
||||
|
||||
if(usb_claim_interface(dsp.pudh,0) < 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Can't claim interface\n");
|
||||
#endif
|
||||
DBG("Can't claim interface");
|
||||
usb_close(dsp.pudh);
|
||||
return INVALID_DEVICE_INFO;
|
||||
}
|
||||
|
@ -195,7 +189,7 @@ bool dev_pn533_transceive(const dev_spec ds, const byte_t* pbtTx, const uint32_t
|
|||
buffer[uiTxLen+6] = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Tx: ");
|
||||
printf(" TX: ");
|
||||
print_hex((byte_t*)buffer,uiTxLen+7);
|
||||
#endif
|
||||
|
||||
|
@ -218,7 +212,7 @@ bool dev_pn533_transceive(const dev_spec ds, const byte_t* pbtTx, const uint32_t
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Rx: ");
|
||||
printf(" RX: ");
|
||||
print_hex((byte_t*)buf,ret);
|
||||
#endif
|
||||
|
||||
|
@ -234,7 +228,7 @@ bool dev_pn533_transceive(const dev_spec ds, const byte_t* pbtTx, const uint32_t
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Rx: ");
|
||||
printf(" RX: ");
|
||||
print_hex((byte_t*)buf,ret);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||
#include "dev_arygon.h"
|
||||
|
||||
const static struct dev_callbacks dev_callbacks_list[] = {
|
||||
// Driver Name Connect Transceive Disconect
|
||||
// Driver Name Connect Transceive Disconnect
|
||||
#ifdef HAVE_PCSC_LITE
|
||||
{ "ACR122", dev_acr122_connect, dev_acr122_transceive, dev_acr122_disconnect },
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue