/* 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;
}
}