mirror of https://github.com/g4klx/MMDVM.git
Added missing conditions for preprocessor
This commit is contained in:
parent
2c76d67098
commit
bef0d9cfd6
11
IODue.cpp
11
IODue.cpp
|
@ -106,8 +106,10 @@ void CIO::startInt()
|
|||
ADC->ADC_IDR = 0xFFFFFFFF; // Disable interrupts
|
||||
ADC->ADC_IER = ADC_CHER_Chan; // Enable End-Of-Conv interrupt
|
||||
ADC->ADC_CHDR = 0xFFFF; // Disable all channels
|
||||
ADC->ADC_CHER = ADC_CHER_Chan | // Enable rx input channel
|
||||
RSSI_CHER_Chan; // and RSSI input
|
||||
ADC->ADC_CHER = ADC_CHER_Chan; // Enable rx input channel
|
||||
#if defined(RSSI_CHER_Chan)
|
||||
ADC->ADC_CHER |= RSSI_CHER_Chan; // and RSSI input
|
||||
#endif
|
||||
ADC->ADC_CGR = 0x15555555; // All gains set to x1
|
||||
ADC->ADC_COR = 0x00000000; // All offsets off
|
||||
ADC->ADC_MR = (ADC->ADC_MR & 0xFFFFFFF0) | (1 << 1) | ADC_MR_TRGEN; // 1 = trig source TIO from TC0
|
||||
|
@ -172,7 +174,11 @@ void CIO::interrupt(uint8_t source)
|
|||
sample = ADC->ADC_CDR[ADC_CDR_Chan];
|
||||
m_rxBuffer.put(sample, control);
|
||||
|
||||
#if defined(RSSI_CHER_Chan) && defined(SEND_RSSI_DATA)
|
||||
m_rssiBuffer.put(ADC->ADC_CDR[RSSI_CDR_Chan]);
|
||||
#else
|
||||
m_rssiBuffer.put(0U);
|
||||
#endif
|
||||
|
||||
m_watchdog++;
|
||||
}
|
||||
|
@ -219,4 +225,3 @@ void CIO::setP25Int(bool on)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue