home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sound Sensations!
/
sound_sensations.iso
/
miditool
/
mpu401c
/
mpuput.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-11-02
|
534b
|
28 lines
/* Copyright (C) 1986 by M. J. Shannon, Jr.
** Permission to distribute for non-commercial uses granted as long as this
** notice is retained. Violators will be prosecuted.
*/
#include "mpu.h"
/* mpu_put(byte):
** put out a single byte command & wait for the ack.
*/
void
mpu_put(cmd)
unsigned char cmd;
{
long counter;
(void) mpu_drr();
outp(MPUP_COMD, cmd);
for (counter = 0xFFL; counter != 0; --counter)
{
if (mpu_dsr()) /* timed out */
break;
if (mpu_dget() == CMD_ACK)
break;
}
}