summaryrefslogtreecommitdiffstats
path: root/src/phDal4Nfc.h
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-11-02 15:58:37 -0700
committerMartijn Coenen <maco@google.com>2011-11-03 17:56:36 -0700
commitb99be65c277b0cc65a00a33e784ed49461531737 (patch)
treefa283e7ed283b12e692729a860fb51315d130d78 /src/phDal4Nfc.h
parent366238178f7a6d26ce051150f4fb65e533c2fae4 (diff)
downloadexternal_libnfc-nxp-b99be65c277b0cc65a00a33e784ed49461531737.zip
external_libnfc-nxp-b99be65c277b0cc65a00a33e784ed49461531737.tar.gz
external_libnfc-nxp-b99be65c277b0cc65a00a33e784ed49461531737.tar.bz2
Use NFC HAL for some libnfc settings.
The NFC HAL in libhardware allows us to store and retrieve product-specific settings. This patch moves two product-specific settings to the HAL: the device port, and the usage of the i2c workaround we had for crespo. This means configuring the port no longer needs to be done from JNI land. Change-Id: I2e19b6f188f808bc2f2a1f1abc28f2a6c47e6a4c
Diffstat (limited to 'src/phDal4Nfc.h')
-rw-r--r--src/phDal4Nfc.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/phDal4Nfc.h b/src/phDal4Nfc.h
index 0913c5e..3cbb585 100644
--- a/src/phDal4Nfc.h
+++ b/src/phDal4Nfc.h
@@ -49,6 +49,7 @@
*
*
*/
+#include <hardware/nfc.h>
/**< Basic type definitions */
#include <phNfcTypes.h>
/**< Generic Interface Layer Function Definitions */
@@ -75,6 +76,7 @@ typedef struct phDal4Nfc_SContext
phNfcIF_sCallBack_t cb_if; /**<Callback info registered by upper layer*/
volatile uint8_t hw_valid; /**<Flag - shows Hardware present or not */
void *pHwRef; /**<Hardware Reference*/
+ nfc_pn544_device_t *pDev; /**<Android HAL reference*/
}phDal4Nfc_SContext_t,*pphDal4Nfc_SContext_t;
/**
@@ -123,26 +125,6 @@ typedef struct phDal4Nfc_Message
pphNfcIF_Transact_Completion_CB_t writeCbPtr;
} phDal4Nfc_Message_t,*pphDal4Nfc_Message_t;
-/**
- * \ingroup grp_nfc_dal
- *\brief Possible DAL Configuration exposed to upper layer.
- * Typically this should be port name (Ex:"COM1","COM2") to which PN544 is connected.
- */
-#define ENUM_DAL_LINK_TYPE_COM1 ENUM_LINK_TYPE_COM1
-#define ENUM_DAL_LINK_TYPE_COM2 ENUM_LINK_TYPE_COM2
-#define ENUM_DAL_LINK_TYPE_COM3 ENUM_LINK_TYPE_COM3
-#define ENUM_DAL_LINK_TYPE_COM4 ENUM_LINK_TYPE_COM4
-#define ENUM_DAL_LINK_TYPE_COM5 ENUM_LINK_TYPE_COM5
-#define ENUM_DAL_LINK_TYPE_COM6 ENUM_LINK_TYPE_COM6
-#define ENUM_DAL_LINK_TYPE_COM7 ENUM_LINK_TYPE_COM7
-#define ENUM_DAL_LINK_TYPE_COM8 ENUM_LINK_TYPE_COM8
-#define ENUM_DAL_LINK_TYPE_I2C ENUM_LINK_TYPE_I2C
-#define ENUM_DAL_LINK_TYPE_USB ENUM_LINK_TYPE_USB
-#define ENUM_DAL_LINK_TYPE_TCP ENUM_LINK_TYPE_TCP
-
-#define ENUM_DAL_LINK_TYPE_NB ENUM_LINK_TYPE_NB
-typedef phLibNfc_eConfigLinkType phDal4Nfc_eConfigLinkType;
-
typedef phLibNfc_sConfig_t phDal4Nfc_sConfig_t;
typedef phLibNfc_sConfig_t *pphDal4Nfc_sConfig_t;