fixed DMA channels / flags for taranis targets

This commit is contained in:
Raphael Coeffic
2021-07-31 18:46:41 +02:00
parent f1fd6dde02
commit f77d236978
3 changed files with 11 additions and 13 deletions
+4 -1
View File
@@ -147,13 +147,16 @@ bool adcRead()
uint16_t getRTCBatteryVoltage()
{
#if defined(TX_RTC_VOLTAGE)
#if defined(HAS_TX_RTC_VOLTAGE)
return (getAnalogValue(TX_RTC_VOLTAGE) * ADC_VREF_PREC2) / 2048;
#elif defined(PCBX10)
return (rtcBatteryVoltage * 2 * ADC_VREF_PREC2) / 2048;
#elif defined(PCBNV14)
#warning "TODO RTC voltage"
return 330;
#else
#warning "RTC battery not supported on this target"
return 0;
#endif
}