summaryrefslogtreecommitdiffstats
path: root/Linux_x86
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-11-01 15:50:33 -0500
committerNick Pelly <npelly@google.com>2010-11-01 15:50:33 -0500
commit2940d97c95a997ea54e3b198256b8e71bac31010 (patch)
tree359afbb4dc38ad7b1b5a55c0daf15815e72b98a1 /Linux_x86
parentcf5cd1520ea32d2b65712a36a105f396df07345c (diff)
downloadexternal_libnfc-nxp-2940d97c95a997ea54e3b198256b8e71bac31010.zip
external_libnfc-nxp-2940d97c95a997ea54e3b198256b8e71bac31010.tar.gz
external_libnfc-nxp-2940d97c95a997ea54e3b198256b8e71bac31010.tar.bz2
Use new PN544_SET_PWR ioctl
Change-Id: I2d8d981d01d1e0f035d3dd3485d62dd26028b8ba Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'Linux_x86')
-rw-r--r--Linux_x86/phDal4Nfc_i2c.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Linux_x86/phDal4Nfc_i2c.c b/Linux_x86/phDal4Nfc_i2c.c
index 8cd4a1a..5e0b30b 100644
--- a/Linux_x86/phDal4Nfc_i2c.c
+++ b/Linux_x86/phDal4Nfc_i2c.c
@@ -22,6 +22,7 @@
*
*/
+#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
@@ -36,8 +37,7 @@
#include <string.h>
#endif
-#define PN544_RESET_CMD 0
-#define PN544_DOWNLOAD_CMD 1
+#include <linux/pn544.h>
typedef struct
{
@@ -240,9 +240,9 @@ int phDal4Nfc_i2c_reset(long level)
{
int ret = NFCSTATUS_SUCCESS;
- DAL_DEBUG("phDal4Nfc_i2c_reset, VEN level = %d",level);
+ DAL_DEBUG("phDal4Nfc_i2c_reset, VEN level = %ld",level);
- ret = ioctl(gI2cPortContext.nHandle, PN544_RESET_CMD, level);
+ ret = ioctl(gI2cPortContext.nHandle, PN544_SET_PWR, level);
return ret;
}
@@ -258,9 +258,10 @@ int phDal4Nfc_i2c_download(long level)
{
int ret = NFCSTATUS_SUCCESS;
- DAL_DEBUG("phDal4Nfc_i2c_download, GPIO4 level = %d",level);
+ DAL_DEBUG("phDal4Nfc_i2c_download, GPIO4 level = %ld",level);
- ret = ioctl(gI2cPortContext.nHandle, PN544_DOWNLOAD_CMD, level);
+ /* TODO: implement firmware download */ abort();
+ /* ret = ioctl(gI2cPortContext.nHandle, PN544_DOWNLOAD_CMD, level); */
return ret;
}