##// END OF EJS Templates
hk_lfr_time_not_synchro is updated each time the synchro is lost....
hk_lfr_time_not_synchro is updated each time the synchro is lost. hk_lfr_timecode_erroneous is updated after the reception of the second valid timecode to avoid errors at startup

File last commit:

r197:d5570d7e57e2 R3
r249:43d4aa6b8829 R3a
Show More
grspw.c
70 lines | 1.0 KiB | text/x-c | CLexer
#include "grspw.h"
int grspw_set_ie( unsigned char value, unsigned int *ctrlReg )
{
// IE = bit 3
// Interrupt Enable
int ret = 0;
if (value == 0)
{
*ctrlReg = *ctrlReg & 0xfffffff7;
}
else if (value == 1)
{
*ctrlReg = *ctrlReg | 0x00000008;
}
else
{
ret = -1;
}
return ret;
}
int grspw_set_tq( unsigned char value, unsigned int *ctrlReg )
{
// TQ = bit 8
// Tick-out IRQ
int ret = 0;
if (value == 0)
{
*ctrlReg = *ctrlReg & 0xfffffeff;
}
else if (value == 1)
{
*ctrlReg = *ctrlReg | 0x00000100;
}
else
{
ret = -1;
}
return ret;
}
int grspw_set_tr( unsigned char value, unsigned int *ctrlReg )
{
// TR = bit 11
// Enable timecode reception
int ret = 0;
if (value == 0)
{
*ctrlReg = *ctrlReg & 0xfffff7ff;
}
else if (value == 1)
{
*ctrlReg = *ctrlReg | 0x00000800;
}
else
{
ret = -1;
}
return ret;
}