From 52ffcd90d9da60151c4343bc25f272da65cf6b98 Mon Sep 17 00:00:00 2001 From: Nick Pelly Date: Wed, 3 Nov 2010 14:59:20 -0500 Subject: Increase hardware reset time. VEN was pulled low for 7ms, as per data sheet, but pn544 not awlays reset. Increase time. Change-Id: I7de9e4fc94a0493605f706505962bdfab9d03666 Signed-off-by: Nick Pelly --- Linux_x86/phDal4Nfc_i2c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Linux_x86') diff --git a/Linux_x86/phDal4Nfc_i2c.c b/Linux_x86/phDal4Nfc_i2c.c index 5e0b30b..4f18ffc 100644 --- a/Linux_x86/phDal4Nfc_i2c.c +++ b/Linux_x86/phDal4Nfc_i2c.c @@ -22,6 +22,9 @@ * */ +#define LOG_TAG "NFC_i2c" +#include + #include #include #include @@ -244,6 +247,16 @@ int phDal4Nfc_i2c_reset(long level) ret = ioctl(gI2cPortContext.nHandle, PN544_SET_PWR, level); + /* HACK to increase reset time + * TODO: move this to kernel + */ + if (level == 0) { + LOGW("sleeping a little longer..."); + usleep(10000); + } else { + usleep(10000); + } + return ret; } -- cgit v1.1