N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential





osMotorStart
osMotorStop

Syntax
#include <ultra64.h>        /* os.h */
s32 osMotorStart(OSPfs *pfs);
s32 osMotorStop(OSPfs *pfs);

Explanation
osMotorStart is a function that operates the Rumble Pak. It takes the OSPfs structure pfs, which is used to control the Rumble Pak, as an argument. This pfs structure used should be one that has been initialized by osMotorInit. The motor is started by calling osMotorStart.

The osMotorStart function starts the Rumble Pak motor. Its argument is the OSPfs structure pointed to by pfs. Internally, it simply sends data to the Rumble Pak. For increased processing speed, it does not perform processes such as Rumble Pak status checking. Consequently, when the Rumble Pak is removed and reinserted, the motor cannot be operated without again calling osMotorInit. Of course, osMotorStart also uses the serial interface (SI) and performs message waiting internally, which you should consider when calling it. (For more information, see Q3 of Rumble Pak Function Items to Note (Q&A format) in Section 4, or Rumble Pak, Chapter 26, SI Devices, in the programming manual).

If the error code PFS_ERR_CONTRFAIL is returned, communication has failed, and the motor cannot be operated. Although the chance of a transmission error is small, this error code must be checked to confirm whether the motor is actually operating.

The osMotorStop function stops the motor. Its argument is the OSPfs structure pointed to by pfs. Internally, it performs the same processing as osMotorStart.

See Also
osContInit
osMotorInit

Revision History
2/1/1999 Completely rewritten





Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998