#include <cafe/vpad.h>


s32 VPADControlMotor( s32 chan, u8* pattern, u8 length );


chan Controller number. 0 for DRC1 and 1 for DRC2.
pattern Each bit indicates the state of motor on/off at 120Hz.(1 = on; 0 = off)
length Valid number of bits in the pattern. A size from 0 to 120 bits(15 bytes) can be specified.

Return Values

If the return values are negative, it indicates that the command is not queued successfully.


Motor on/off resolution is 120Hz.

Pattern length allows for patterns of up to 1 second of to be programmed. Multiple commands will be queued for playback. The queue depth is 5. Rumble will stop when the queue is completely consumed.

To turn off the vibrator while there are commands in the queue, set the command with a pattern length of zero. This will cancel all the outstanding commands in the queue.

This function should not be called with a high frequency because a possibility exists that the function will cause an unexpected error. Call this function at more than 0.1 sec intervals.

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.
Multiple Cores Do not call this function from more than one Core.

See Also


Revision History

2013/09/17 Added the notice for the frequency of the function call.
2013/05/08 Automated cleanup pass.
2012/10/05 Modified the description of the return values
2012/02/24 Deleted a function to return remaining queue depth.
2011/08/10 Initial version.