summaryrefslogtreecommitdiffstats
path: root/Linux_x86
diff options
context:
space:
mode:
Diffstat (limited to 'Linux_x86')
-rw-r--r--Linux_x86/phDal4Nfc.c8
-rw-r--r--Linux_x86/phDal4Nfc_uart.c12
-rw-r--r--Linux_x86/phOsalNfc.c16
3 files changed, 18 insertions, 18 deletions
diff --git a/Linux_x86/phDal4Nfc.c b/Linux_x86/phDal4Nfc.c
index 3e031f1..4086434 100644
--- a/Linux_x86/phDal4Nfc.c
+++ b/Linux_x86/phDal4Nfc.c
@@ -543,17 +543,17 @@ NFCSTATUS phDal4Nfc_Config(pphDal4Nfc_sConfig_t config,void **phwref)
/* Retrieve the hw module from the Android NFC HAL */
ret = hw_get_module(NFC_HARDWARE_MODULE_ID, &hw_module);
if (ret) {
- LOGE("hw_get_module() failed");
+ ALOGE("hw_get_module() failed");
return NFCSTATUS_FAILED;
}
ret = nfc_pn544_open(hw_module, &pn544_dev);
if (ret) {
- LOGE("Could not open pn544 hw_module");
+ ALOGE("Could not open pn544 hw_module");
return NFCSTATUS_FAILED;
}
config->deviceNode = pn544_dev->device_node;
if (config->deviceNode == NULL) {
- LOGE("deviceNode NULL");
+ ALOGE("deviceNode NULL");
return NFCSTATUS_FAILED;
}
@@ -721,7 +721,7 @@ int phDal4Nfc_ReaderThread(void * pArg)
if (gDalContext.pDev != NULL) {
i2c_workaround = gDalContext.pDev->enable_i2c_workaround;
} else {
- LOGE("gDalContext.pDev is not set");
+ ALOGE("gDalContext.pDev is not set");
return NFCSTATUS_FAILED;
}
diff --git a/Linux_x86/phDal4Nfc_uart.c b/Linux_x86/phDal4Nfc_uart.c
index b19c5c5..520ab9c 100644
--- a/Linux_x86/phDal4Nfc_uart.c
+++ b/Linux_x86/phDal4Nfc_uart.c
@@ -253,11 +253,11 @@ static int apply_errors(uint8_t *buffer, int length) {
// 50% chance of dropping byte
length--;
memcpy(&buffer[i], &buffer[i+1], length-i);
- LOGW("dropped byte %d", i);
+ ALOGW("dropped byte %d", i);
} else {
// 50% chance of corruption
buffer[i] = (uint8_t)rand();
- LOGW("corrupted byte %d", i);
+ ALOGW("corrupted byte %d", i);
}
}
}
@@ -344,7 +344,7 @@ int phDal4Nfc_uart_read(uint8_t * pBuffer, int nNbBytesToRead)
}
return -1;
} else if (ret == 0) {
- LOGW("timeout!");
+ ALOGW("timeout!");
break; // return partial response
}
ret = read(gComPortContext.nHandle, pBuffer + numRead, nNbBytesToRead - numRead);
@@ -423,19 +423,19 @@ int phDal4Nfc_uart_reset(long level)
DAL_DEBUG("phDal4Nfc_uart_reset, VEN level = %ld", level);
if (snprintf(buffer, sizeof(buffer), "%u", (unsigned int)level) != 1) {
- LOGE("Bad nfc power level (%u)", (unsigned int)level);
+ ALOGE("Bad nfc power level (%u)", (unsigned int)level);
goto out;
}
fd = open(NFC_POWER_PATH, O_WRONLY);
if (fd < 0) {
- LOGE("open(%s) for write failed: %s (%d)", NFC_POWER_PATH,
+ ALOGE("open(%s) for write failed: %s (%d)", NFC_POWER_PATH,
strerror(errno), errno);
goto out;
}
sz = write(fd, &buffer, sizeof(buffer) - 1);
if (sz < 0) {
- LOGE("write(%s) failed: %s (%d)", NFC_POWER_PATH, strerror(errno),
+ ALOGE("write(%s) failed: %s (%d)", NFC_POWER_PATH, strerror(errno),
errno);
goto out;
}
diff --git a/Linux_x86/phOsalNfc.c b/Linux_x86/phOsalNfc.c
index cbca1ac..3f4542d 100644
--- a/Linux_x86/phOsalNfc.c
+++ b/Linux_x86/phOsalNfc.c
@@ -81,7 +81,7 @@ void phOsalNfc_DbgString(const char *pString)
#ifndef ANDROID
printf(pString);
#else
- LOGD("%s", pString);
+ ALOGD("%s", pString);
#endif
#endif
}
@@ -111,15 +111,15 @@ void phOsalNfc_DbgTrace(uint8_t data[], uint32_t size)
{
if((i % 10) == 0)
{
- LOGD("%s", phOsalNfc_DbgTraceBuffer);
+ ALOGD("%s", phOsalNfc_DbgTraceBuffer);
phOsalNfc_DbgTraceBuffer[0] = '\0';
}
snprintf(buf, 10, "%02X ", data[i]);
strncat(phOsalNfc_DbgTraceBuffer, buf, 10);
}
- LOGD("%s", phOsalNfc_DbgTraceBuffer);
- LOGD("Block size is: %d", size);
+ ALOGD("%s", phOsalNfc_DbgTraceBuffer);
+ ALOGD("Block size is: %d", size);
#endif
#endif
}
@@ -140,12 +140,12 @@ void phOsalNfc_DbgTrace(uint8_t data[], uint32_t size)
*/
void phOsalNfc_RaiseException(phOsalNfc_ExceptionType_t eExceptionType, uint16_t reason)
{
- LOGD("phOsalNfc_RaiseException() called");
+ ALOGD("phOsalNfc_RaiseException() called");
if(eExceptionType == phOsalNfc_e_UnrecovFirmwareErr)
{
- LOGE("HCI Timeout - Exception raised");
- LOGE("Force restart of NFC Service");
+ ALOGE("HCI Timeout - Exception raised");
+ ALOGE("Force restart of NFC Service");
abort();
}
}
@@ -208,5 +208,5 @@ void phOsalNfc_PrintData(const char *pString, uint32_t length, uint8_t *pBuffer,
}
}
- LOGD("> %s:%s\t%s", pString, print_buffer, llc);
+ ALOGD("> %s:%s\t%s", pString, print_buffer, llc);
}