CS 273
Homework 7
Due Friday, April 13, 2001
Write a driver for the digital inputs. It should have the following
API
- Synopsis
signed char digital(unsigned char bitno);
- Parameter
- Valid values are 1 through 8. Specifies which of the digital
input bits to read (there is no equivalent of the broadcast
value used for the motor driver).
- Return value
- Return -1 on out-of-range input. Otherwise return 0 if the bit
is 0, and 1 if it is non-zero.
Last modified: Fri Apr 6 09:37:46 MDT 2001