summaryrefslogtreecommitdiffstats
path: root/include/hardware/nfc.h
diff options
context:
space:
mode:
authorStewart Miles <smiles@google.com>2014-05-12 15:00:13 -0700
committerStewart Miles <smiles@google.com>2014-05-12 15:05:24 -0700
commitb253bcc44a987b81e427e08a722b3daad5990726 (patch)
tree8497ae209a0401e3b7b5bb4eaf233ef3f95e84c4 /include/hardware/nfc.h
parent3f08cd678e1a39c72f588545c21afce5253f86e6 (diff)
downloadhardware_libhardware-b253bcc44a987b81e427e08a722b3daad5990726.zip
hardware_libhardware-b253bcc44a987b81e427e08a722b3daad5990726.tar.gz
hardware_libhardware-b253bcc44a987b81e427e08a722b3daad5990726.tar.bz2
Described restrictions for common HAL object methods in nfc.h.
Follow up from change Ibe4300275286ef275b2097534c84f1029d761d87 which extends comments to the nfc_nci_module_t and nfc_nci_device_t structures. Change-Id: I060bda450912ff3fc041027faa8f03c24e310870
Diffstat (limited to 'include/hardware/nfc.h')
-rw-r--r--include/hardware/nfc.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/hardware/nfc.h b/include/hardware/nfc.h
index 3edfeb6..0a8ed72 100644
--- a/include/hardware/nfc.h
+++ b/include/hardware/nfc.h
@@ -59,6 +59,12 @@ __BEGIN_DECLS
* nfc_nci_module_t should contain module-specific parameters
*/
typedef struct nfc_nci_module_t {
+ /**
+ * Common methods of the NFC NCI module. This *must* be the first member of
+ * nfc_nci_module_t as users of this structure will cast a hw_module_t to
+ * nfc_nci_module_t pointer in contexts where it's known the hw_module_t references a
+ * nfc_nci_module_t.
+ */
struct hw_module_t common;
} nfc_nci_module_t;
@@ -108,6 +114,12 @@ typedef void (nfc_stack_data_callback_t) (uint16_t data_len, uint8_t* p_data);
* All methods in the NCI HAL are asynchronous.
*/
typedef struct nfc_nci_device {
+ /**
+ * Common methods of the NFC NCI device. This *must* be the first member of
+ * nfc_nci_device_t as users of this structure will cast a hw_device_t to
+ * nfc_nci_device_t pointer in contexts where it's known the hw_device_t references a
+ * nfc_nci_device_t.
+ */
struct hw_device_t common;
/*
* (*open)() Opens the NFC controller device and performs initialization.
@@ -213,7 +225,7 @@ typedef struct nfc_module_t {
/**
* Common methods of the NFC NXP PN544 module. This *must* be the first member of
* nfc_module_t as users of this structure will cast a hw_module_t to
- * nfc_module_t pointer in contexts where it's known the hw_module_t references an
+ * nfc_module_t pointer in contexts where it's known the hw_module_t references a
* nfc_module_t.
*/
struct hw_module_t common;
@@ -236,7 +248,7 @@ typedef struct {
/**
* Common methods of the NFC NXP PN544 device. This *must* be the first member of
* nfc_pn544_device_t as users of this structure will cast a hw_device_t to
- * nfc_pn544_device_t pointer in contexts where it's known the hw_device_t references an
+ * nfc_pn544_device_t pointer in contexts where it's known the hw_device_t references a
* nfc_pn544_device_t.
*/
struct hw_device_t common;