Download User Manual - EAGLE Technology

Transcript
EDR Software Development Kit
Error code
EDR_OK
EDR_BADHANDLE
EDR_BADCHAN
EDR_BADMODE
EDR_BADPARAM
EDR_BADBOARD
Counter / Timer functions
Comment
No error
Board handle is invalid
Counter/timer number is invalid
Mode is invalid
BCD parameter is invalid
Board cannot do function
Configures a counter/timer. Note that it is not necessary to configure any
counter/timers when using the SetXXClockmillHz functions.
10.3 EDR_CTGateSource
Parameter
bh
num
source
Type
integer
integer
integer
Returns:
integer error code
Error code
EDR_OK
EDR_BADHANDLE
EDR_BADCHAN
EDR_BADPARAM
EDR_BADBOARD
Comment
Board handle
Counter/timer number
Source of gating for timer (listed in
17.12
)
Comment
No error
Board handle is invalid
Counter/timer number is invalid
Source parameter is invalid
Board cannot do function
Sets the source of gate control for the specified counter/timer channel. Note
that most boards do not support this function (check your board manual). If
the gate source is set to software then EDR_CTSoftGate can be used to start
and stop the counter.
On the PC30Fxx and PC30Gxx the valid source settings and their effects on
the clock source and ECLK line are shown in the following table. Note that
the num parameter must be 2 for these boards. Also remember that the
EDR_CTClockSource function also sets the direction of the ECLK line.
131