ADLINK HSL-DO32-M-N/HSL-DO32-M-P User Manual
Page 100
HSL Function Library
87
In addition, the values of c1 and c2 must be greater than 1. When
c1=0 or c2=0, the timer interrupt stops.
HSL_set_int_timer (7853/54 only):
Sets up the Timer parameter p1. The timer is used as frequency
divider to generate a dedicated constant timer interrupt sampling
rate.
The formula is: Frequency(Hz) =
HSL_set_int_timer_enable (7853/54 only):
Enables or disables the hardware timer interrupt of this master
card.
HSL_wait_timer_interrupt (7853/54 only):
Waits for the specific interrupt when you enabled the interrupt
function by HSL_set_int_timer_enable() and set the timer parame-
ter p1 by HSL_set_int_timer(). When this function is running, the
process never stops even if it is triggered or the function has timed
out. The following codes illustrate this function.
I16 ret;
HSL_set_int_timer(0, 0xffff); // set the
parameter p1
HSL_set_int_timer_enable(0, 1); //enable the
timer
for(int i = 0; i< 10; i++)
{
ret = HSL_wait_timer_interrupt(g_cardId,
10000);
if(ret == 0)
// do something…
else
// time out
}
)
1
1
(
256
48
+
⋅ p
MHz