Function devices::usb::backend::fido_backend::poll_thread::poll_for_pending_packets
source · 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 dataTransferPollTimer
: times out USB transfers that stay pending for too long without dataTransactionPollTimer
: puts the security key device to sleep when transactions time out