diff --git a/src/include/drv/app_adc_read.h b/src/include/drv/app_adc_read.h index 8d46343d0c611b83983b5515c6cd8c9921ec8169..5877ac4f1938e74e347c15ab6d02bdb17bd72b33 100644 --- a/src/include/drv/app_adc_read.h +++ b/src/include/drv/app_adc_read.h @@ -16,7 +16,9 @@ extern "C" { static inline int app_adc_read( int ioMemCtr, int ioClk, adcInfo_t* adcinfo, int cpuClk[], int* startGpsTime_ptr ) { +#ifdef OVERSAMPLE int limit = OVERFLOW_LIMIT_16BIT; +#endif int mm; int card = 0; int chan = 0; diff --git a/src/include/drv/ligoPcieTiming.c b/src/include/drv/ligoPcieTiming.c index 6a250dcfea0745347a3c2ba63401293ed4464cfb..d672c9b8fc3f9fbdf1ce67eddb864b2dd5e29a29 100644 --- a/src/include/drv/ligoPcieTiming.c +++ b/src/include/drv/ligoPcieTiming.c @@ -61,6 +61,8 @@ lptc_start_clock( CDS_HARDWARE* pCds ) int ii, jj; volatile LPTC_REGISTER* lptcPtr; + if(pCds->card_count[ LPTC ] < 1) return -1; + for ( jj = 0; jj < pCds->card_count[ LPTC ]; jj++ ) { lptcPtr = (LPTC_REGISTER*)pCds->lptc[ jj ]; @@ -109,6 +111,8 @@ lptc_stop_clock( CDS_HARDWARE* pCds ) int jj; volatile LPTC_REGISTER* lptcPtr; + if(pCds->card_count[ LPTC ] < 1) return -1; + for ( jj = 0; jj < pCds->card_count[ LPTC ]; jj++ ) { lptcPtr = (LPTC_REGISTER*)pCds->lptc[ jj ];