Remove whitespace after star symbol for pointers

This commit is contained in:
Audrey Diacre
2011-11-25 15:21:10 +00:00
parent 5a9a778879
commit 52bc5853d8
31 changed files with 199 additions and 199 deletions
+4 -4
View File
@@ -133,7 +133,7 @@ acr122_free_scardcontext (void)
* @return true if succeeded, false otherwise.
*/
bool
acr122_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound)
acr122_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound)
{
size_t szPos = 0;
char acDeviceNames[256 + 64 * PCSC_MAX_DEVICES];
@@ -300,7 +300,7 @@ error:
}
void
acr122_disconnect (nfc_device * pnd)
acr122_disconnect (nfc_device *pnd)
{
SCardDisconnect (DRIVER_DATA (pnd)->hCard, SCARD_LEAVE_CARD);
acr122_free_scardcontext ();
@@ -310,7 +310,7 @@ acr122_disconnect (nfc_device * pnd)
}
bool
acr122_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout)
acr122_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
// FIXME: timeout is not handled
(void) timeout;
@@ -381,7 +381,7 @@ acr122_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int
}
int
acr122_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szData, int timeout)
acr122_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szData, int timeout)
{
// FIXME: timeout is not handled
(void) timeout;
+4 -4
View File
@@ -26,13 +26,13 @@
# include <nfc/nfc-types.h>
bool acr122_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
bool acr122_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound);
// Functions used by developer to handle connection to this device
nfc_device *acr122_connect (const nfc_connstring connstring);
bool acr122_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout);
int acr122_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szData, int timeout);
void acr122_disconnect (nfc_device * pnd);
bool acr122_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
int acr122_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szData, int timeout);
void acr122_disconnect (nfc_device *pnd);
extern const struct nfc_driver_t acr122_driver;
+12 -12
View File
@@ -88,11 +88,11 @@ static const uint8_t arygon_error_none[] = "FF000000\x0d\x0a";
static const uint8_t arygon_error_incomplete_command[] = "FF0C0000\x0d\x0a";
static const uint8_t arygon_error_unknown_mode[] = "FF060000\x0d\x0a";
bool arygon_reset_tama (nfc_device * pnd);
void arygon_firmware (nfc_device * pnd, char * str);
bool arygon_reset_tama (nfc_device *pnd);
void arygon_firmware (nfc_device *pnd, char *str);
bool
arygon_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound)
arygon_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound)
{
/** @note: Due to UART bus we can't know if its really an ARYGON without
* sending some commands. But using this way to probe devices, we can
@@ -197,7 +197,7 @@ arygon_connstring_decode (const nfc_connstring connstring, struct arygon_descrip
strncpy (desc->port, port, sizeof(desc->port)-1);
desc->port[sizeof(desc->port)-1] = '\0';
const char* speed_s = strtok (NULL, ":");
const char *speed_s = strtok (NULL, ":");
if (!speed_s) {
// speed not specified (or parsing error)
free (cs);
@@ -286,7 +286,7 @@ arygon_connect (const nfc_connstring connstring)
}
void
arygon_disconnect (nfc_device * pnd)
arygon_disconnect (nfc_device *pnd)
{
// Release UART port
uart_close (DRIVER_DATA (pnd)->port);
@@ -304,7 +304,7 @@ arygon_disconnect (nfc_device * pnd)
#define ARYGON_TX_BUFFER_LEN (PN53x_NORMAL_FRAME__DATA_MAX_LEN + PN53x_NORMAL_FRAME__OVERHEAD + 1)
#define ARYGON_RX_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
bool
arygon_tama_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout)
arygon_tama_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
// Before sending anything, we need to discard from any junk bytes
uart_flush_input (DRIVER_DATA(pnd)->port);
@@ -366,11 +366,11 @@ arygon_abort (nfc_device *pnd)
}
int
arygon_tama_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDataLen, int timeout)
arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t abtRxBuf[5];
size_t len;
void * abort_p = NULL;
void *abort_p = NULL;
#ifndef WIN32
abort_p = &(DRIVER_DATA (pnd)->iAbortFds[1]);
@@ -484,7 +484,7 @@ arygon_tama_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDataLen
}
void
arygon_firmware (nfc_device * pnd, char * str)
arygon_firmware (nfc_device *pnd, char *str)
{
const uint8_t arygon_firmware_version_cmd[] = { DEV_ARYGON_PROTOCOL_ARYGON_ASCII, 'a', 'v' };
uint8_t abtRx[16];
@@ -503,7 +503,7 @@ arygon_firmware (nfc_device * pnd, char * str)
}
if ( 0 == memcmp (abtRx, arygon_error_none, 6)) {
uint8_t * p = abtRx + 6;
uint8_t *p = abtRx + 6;
unsigned int szData;
sscanf ((const char*)p, "%02x%s", &szData, p);
memcpy (str, p, szData);
@@ -512,7 +512,7 @@ arygon_firmware (nfc_device * pnd, char * str)
}
bool
arygon_reset_tama (nfc_device * pnd)
arygon_reset_tama (nfc_device *pnd)
{
const uint8_t arygon_reset_tama_cmd[] = { DEV_ARYGON_PROTOCOL_ARYGON_ASCII, 'a', 'r' };
uint8_t abtRx[10]; // Attempted response is 10 bytes long
@@ -537,7 +537,7 @@ arygon_reset_tama (nfc_device * pnd)
}
bool
arygon_abort_command (nfc_device * pnd)
arygon_abort_command (nfc_device *pnd)
{
if (pnd) {
#ifndef WIN32
+4 -4
View File
@@ -30,13 +30,13 @@
# include <nfc/nfc-types.h>
bool arygon_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
bool arygon_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound);
nfc_device *arygon_connect (const nfc_connstring connstring);
void arygon_disconnect (nfc_device * pnd);
void arygon_disconnect (nfc_device *pnd);
bool arygon_tama_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout);
int arygon_tama_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDat, int timeouta);
bool arygon_tama_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
int arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDat, int timeouta);
extern const struct nfc_driver_t arygon_driver;
+11 -11
View File
@@ -48,8 +48,8 @@
#define PN532_UART_DRIVER_NAME "pn532_uart"
#define LOG_CATEGORY "libnfc.driver.pn532_uart"
int pn532_uart_ack (nfc_device * pnd);
int pn532_uart_wakeup (nfc_device * pnd);
int pn532_uart_ack (nfc_device *pnd);
int pn532_uart_wakeup (nfc_device *pnd);
const struct pn53x_io pn532_uart_io;
@@ -65,7 +65,7 @@ struct pn532_uart_data {
#define DRIVER_DATA(pnd) ((struct pn532_uart_data*)(pnd->driver_data))
bool
pn532_uart_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound)
pn532_uart_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound)
{
/** @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
@@ -178,7 +178,7 @@ pn532_connstring_decode (const nfc_connstring connstring, struct pn532_uart_desc
strncpy (desc->port, port, sizeof(desc->port)-1);
desc->port[sizeof(desc->port)-1] = '\0';
const char* speed_s = strtok (NULL, ":");
const char *speed_s = strtok (NULL, ":");
if (!speed_s) {
// speed not specified (or parsing error)
free (cs);
@@ -262,7 +262,7 @@ pn532_uart_connect (const nfc_connstring connstring)
}
void
pn532_uart_disconnect (nfc_device * pnd)
pn532_uart_disconnect (nfc_device *pnd)
{
// Release UART port
uart_close (DRIVER_DATA(pnd)->port);
@@ -278,7 +278,7 @@ pn532_uart_disconnect (nfc_device * pnd)
}
int
pn532_uart_wakeup (nfc_device * pnd)
pn532_uart_wakeup (nfc_device *pnd)
{
/* High Speed Unit (HSU) wake up consist to send 0x55 and wait a "long" delay for PN532 being wakeup. */
const uint8_t pn532_wakeup_preamble[] = { 0x55, 0x55, 0x00, 0x00, 0x00 };
@@ -289,7 +289,7 @@ pn532_uart_wakeup (nfc_device * pnd)
#define PN532_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
bool
pn532_uart_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout)
pn532_uart_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
// Before sending anything, we need to discard from any junk bytes
uart_flush_input (DRIVER_DATA(pnd)->port);
@@ -349,11 +349,11 @@ pn532_uart_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData,
}
int
pn532_uart_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDataLen, int timeout)
pn532_uart_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
uint8_t abtRxBuf[5];
size_t len;
void * abort_p = NULL;
void *abort_p = NULL;
#ifndef WIN32
abort_p = &(DRIVER_DATA (pnd)->iAbortFds[1]);
@@ -473,7 +473,7 @@ pn532_uart_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDataLen,
}
int
pn532_uart_ack (nfc_device * pnd)
pn532_uart_ack (nfc_device *pnd)
{
if (POWERDOWN == CHIP_DATA(pnd)->power_mode) {
if (-1 == pn532_uart_wakeup(pnd)) {
@@ -484,7 +484,7 @@ pn532_uart_ack (nfc_device * pnd)
}
bool
pn532_uart_abort_command (nfc_device * pnd)
pn532_uart_abort_command (nfc_device *pnd)
{
if (pnd) {
#ifndef WIN32
+4 -4
View File
@@ -29,12 +29,12 @@
# include <nfc/nfc-types.h>
bool pn532_uart_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
bool pn532_uart_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound);
nfc_device *pn532_uart_connect (const nfc_connstring connstring);
void pn532_uart_disconnect (nfc_device * pnd);
bool pn532_uart_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout);
int pn532_uart_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szData, int timeout);
void pn532_uart_disconnect (nfc_device *pnd);
bool pn532_uart_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
int pn532_uart_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szData, int timeout);
extern const struct nfc_driver_t pn532_uart_driver;
+8 -8
View File
@@ -190,7 +190,7 @@ pn53x_usb_get_device_model (uint16_t vendor_id, uint16_t product_id)
return UNKNOWN;
}
int pn53x_usb_ack (nfc_device * pnd);
int pn53x_usb_ack (nfc_device *pnd);
// Find transfer endpoints for bulk transfers
void
@@ -223,7 +223,7 @@ pn53x_usb_get_end_points (struct usb_device *dev, struct pn53x_usb_data *data)
}
bool
pn53x_usb_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound)
pn53x_usb_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound)
{
usb_init ();
@@ -492,7 +492,7 @@ error:
}
void
pn53x_usb_disconnect (nfc_device * pnd)
pn53x_usb_disconnect (nfc_device *pnd)
{
pn53x_usb_ack (pnd);
@@ -519,7 +519,7 @@ pn53x_usb_disconnect (nfc_device * pnd)
#define PN53X_USB_BUFFER_LEN (PN53x_EXTENDED_FRAME__DATA_MAX_LEN + PN53x_EXTENDED_FRAME__OVERHEAD)
bool
pn53x_usb_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout)
pn53x_usb_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout)
{
uint8_t abtFrame[PN53X_USB_BUFFER_LEN] = { 0x00, 0x00, 0xff }; // Every packet must start with "00 00 ff"
size_t szFrame = 0;
@@ -565,7 +565,7 @@ pn53x_usb_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData,
}
int
pn53x_usb_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szDataLen, int timeout)
pn53x_usb_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDataLen, int timeout)
{
size_t len;
off_t offset = 0;
@@ -716,7 +716,7 @@ read:
}
int
pn53x_usb_ack (nfc_device * pnd)
pn53x_usb_ack (nfc_device *pnd)
{
return pn53x_usb_bulk_write (DRIVER_DATA (pnd), (uint8_t *) pn53x_ack_frame, sizeof (pn53x_ack_frame), 0);
}
@@ -779,7 +779,7 @@ On ASK LoGO hardware:
}
bool
pn53x_usb_configure (nfc_device * pnd, const nfc_device_option ndo, const bool bEnable)
pn53x_usb_configure (nfc_device *pnd, const nfc_device_option ndo, const bool bEnable)
{
if (!pn53x_configure (pnd, ndo, bEnable))
return false;
@@ -807,7 +807,7 @@ pn53x_usb_configure (nfc_device * pnd, const nfc_device_option ndo, const bool b
}
bool
pn53x_usb_abort_command (nfc_device * pnd)
pn53x_usb_abort_command (nfc_device *pnd)
{
DRIVER_DATA (pnd)->abort_flag = true;
return true;
+4 -4
View File
@@ -29,11 +29,11 @@
# include <nfc/nfc-types.h>
bool pn53x_usb_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
bool pn53x_usb_probe (nfc_connstring connstrings[], size_t connstrings_len, size_t *pszDeviceFound);
nfc_device *pn53x_usb_connect (const nfc_connstring connstring);
bool pn53x_usb_send (nfc_device * pnd, const uint8_t * pbtData, const size_t szData, int timeout);
int pn53x_usb_receive (nfc_device * pnd, uint8_t * pbtData, const size_t szData, int timeout);
void pn53x_usb_disconnect (nfc_device * pnd);
bool pn53x_usb_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout);
int pn53x_usb_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szData, int timeout);
void pn53x_usb_disconnect (nfc_device *pnd);
extern const struct nfc_driver_t pn53x_usb_driver;