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





osMotorInit

Syntax

#include <ultra64.h> /* os.h */ s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int controller_no);

Explanation
osMotorInit is a Rumble Pak initialization function. This function should be used to perform the special Rumble Pak initialization procedure after all SI devices have been configured using osContInit. When SI devices are used, configuration is required for SI use. Thus, osContInit should be called once at the start, before osMotorInit is called.

controller_no specifies the controller port number (0 - 3). The Rumble Pak inserted in the controller connected to the controller port specified by controller_no is initialized.

The OSPfs structure pfs is used to control the Rumble Pak.

pfs is initialized by osMotorInit.

mq is a message queue initialized by being associated with OS_EVENT_SI. For information how the association is formed, see the osSetEventMesg function reference. Because mq is used by the function as an internal message queue, it is not necessary for the application to use mq for purposes such as queuing function-termination messages.

The return values are error codes. With normal termination, 0 is returned. The other error codes returned are as follows.

PFS_ERR_NOPACK
Nothing inserted in the specified controller.

PFS_ERR_DEVICE
A device other than a Rumble Pak is inserted in the controller.

PFS_ERR_CONTRFAIL
Data transmission failed between the N64 unit and Rumble Pak. The controller may not be properly connected, or there may be an abnormality in the Rumble Pak or controller connector.

See also
osContInit
osMotorStop
osSetEventMesg

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