Move variable declarations at the beginning of function body to be able to compile using a stupid^W non C99 conform compiler under a non standard OS...
This commit is contained in:
parent
b67dbe668b
commit
d97d017853
2 changed files with 7 additions and 7 deletions
|
@ -87,20 +87,20 @@ pn532_uart_pick_device (void)
|
||||||
bool
|
bool
|
||||||
pn532_uart_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound)
|
pn532_uart_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, size_t *pszDeviceFound)
|
||||||
{
|
{
|
||||||
|
serial_port sp;
|
||||||
|
char acConnect[BUFFER_LENGTH];
|
||||||
|
int iDevice;
|
||||||
|
|
||||||
|
*pszDeviceFound = 0;
|
||||||
|
|
||||||
/* @note: Due to UART bus we can't know if its really a pn532 without
|
/* @note: Due to UART bus we can't know if its really a pn532 without
|
||||||
* sending some PN53x commands. But using this way to probe devices, we can
|
* sending some PN53x commands. But using this way to probe devices, we can
|
||||||
* have serious problem with other device on this bus */
|
* have serious problem with other device on this bus */
|
||||||
*pszDeviceFound = 0;
|
|
||||||
|
|
||||||
#ifndef SERIAL_AUTOPROBE_ENABLED
|
#ifndef SERIAL_AUTOPROBE_ENABLED
|
||||||
INFO("%s", "Sorry, serial auto-probing have been disabled at compile time.");
|
INFO("%s", "Sorry, serial auto-probing have been disabled at compile time.");
|
||||||
return false;
|
return false;
|
||||||
#else /* SERIAL_AUTOPROBE_ENABLED */
|
#else /* SERIAL_AUTOPROBE_ENABLED */
|
||||||
|
|
||||||
serial_port sp;
|
|
||||||
char acConnect[BUFFER_LENGTH];
|
|
||||||
int iDevice;
|
|
||||||
|
|
||||||
// I have no idea how MAC OS X deals with multiple devices, so a quick workaround
|
// I have no idea how MAC OS X deals with multiple devices, so a quick workaround
|
||||||
for (iDevice=0; iDevice<DRIVERS_MAX_DEVICES; iDevice++)
|
for (iDevice=0; iDevice<DRIVERS_MAX_DEVICES; iDevice++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,12 +159,12 @@ nfc_device_t* pn53x_usb_connect(const nfc_device_desc_t* pndd,const char * targe
|
||||||
usb_spec_t us;
|
usb_spec_t us;
|
||||||
struct usb_bus *bus;
|
struct usb_bus *bus;
|
||||||
struct usb_device *dev;
|
struct usb_device *dev;
|
||||||
|
uint32_t uiBusIndex;
|
||||||
|
|
||||||
us.uiEndPointIn = 0;
|
us.uiEndPointIn = 0;
|
||||||
us.uiEndPointOut = 0;
|
us.uiEndPointOut = 0;
|
||||||
us.pudh = NULL;
|
us.pudh = NULL;
|
||||||
|
|
||||||
uint32_t uiBusIndex;
|
|
||||||
|
|
||||||
// must specify device to connect to
|
// must specify device to connect to
|
||||||
if(pndd == NULL) return NULL;
|
if(pndd == NULL) return NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue