MCPcopy Create free account
hub / github.com/emberian/evdev / play

Method play

src/lib.rs:568–573  ·  view source on GitHub ↗

Plays the force feedback effect with the `count` argument specifying how often the effect should be played.

(&mut self, count: i32)

Source from the content-addressed store, hash-verified

566 /// Plays the force feedback effect with the `count` argument specifying how often the effect
567 /// should be played.
568 pub fn play(&mut self, count: i32) -> io::Result<()> {
569 let events = [*FFEvent::new(FFEffectCode(self.id), count)];
570 crate::write_events(self.fd.as_fd(), &events)?;
571
572 Ok(())
573 }
574
575 /// Stops playback of the force feedback effect.
576 pub fn stop(&mut self) -> io::Result<()> {

Callers 1

mainFunction · 0.80

Calls 3

FFEffectCodeClass · 0.85
write_eventsFunction · 0.85
as_fdMethod · 0.45

Tested by

no test coverage detected