summaryrefslogtreecommitdiffstats
path: root/nfc
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2011-11-16 13:14:05 -0800
committerMartijn Coenen <maco@google.com>2011-11-16 13:18:03 -0800
commit2cdc47b638145de305fa7d131131dc2a9ccc2440 (patch)
treefd2cd8d64ab91f7d65d469dbc0809853280174e7 /nfc
parenteea493282d1915991b4a69e7ce7bcb736f691c39 (diff)
downloaddevice_samsung_tuna-2cdc47b638145de305fa7d131131dc2a9ccc2440.zip
device_samsung_tuna-2cdc47b638145de305fa7d131131dc2a9ccc2440.tar.gz
device_samsung_tuna-2cdc47b638145de305fa7d131131dc2a9ccc2440.tar.bz2
Set NFC load modulation parameters to recommended values.
maguro/toro have different recommended load modulation settings. Change-Id: Ifce689180b6af06a113cefc8092bb0e540f04e86
Diffstat (limited to 'nfc')
-rw-r--r--nfc/Android.mk1
-rw-r--r--nfc/nfc_hw.c16
2 files changed, 16 insertions, 1 deletions
diff --git a/nfc/Android.mk b/nfc/Android.mk
index 000b5ae..c89e404 100644
--- a/nfc/Android.mk
+++ b/nfc/Android.mk
@@ -21,5 +21,6 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SRC_FILES := nfc_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS += -D$(TARGET_DEVICE)
include $(BUILD_SHARED_LIBRARY)
diff --git a/nfc/nfc_hw.c b/nfc/nfc_hw.c
index 4b4dda5..99adc29 100644
--- a/nfc/nfc_hw.c
+++ b/nfc/nfc_hw.c
@@ -33,7 +33,21 @@ static uint8_t pn544_eedata_settings[][4] = {
,{0x00,0x9B,0x84,0x13} // ANACM2 setting
,{0x00,0x99,0x81,0x7F} // ANAVMID setting PCD
,{0x00,0x99,0x31,0x70} // ANAVMID setting PICC
- ,{0x00,0x99,0x29,0xF6} // Load modulation amplitude fine tuning (???)
+#ifdef maguro
+ // Maguro load modulation settings
+ ,{0x00,0x99,0x29,0xF4} // Type A load modulation amplitude fine tuning
+ ,{0x00,0x99,0x2A,0xF4} // Type B load modulation amplitude fine tuning
+ ,{0x00,0x99,0x2B,0xF4} // Type B' load modulation amplitude fine tuning
+ ,{0x00,0x99,0x85,0xF1} // Type Felica load modulation amplitude fine tuning
+#endif
+#ifdef toro
+ // Toro load modulation settings
+ ,{0x00,0x99,0x29,0xF3} // Type A load modulation amplitude fine tuning
+ ,{0x00,0x99,0x2A,0xF3} // Type B load modulation amplitude fine tuning
+ ,{0x00,0x99,0x2B,0xF3} // Type B' load modulation amplitude fine tuning
+ ,{0x00,0x99,0x85,0xF1} // Type Felica load modulation amplitude fine tuning
+#endif
+ // For tuna we don't override load modulation settings.
// Enable PBTF
,{0x00,0x98,0x00,0x3F} // SECURE_ELEMENT_CONFIGURATION - No Secure Element