Lines Matching refs:timeout

1471 static void setFelicaTimeout(jint timeout) {
1472 // The Felica timeout is configurable in the PN544 upto a maximum of 255 ms.
1473 // It can be set to 0 to disable the timeout altogether, in which case we
1475 if (timeout <= 255) {
1476 phLibNfc_SetFelicaTimeout(timeout);
1478 // Disable hw timeout, use sw watchdog for timeout
1480 phLibNfc_SetHciTimeout(timeout);
1493 // The Iso/Mifare Xchg timeout in PN544 is a non-linear function over X
1494 // spanning 0 - 4.9s: timeout in seconds = (256 * 16 / 13560000) * 2 ^ X
1502 // timeout = (256 * 16 / 13560000) * 2 ^ X
1503 // First find the first X for which timeout > requested timeout
1507 static void setIsoDepTimeout(jint timeout) {
1508 if (timeout <= 4900) {
1509 int value = calcTimeout(timeout);
1510 // Then re-compute the actual timeout based on X
1512 // Set the sw watchdog a bit longer (The PN544 timeout is very accurate,
1516 value |= 0x10; // bit 4 to enable timeout
1520 // Also note that if we desire a timeout > 4.9s, the Iso Xchg timeout
1522 // the transaction. We reuse the HCI sw watchdog to catch the timeout
1525 phLibNfc_SetHciTimeout(timeout);
1529 static void setNfcATimeout(jint timeout) {
1530 if (timeout <= 4900) {
1531 int value = calcTimeout(timeout);
1535 // Disable mifare raw timeout, use HCI sw watchdog instead
1537 phLibNfc_SetHciTimeout(timeout);
1542 jint tech, jint timeout) {
1545 if (timeout <= 0) {
1555 setNfcATimeout(timeout);
1559 setIsoDepTimeout(timeout);
1563 setFelicaTimeout(timeout);
1577 int timeout = -1;
1585 timeout = phLibNfc_GetMifareRawTimeout();
1586 if (timeout == 0) {
1587 timeout = phLibNfc_GetHciTimeout();
1590 timeout = (nxp_nfc_timeout_factor * (1 << timeout));
1594 timeout = phLibNfc_GetIsoXchgTimeout() & 0x0F; // lower 4 bits only
1595 if (timeout == 0) {
1596 timeout = phLibNfc_GetHciTimeout();
1599 timeout = (nxp_nfc_timeout_factor * (1 << timeout));
1603 timeout = phLibNfc_GetFelicaTimeout();
1604 if (timeout == 0) {
1605 timeout = phLibNfc_GetHciTimeout();
1607 // Felica timeout already in ms
1615 return timeout;