Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

enable_rumble_on

Function enable_rumble_on 

Source
pub fn enable_rumble_on<T: Transport>(port: &mut T, socket: Port) -> bool
Expand description

Put a DualShock’s motors under the poll: enter configuration mode, map the small motor to the first motor byte and the large motor to the second (MOTOR_MAP_PACKET), and leave configuration mode, spaced a video frame apart as require_analog_on spaces its commands. Returns whether the pad took the mapping from configuration mode and then reports DualShock analog mode, which is the only mode a poll sends motor bytes in; a digital pad, a pad that refuses configuration mode, or one that drops out part way returns false and is polled as before. The pad’s analog or digital mode is left as it was. Call it again after a pad is plugged in.

This blocks for a few frames; the interrupt engine does the same without blocking (console::enable_rumble).