4. Linux SDK
Reading in Decimal Time Format
if ( bcReadDecTimeEx (hBC_PCI, majtime, &min, &nano, &stat) == TRUE )
{
printf( "\nDecimal Time: %d %d
%02d:%02d:%02d.%06lu%d Status: %d",
majtime->tm_yday, majtime->1900,
majtime->tm_hour, majtime->tm_min, majtime->tm_sec, min, nano, stat);
}
3.4.4. Setting theTFP Mode
The following example sets the TFP mode to GPS:
bcSetMode (hBC_PCI, MODE_GPS);
4.4.5. Setting Interrupts
The following example sets a 1PPS Interrupt:
// Define an Interrupt handler function
void bcIntHandlerRoutine(BC_PCI_HANDLE hBC_PCI, DWORD dwSource)
{
printf(“Got Interrupt Number: %d\n”, dwSource);
}
// Start the interrupt routine
bcStartIntEx(hBC_PCI, bcIntHandlerRoutine, INTERRUPT_1PPS);
// Set the interrupt type
bcSetInt(hBC_PCI, INTERRUPT_1PPS);
- 188 -
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com