pub fn poll_for_pending_packets(
    device: Arc<Mutex<FidoDevice>>,
    pending_in_transfers: Arc<Mutex<VecDeque<(FidoTransferHandle, Arc<Mutex<Option<FidoTransfer>>>)>>>,
    kill_evt: Event
) -> Result<()>
Expand description

This function is the main poll thread. It periodically wakes up to emulate a USB interrupt (poll) device behavior. It takes care of three different poll timers:

  • PacketPollTimer: periodically polls for available USB transfers waiting for data
  • TransferPollTimer: times out USB transfers that stay pending for too long without data
  • TransactionPollTimer: puts the security key device to sleep when transactions time out