Lines Matching defs:timeout

1481 static void setFelicaTimeout(jint timeout) {
1482 // The Felica timeout is configurable in the PN544 upto a maximum of 255 ms.
1483 // It can be set to 0 to disable the timeout altogether, in which case we
1485 if (timeout <= 255) {
1486 phLibNfc_SetFelicaTimeout(timeout);
1488 // Disable hw timeout, use sw watchdog for timeout
1490 phLibNfc_SetHciTimeout(timeout);
1503 // The Iso/Mifare Xchg timeout in PN544 is a non-linear function over X
1504 // spanning 0 - 4.9s: timeout in seconds = (256 * 16 / 13560000) * 2 ^ X
1512 // timeout = (256 * 16 / 13560000) * 2 ^ X
1513 // First find the first X for which timeout > requested timeout
1517 static void setIsoDepTimeout(jint timeout) {
1518 if (timeout <= 4900) {
1519 int value = calcTimeout(timeout);
1520 // Then re-compute the actual timeout based on X
1522 // Set the sw watchdog a bit longer (The PN544 timeout is very accurate,
1526 value |= 0x10; // bit 4 to enable timeout
1530 // Also note that if we desire a timeout > 4.9s, the Iso Xchg timeout
1532 // the transaction. We reuse the HCI sw watchdog to catch the timeout
1535 phLibNfc_SetHciTimeout(timeout);
1539 static void setNfcATimeout(jint timeout) {
1540 if (timeout <= 4900) {
1541 int value = calcTimeout(timeout);
1545 // Disable mifare raw timeout, use HCI sw watchdog instead
1547 phLibNfc_SetHciTimeout(timeout);
1552 jint tech, jint timeout) {
1555 if (timeout <= 0) {
1565 setNfcATimeout(timeout);
1569 setIsoDepTimeout(timeout);
1573 setFelicaTimeout(timeout);
1587 int timeout = -1;
1595 timeout = phLibNfc_GetMifareRawTimeout();
1596 if (timeout == 0) {
1597 timeout = phLibNfc_GetHciTimeout();
1600 timeout = (nxp_nfc_timeout_factor * (1 << timeout));
1604 timeout = phLibNfc_GetIsoXchgTimeout() & 0x0F; // lower 4 bits only
1605 if (timeout == 0) {
1606 timeout = phLibNfc_GetHciTimeout();
1609 timeout = (nxp_nfc_timeout_factor * (1 << timeout));
1613 timeout = phLibNfc_GetFelicaTimeout();
1614 if (timeout == 0) {
1615 timeout = phLibNfc_GetHciTimeout();
1617 // Felica timeout already in ms
1625 return timeout;