#include <cafe/vpad.h> #define VPAD_MOTOR_PATTERN_SIZE_MAX 15 #define VPAD_MOTOR_PATTERN_LENGTH_MAX 120 s32 VPADControlMotor( s32 chan, u8* pattern, u8 length );
|pattern||Each bit indicates the state of motor on/off at
|length||Valid number of bits in the pattern. A size from
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.
|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.|
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.