summaryrefslogtreecommitdiff
path: root/Linux_x86/phDal4Nfc_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'Linux_x86/phDal4Nfc_uart.c')
-rw-r--r--Linux_x86/phDal4Nfc_uart.c12
1 files changed, 6 insertions, 6 deletions
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;
}