pub struct IsoSchedule { /* private fields */ }Expand description
Next isochronous IN slot, aligned to the bus frame clock and host polling phase.
Service intervals occur every interval ticks of a frame counter of modulus span
(2048 at full speed, 16384 at high speed). interval should divide span (true for all
USB power-of-two intervals).
For interval == 1, every tick is a service interval and the phase is trivially 0.
For interval > 1, the USB host chooses an arbitrary phase in 0..interval when scheduling
the endpoint. Until lock_phase is called with the frame of a completed
IN transfer, the schedule paces at interval ticks with provisional phase 0. Once locked,
all subsequent slots align to frame % interval == phase until reset.
A gap of more than one revolution of the frame counter is counted as a single wrap.
Implementations§
Source§impl IsoSchedule
impl IsoSchedule
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clear all tracking state, including any locked host phase.
Call when the endpoint is disabled or the bus resets.
Sourcepub fn lock_phase(&mut self, frame: u32, interval: u32)
pub fn lock_phase(&mut self, frame: u32, interval: u32)
Lock the host polling phase from a completed IN transfer at frame.
Subsequent calls while already locked have no effect until reset.