DIALS(3) — Kubota Pacfic Computer Inc.
NAME
dials − subroutines for accessing the dials
SYNOPSIS
fd = OpenDials();
nblocks = ReadDials(block, combine_flag)
int block[2];
DESCRIPTION
These routines should be used to open and read the dial box. OpenDials returns a file descriptor appropriate for poll(2). Error return is indicated by a −1 value, and errno will be valid.
Each call to ReadDials returns a count of the number of valid dial blocks returned from the dial box. It will wait for one block to arrive if there are none waiting at the time of the call. A zero return is possible if the dials get out of synchronization with the System.
The block argument is a two integer array: the first returned integer is a number between zero and seven indicating which dial was rotated; the second returned integer is the signed delta change for that dial. A positive number is clockwise. A full rotation of a dial is 256 ticks.
The combine_flag argument directs ReadDials to look ahead and combine multiple blocks (if True), or to simply return one sample (if False). For most graphics applications, the combine_flag should be true.
SEE ALSO
September 02, 1992