opto_cnt_t
typedef struct opto_cnt {
unsigned char num;
unsigned char mode;
int stval;
} opto_cnt_t;
|
Description
Contains the counter intialization parameters. This structure is
used when communicating with any of on-board counters.
Members
This structure has the following members:
-
num
is the number of the counter, starting at zero. At the moment,
there are three on-board counters, therefore this member can be 0, 1 or 2.
-
mode
is the operating mode of the counter. Please read the
documentation about the hardware for a more detailed description
of these modes. The following operating modes are supported:
-
OPTO_CNTMODE_ZEROTHROUGH:
Operating mode 0. The output of the counter will be set on high level
when the counter passes the zero.
-
OPTO_CNTMODE_MONOSTABLE:
Operating mode 1. The output of the counter is controlled through the gate.
-
OPTO_CNTMODE_NDIV:
Operating mode 2. The counter acts as a frequency rate generator.
-
OPTO_CNTMODE_SQUAREGEN:
Operating mode 3. The counter acts as a square pulse generator.
-
OPTO_CNTMODE_SOFTWARE:
Operating mode 4. The counting is software-controlled.
-
OPTO_CNTMODE_HARDWARE:
Operating mode 5. The counting is hardware-controlled.
-
stval
is the start value for the counter.