Minor indentation fixes.
This commit is contained in:
parent
362dfb51db
commit
0ea9467b56
3 changed files with 22 additions and 22 deletions
|
@ -86,9 +86,9 @@ extern "C" {
|
|||
NFC_EXPORT bool nfc_initiator_transceive_bytes (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen,
|
||||
byte_t * pbtRx, size_t * pszRxLen);
|
||||
NFC_EXPORT bool nfc_initiator_transceive_bits (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxBits,
|
||||
const byte_t * pbtTxPar, byte_t * pbtRx, size_t * pszRxBits,
|
||||
byte_t * pbtRxPar);
|
||||
|
||||
const byte_t * pbtTxPar, byte_t * pbtRx, size_t * pszRxBits,
|
||||
byte_t * pbtRxPar);
|
||||
|
||||
/* NFC target: act as tag (i.e. MIFARE Classic) or NFC target device. */
|
||||
NFC_EXPORT bool nfc_target_init (nfc_device_t * pnd, byte_t * pbtRx, size_t * pszRxBits);
|
||||
NFC_EXPORT bool nfc_target_send_bytes (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen);
|
||||
|
@ -96,7 +96,7 @@ extern "C" {
|
|||
NFC_EXPORT bool nfc_target_send_bits (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxBits,
|
||||
const byte_t * pbtTxPar);
|
||||
NFC_EXPORT bool nfc_target_receive_bits (nfc_device_t * pnd, byte_t * pbtRx, size_t * pszRxBits, byte_t * pbtRxPar);
|
||||
|
||||
|
||||
/* Error reporting */
|
||||
NFC_EXPORT const char *nfc_strerror (const nfc_device_t * pnd);
|
||||
NFC_EXPORT int nfc_strerror_r (const nfc_device_t * pnd, char *pcStrErrBuf, size_t szBufLen);
|
||||
|
|
|
@ -68,27 +68,27 @@ static const struct driver_callbacks drivers_callbacks_list[] = {
|
|||
{ACR122_DRIVER_NAME, &pn53x_callbacks_list, acr122_pick_device, acr122_list_devices, acr122_connect,
|
||||
acr122_transceive, acr122_disconnect},
|
||||
# endif
|
||||
/* DRIVER_ACR122_ENABLED */
|
||||
/* DRIVER_ACR122_ENABLED */
|
||||
# if defined (DRIVER_PN531_USB_ENABLED)
|
||||
{PN531_USB_DRIVER_NAME, &pn53x_callbacks_list, pn531_usb_pick_device, pn531_usb_list_devices, pn531_usb_connect,
|
||||
pn53x_usb_transceive, pn53x_usb_disconnect},
|
||||
# endif
|
||||
/* DRIVER_PN531_USB_ENABLED */
|
||||
/* DRIVER_PN531_USB_ENABLED */
|
||||
# if defined (DRIVER_PN533_USB_ENABLED)
|
||||
{PN533_USB_DRIVER_NAME, &pn53x_callbacks_list, pn533_usb_pick_device, pn533_usb_list_devices, pn533_usb_connect,
|
||||
pn53x_usb_transceive, pn53x_usb_disconnect},
|
||||
# endif
|
||||
/* DRIVER_PN533_USB_ENABLED */
|
||||
/* DRIVER_PN533_USB_ENABLED */
|
||||
# if defined (DRIVER_ARYGON_ENABLED)
|
||||
{ARYGON_DRIVER_NAME, &pn53x_callbacks_list, arygon_pick_device, arygon_list_devices, arygon_connect,
|
||||
arygon_transceive, arygon_disconnect},
|
||||
# endif
|
||||
/* DRIVER_ARYGON_ENABLED */
|
||||
/* DRIVER_ARYGON_ENABLED */
|
||||
# if defined (DRIVER_PN532_UART_ENABLED)
|
||||
{PN532_UART_DRIVER_NAME, &pn53x_callbacks_list, pn532_uart_pick_device, pn532_uart_list_devices, pn532_uart_connect,
|
||||
pn532_uart_transceive, pn532_uart_disconnect},
|
||||
# endif
|
||||
/* DRIVER_PN532_UART_ENABLED */
|
||||
/* DRIVER_PN532_UART_ENABLED */
|
||||
};
|
||||
|
||||
# ifdef DEBUG
|
||||
|
|
26
libnfc/nfc.c
26
libnfc/nfc.c
|
@ -170,7 +170,7 @@ nfc_pick_device (void)
|
|||
{
|
||||
uint32_t uiDriver;
|
||||
nfc_device_desc_t *nddRes;
|
||||
|
||||
|
||||
for (uiDriver = 0; uiDriver < sizeof (drivers_callbacks_list) / sizeof (drivers_callbacks_list[0]); uiDriver++) {
|
||||
if (drivers_callbacks_list[uiDriver].pick_device != NULL) {
|
||||
nddRes = drivers_callbacks_list[uiDriver].pick_device ();
|
||||
|
@ -178,7 +178,7 @@ nfc_pick_device (void)
|
|||
return nddRes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -193,16 +193,16 @@ nfc_list_devices (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * ps
|
|||
{
|
||||
uint32_t uiDriver;
|
||||
size_t szN;
|
||||
|
||||
|
||||
*pszDeviceFound = 0;
|
||||
|
||||
|
||||
for (uiDriver = 0; uiDriver < sizeof (drivers_callbacks_list) / sizeof (drivers_callbacks_list[0]); uiDriver++) {
|
||||
if (drivers_callbacks_list[uiDriver].list_devices != NULL) {
|
||||
szN = 0;
|
||||
if (drivers_callbacks_list[uiDriver].
|
||||
list_devices (pnddDevices + (*pszDeviceFound), szDevices - (*pszDeviceFound), &szN)) {
|
||||
if (drivers_callbacks_list[uiDriver].list_devices
|
||||
(pnddDevices + (*pszDeviceFound), szDevices - (*pszDeviceFound), &szN)) {
|
||||
*pszDeviceFound += szN;
|
||||
DBG ("%ld device(s) found using %s driver", (unsigned long) szN, drivers_callbacks_list[uiDriver].acDriver);
|
||||
DBG ("%ld device(s) found using %s driver", (unsigned long) szN, drivers_callbacks_list[uiDriver].acDriver);
|
||||
}
|
||||
} else {
|
||||
DBG ("No listing function avaible for %s driver", drivers_callbacks_list[uiDriver].acDriver);
|
||||
|
@ -457,7 +457,7 @@ nfc_initiator_select_dep_target (nfc_device_t * pnd, const nfc_modulation_t nmIn
|
|||
const byte_t * pbtGbData, const size_t szGbDataLen, nfc_target_info_t * pnti)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return pn53x_initiator_select_dep_target (pnd, nmInitModulation, pbtPidData, szPidDataLen, pbtNFCID3i,
|
||||
szNFCID3iDataLen, pbtGbData, szGbDataLen, pnti);
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ bool
|
|||
nfc_initiator_deselect_target (nfc_device_t * pnd)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return (pn53x_InDeselect (pnd, 0)); // 0 mean deselect all selected targets
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ nfc_initiator_transceive_bytes (nfc_device_t * pnd, const byte_t * pbtTx, const
|
|||
size_t * pszRxLen)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return pn53x_initiator_transceive_bytes (pnd, pbtTx, szTxLen, pbtRx, pszRxLen);
|
||||
}
|
||||
|
||||
|
@ -550,7 +550,7 @@ bool
|
|||
nfc_target_send_bytes (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxLen)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return pn53x_target_send_bytes (pnd, pbtTx, szTxLen);
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ bool
|
|||
nfc_target_receive_bytes (nfc_device_t * pnd, byte_t * pbtRx, size_t * pszRxLen)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return pn53x_target_receive_bytes (pnd, pbtRx, pszRxLen);
|
||||
}
|
||||
|
||||
|
@ -578,7 +578,7 @@ bool
|
|||
nfc_target_send_bits (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTxBits, const byte_t * pbtTxPar)
|
||||
{
|
||||
pnd->iLastError = 0;
|
||||
|
||||
|
||||
return pn53x_target_send_bits (pnd, pbtTx, szTxBits, pbtTxPar);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue