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

## motortest

###

###

    README_DEMOS CONTENTS:
          n/a

    README CONTENTS:
    Function for a motor test

    ---Explanation of the function---

    There are three kinds of motor functions as described below.
    Please use by linking libmotor.a and by including motor.h.

    s32	osMotorInit(OSMesgQueue *siMessegeQ, OSPfs*pfs, int channel);

    This is the function to initialize the motor.  SI message queue,
    OSPfs structure, and the number of the controller channel shall be a factor.
    Please make sure to refer to this at first.

    As an error code in return, we have PFS_ERR_NOPACK, PFS_ERR_CONTRFAIL,
    PFS_ERR_DEVICE.  The first three are the same error code as the
    controller pak.  In this case, PFS_ERR_DEVICE means that a certain
    device, not the motor, is put in the controller.

    s32	osMotorStart(OSPfs *pfs);

    This is the function to operate the motor and OSPfs structure shall
    be a factor.  By calling this function, the motor starts to work.
    Internally, data is written with high-speeded function by eliminating
    any wasteful process from the written function for the controller pak
    _osContRamWrite0.  Accordingly, the motor does not start to work until
    we call MotorInit0 again if the controller is pulled and put.
    Naturally, SI access is adopted and the inside waits for the
    instruction of SI.  You need to call by considering the fact.

    As to the error code, if PFS_ERR_CONTRFAIL is received, there is
    an error in communication, which means that there is a failure in
    operating the motor.  0 is received if successfully done.
    Programming should be done by considering the possible error in
    the communication.

    s32	osMotorStop(OSPfs *pfs);

    This is the function to operate the motor and OSPfs will be a factor.
    By calling the function, the motor is stopped.  This function internally
    adopts the same process as osMotorStart().

    ---Explanation of the test program---

    The brief explanation for the operation of the test program is that
    A button is for motor start, B button is for motor stop, and you can
    change the vibrating speed by JOY with Z button.

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