mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-26 19:56:39 +00:00
Add driver-dependent PowerDown
This commit is contained in:
@@ -516,6 +516,8 @@ const struct nfc_driver acr122_pcsc_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = NULL, // Abort is not supported in this driver
|
||||
.idle = NULL, // Idle is not supported in this driver
|
||||
.idle = pn53x_idle,
|
||||
/* Even if PN532, PowerDown is not recommended on those devices */
|
||||
.powerdown = NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -893,5 +893,7 @@ const struct nfc_driver acr122_usb_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = acr122_usb_abort_command,
|
||||
.idle = NULL, // Even with a PN532, PowerDown doesn't seem a good idea here
|
||||
.idle = pn53x_idle,
|
||||
/* Even if PN532, PowerDown is not recommended on those devices */
|
||||
.powerdown = NULL,
|
||||
};
|
||||
|
||||
@@ -726,5 +726,7 @@ const struct nfc_driver acr122s_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = acr122s_abort_command,
|
||||
.idle = NULL,
|
||||
.idle = pn53x_idle,
|
||||
/* Even if PN532, PowerDown is not recommended on those devices */
|
||||
.powerdown = NULL,
|
||||
};
|
||||
|
||||
@@ -587,6 +587,8 @@ const struct nfc_driver arygon_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = arygon_abort_command,
|
||||
.idle = NULL, // FIXME arygon driver does not support idle()
|
||||
.idle = pn53x_idle,
|
||||
/* Even if PN532, PowerDown is not recommended on those devices */
|
||||
.powerdown = NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -528,6 +528,7 @@ const struct nfc_driver pn532_uart_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = pn532_uart_abort_command,
|
||||
.idle = pn53x_idle,
|
||||
.idle = pn53x_idle,
|
||||
.powerdown = pn53x_PowerDown,
|
||||
};
|
||||
|
||||
|
||||
@@ -791,5 +791,6 @@ const struct nfc_driver pn53x_usb_driver = {
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = pn53x_usb_abort_command,
|
||||
.idle = pn53x_idle,
|
||||
.idle = pn53x_idle,
|
||||
.powerdown = pn53x_PowerDown,
|
||||
};
|
||||
|
||||
@@ -147,6 +147,7 @@ struct nfc_driver {
|
||||
|
||||
int (*abort_command)(struct nfc_device *pnd);
|
||||
int (*idle)(struct nfc_device *pnd);
|
||||
int (*powerdown)(struct nfc_device *pnd);
|
||||
};
|
||||
|
||||
# define DEVICE_NAME_LENGTH 256
|
||||
|
||||
Reference in New Issue
Block a user