diff --git a/libnfc/drivers.h b/libnfc/drivers.h index df010dc..568e119 100644 --- a/libnfc/drivers.h +++ b/libnfc/drivers.h @@ -46,6 +46,6 @@ # define DRIVERS_MAX_DEVICES 16 -extern const struct nfc_driver_t *nfc_drivers[]; +extern const struct nfc_driver *nfc_drivers[]; #endif // __NFC_DRIVERS_H__ diff --git a/libnfc/drivers/acr122.c b/libnfc/drivers/acr122.c index 69fdf42..cc70465 100644 --- a/libnfc/drivers/acr122.c +++ b/libnfc/drivers/acr122.c @@ -463,7 +463,7 @@ const struct pn53x_io acr122_io = { .receive = acr122_receive, }; -const struct nfc_driver_t acr122_driver = { +const struct nfc_driver acr122_driver = { .name = ACR122_DRIVER_NAME, .probe = acr122_probe, .connect = acr122_connect, diff --git a/libnfc/drivers/acr122.h b/libnfc/drivers/acr122.h index 9ea315e..fb8e2b0 100644 --- a/libnfc/drivers/acr122.h +++ b/libnfc/drivers/acr122.h @@ -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); 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__ diff --git a/libnfc/drivers/arygon.c b/libnfc/drivers/arygon.c index 9ea6180..ad563c9 100644 --- a/libnfc/drivers/arygon.c +++ b/libnfc/drivers/arygon.c @@ -557,7 +557,7 @@ const struct pn53x_io arygon_tama_io = { .receive = arygon_tama_receive, }; -const struct nfc_driver_t arygon_driver = { +const struct nfc_driver arygon_driver = { .name = ARYGON_DRIVER_NAME, .probe = arygon_probe, .connect = arygon_connect, diff --git a/libnfc/drivers/arygon.h b/libnfc/drivers/arygon.h index de1bdb3..9873366 100644 --- a/libnfc/drivers/arygon.h +++ b/libnfc/drivers/arygon.h @@ -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_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__ diff --git a/libnfc/drivers/pn532_uart.c b/libnfc/drivers/pn532_uart.c index f36ff31..ec7e95a 100644 --- a/libnfc/drivers/pn532_uart.c +++ b/libnfc/drivers/pn532_uart.c @@ -500,7 +500,7 @@ const struct pn53x_io pn532_uart_io = { .receive = pn532_uart_receive, }; -const struct nfc_driver_t pn532_uart_driver = { +const struct nfc_driver pn532_uart_driver = { .name = PN532_UART_DRIVER_NAME, .probe = pn532_uart_probe, .connect = pn532_uart_connect, diff --git a/libnfc/drivers/pn532_uart.h b/libnfc/drivers/pn532_uart.h index dbf60b1..9f9f7c7 100644 --- a/libnfc/drivers/pn532_uart.h +++ b/libnfc/drivers/pn532_uart.h @@ -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_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__ diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index 8611486..1873819 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -790,7 +790,7 @@ const struct pn53x_io pn53x_usb_io = { .receive = pn53x_usb_receive, }; -const struct nfc_driver_t pn53x_usb_driver = { +const struct nfc_driver pn53x_usb_driver = { .name = PN53X_USB_DRIVER_NAME, .probe = pn53x_usb_probe, .connect = pn53x_usb_connect, diff --git a/libnfc/drivers/pn53x_usb.h b/libnfc/drivers/pn53x_usb.h index 5618038..3f617a7 100644 --- a/libnfc/drivers/pn53x_usb.h +++ b/libnfc/drivers/pn53x_usb.h @@ -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); 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__ diff --git a/libnfc/nfc-internal.h b/libnfc/nfc-internal.h index 9f0693d..04add92 100644 --- a/libnfc/nfc-internal.h +++ b/libnfc/nfc-internal.h @@ -125,7 +125,7 @@ #endif -struct nfc_driver_t { +struct nfc_driver { const char *name; bool (*probe)(nfc_connstring connstrings[], size_t connstrings_len, size_t * pszDeviceFound); struct nfc_device *(*connect) (const nfc_connstring connstring); @@ -163,7 +163,7 @@ struct nfc_driver_t { * @brief NFC device information */ struct nfc_device { - const struct nfc_driver_t *driver; + const struct nfc_driver *driver; void *driver_data; void *chip_data; diff --git a/libnfc/nfc.c b/libnfc/nfc.c index c05ac39..2809577 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -45,7 +45,7 @@ #define LOG_CATEGORY "libnfc.general" -const struct nfc_driver_t *nfc_drivers[] = { +const struct nfc_driver *nfc_drivers[] = { # if defined (DRIVER_PN53X_USB_ENABLED) &pn53x_usb_driver, # endif /* DRIVER_PN53X_USB_ENABLED */ @@ -127,8 +127,8 @@ nfc_connect (const nfc_connstring connstring) } // Search through the device list for an available device - const struct nfc_driver_t *ndr; - const struct nfc_driver_t **pndr = nfc_drivers; + const struct nfc_driver *ndr; + const struct nfc_driver **pndr = nfc_drivers; while ((ndr = *pndr)) { // Specific device is requested: using device description 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 szDeviceFound = 0; - const struct nfc_driver_t *ndr; - const struct nfc_driver_t **pndr = nfc_drivers; + const struct nfc_driver *ndr; + const struct nfc_driver **pndr = nfc_drivers; log_init (); while ((ndr = *pndr)) {