1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

[X3] Analog fixes

This commit is contained in:
Bertrand Songis 2019-03-13 15:47:30 +01:00
parent 1b964702eb
commit 1872d40978
2 changed files with 6 additions and 11 deletions

View file

@ -53,9 +53,6 @@
#define FIRST_ANALOG_ADC 0
#define NUM_ANALOGS_ADC 10
#define NUM_ANALOGS_ADC_EXT (NUM_ANALOGS - 10)
#elif defined(PCBX3)
#define FIRST_ANALOG_ADC 0
#define NUM_ANALOGS_ADC NUM_ANALOGS
#else
#define FIRST_ANALOG_ADC 0
#define NUM_ANALOGS_ADC NUM_ANALOGS
@ -93,7 +90,7 @@ void adcInit()
ADC_MAIN->CR1 = ADC_CR1_SCAN;
ADC_MAIN->CR2 = ADC_CR2_ADON | ADC_CR2_DMA | ADC_CR2_DDS;
ADC_MAIN->SQR1 = (NUM_ANALOGS_ADC-1) << 20; // bits 23:20 = number of conversions
ADC_MAIN->SQR1 = (NUM_ANALOGS_ADC - 1) << 20; // bits 23:20 = number of conversions
#if defined(PCBX10)
if (STICKS_PWM_ENABLED()) {