remove _t suffix from nfc_driver_t type.

This commit is contained in:
Audrey Diacre 2012-01-17 14:17:01 +00:00
parent ba58138aa9
commit 9d3ca39a44
11 changed files with 16 additions and 16 deletions

View file

@ -46,6 +46,6 @@
# define DRIVERS_MAX_DEVICES 16 # define DRIVERS_MAX_DEVICES 16
extern const struct nfc_driver_t *nfc_drivers[]; extern const struct nfc_driver *nfc_drivers[];
#endif // __NFC_DRIVERS_H__ #endif // __NFC_DRIVERS_H__

View file

@ -463,7 +463,7 @@ const struct pn53x_io acr122_io = {
.receive = acr122_receive, .receive = acr122_receive,
}; };
const struct nfc_driver_t acr122_driver = { const struct nfc_driver acr122_driver = {
.name = ACR122_DRIVER_NAME, .name = ACR122_DRIVER_NAME,
.probe = acr122_probe, .probe = acr122_probe,
.connect = acr122_connect, .connect = acr122_connect,

View file

@ -34,6 +34,6 @@ int acr122_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData
int acr122_receive (nfc_device *pnd, 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); void acr122_disconnect (nfc_device *pnd);
extern const struct nfc_driver_t acr122_driver; extern const struct nfc_driver acr122_driver;
#endif // ! __NFC_DRIVER_ACR122_H__ #endif // ! __NFC_DRIVER_ACR122_H__

View file

@ -557,7 +557,7 @@ const struct pn53x_io arygon_tama_io = {
.receive = arygon_tama_receive, .receive = arygon_tama_receive,
}; };
const struct nfc_driver_t arygon_driver = { const struct nfc_driver arygon_driver = {
.name = ARYGON_DRIVER_NAME, .name = ARYGON_DRIVER_NAME,
.probe = arygon_probe, .probe = arygon_probe,
.connect = arygon_connect, .connect = arygon_connect,

View file

@ -38,6 +38,6 @@ void arygon_disconnect (nfc_device *pnd);
int arygon_tama_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout); int 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); int arygon_tama_receive (nfc_device *pnd, uint8_t *pbtData, const size_t szDat, int timeouta);
extern const struct nfc_driver_t arygon_driver; extern const struct nfc_driver arygon_driver;
#endif // ! __NFC_DRIVER_ARYGON_H__ #endif // ! __NFC_DRIVER_ARYGON_H__

View file

@ -500,7 +500,7 @@ const struct pn53x_io pn532_uart_io = {
.receive = pn532_uart_receive, .receive = pn532_uart_receive,
}; };
const struct nfc_driver_t pn532_uart_driver = { const struct nfc_driver pn532_uart_driver = {
.name = PN532_UART_DRIVER_NAME, .name = PN532_UART_DRIVER_NAME,
.probe = pn532_uart_probe, .probe = pn532_uart_probe,
.connect = pn532_uart_connect, .connect = pn532_uart_connect,

View file

@ -36,6 +36,6 @@ void pn532_uart_disconnect (nfc_device *pnd);
int pn532_uart_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szData, int timeout); int 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); 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; extern const struct nfc_driver pn532_uart_driver;
#endif // ! __NFC_DRIVER_PN532_UART_H__ #endif // ! __NFC_DRIVER_PN532_UART_H__

View file

@ -790,7 +790,7 @@ const struct pn53x_io pn53x_usb_io = {
.receive = pn53x_usb_receive, .receive = pn53x_usb_receive,
}; };
const struct nfc_driver_t pn53x_usb_driver = { const struct nfc_driver pn53x_usb_driver = {
.name = PN53X_USB_DRIVER_NAME, .name = PN53X_USB_DRIVER_NAME,
.probe = pn53x_usb_probe, .probe = pn53x_usb_probe,
.connect = pn53x_usb_connect, .connect = pn53x_usb_connect,

View file

@ -35,6 +35,6 @@ int pn53x_usb_send (nfc_device *pnd, const uint8_t *pbtData, const size_t szD
int pn53x_usb_receive (nfc_device *pnd, 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); void pn53x_usb_disconnect (nfc_device *pnd);
extern const struct nfc_driver_t pn53x_usb_driver; extern const struct nfc_driver pn53x_usb_driver;
#endif // ! __NFC_DRIVER_PN53X_USB_H__ #endif // ! __NFC_DRIVER_PN53X_USB_H__

View file

@ -125,7 +125,7 @@
#endif #endif
struct nfc_driver_t { struct nfc_driver {
const char *name; const char *name;
bool (*probe)(nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound); bool (*probe)(nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound);
struct nfc_device *(*connect) (const nfc_connstring connstring); struct nfc_device *(*connect) (const nfc_connstring connstring);
@ -163,7 +163,7 @@ struct nfc_driver_t {
* @brief NFC device information * @brief NFC device information
*/ */
struct nfc_device { struct nfc_device {
const struct nfc_driver_t *driver; const struct nfc_driver *driver;
void *driver_data; void *driver_data;
void *chip_data; void *chip_data;

View file

@ -45,7 +45,7 @@
#define LOG_CATEGORY "libnfc.general" #define LOG_CATEGORY "libnfc.general"
const struct nfc_driver_t *nfc_drivers[] = { const struct nfc_driver *nfc_drivers[] = {
# if defined (DRIVER_PN53X_USB_ENABLED) # if defined (DRIVER_PN53X_USB_ENABLED)
&pn53x_usb_driver, &pn53x_usb_driver,
# endif /* DRIVER_PN53X_USB_ENABLED */ # endif /* DRIVER_PN53X_USB_ENABLED */
@ -127,8 +127,8 @@ nfc_connect (const nfc_connstring connstring)
} }
// Search through the device list for an available device // Search through the device list for an available device
const struct nfc_driver_t *ndr; const struct nfc_driver *ndr;
const struct nfc_driver_t **pndr = nfc_drivers; const struct nfc_driver **pndr = nfc_drivers;
while ((ndr = *pndr)) { while ((ndr = *pndr)) {
// Specific device is requested: using device description // Specific device is requested: using device description
if (0 != strncmp (ndr->name, ncs, strlen(ndr->name))) { if (0 != strncmp (ndr->name, ncs, strlen(ndr->name))) {
@ -186,8 +186,8 @@ nfc_list_devices (nfc_connstring connstrings[] , size_t szDevices)
{ {
size_t szN; size_t szN;
size_t szDeviceFound = 0; size_t szDeviceFound = 0;
const struct nfc_driver_t *ndr; const struct nfc_driver *ndr;
const struct nfc_driver_t **pndr = nfc_drivers; const struct nfc_driver **pndr = nfc_drivers;
log_init (); log_init ();
while ((ndr = *pndr)) { while ((ndr = *pndr)) {