mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-12 09:36:18 +00:00
Enforce ISO C conformance about empty files.
ISO C forbids empty source files. Instead of compiling possibly empty source files depending on the compiler parameters, only compile required files to build the library as requested at the ./configure stage. Windows users (and more precisely non-autotools users), you may have to update whatever you use to build the libnfc to fit your needs. The Makefile shipped in the windows directory compiles all drivers as it is written so you should not notice any difference, but if you don't use _that_ makefile, then you will have to do some adjustment. For now, keep the defines in CFLAGS just in case. Planned for removal in circa one week. While here, pet `./configure` output (--help format and summary).
This commit is contained in:
@@ -281,6 +281,12 @@ bool pn53x_usb_transceive(const nfc_device_spec_t nds, const byte_t* pbtTx, cons
|
||||
#ifdef DEBUG
|
||||
PRINT_HEX("RX", abtRx,ret);
|
||||
#endif
|
||||
|
||||
uint8_t ack_frame[] = { 0x00, 0x00, 0xff, 0x00, 0xff, 0x00 };
|
||||
if ((ret != 6) || (memcmp (abtRx, ack_frame, 6))) {
|
||||
DBG ("%s", "===> No ACK!!!!!!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if( ret == 6 )
|
||||
{
|
||||
@@ -296,6 +302,8 @@ bool pn53x_usb_transceive(const nfc_device_spec_t nds, const byte_t* pbtTx, cons
|
||||
#endif
|
||||
}
|
||||
|
||||
usb_bulk_write(pus->pudh, pus->uiEndPointOut, (char *)ack_frame, 6, USB_TIMEOUT);
|
||||
|
||||
// When the answer should be ignored, just return a succesful result
|
||||
if(pbtRx == NULL || pszRxLen == NULL) return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user