Compilation fixes
This commit is contained in:
@@ -96,7 +96,7 @@ void adcInit()
|
||||
ADC1->SQR2 = (ADC_CHANNEL_POT4<<0) + (ADC_CHANNEL_SLIDER3<<5) + (ADC_CHANNEL_SLIDER4<<10) + (ADC_CHANNEL_BATT<<15); // conversions 7 and more
|
||||
ADC1->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT2<<20) + (ADC_CHANNEL_POT3<<25); // conversions 1 to 6
|
||||
#else
|
||||
ADC1->SQR2 = (ADC_CHANNEL_POT3<<0) + (SLIDER1<<5) + (SLIDER2<<10) + (BATTERY<<15); // conversions 7 and more
|
||||
ADC1->SQR2 = (ADC_CHANNEL_POT3<<0) + (ADC_CHANNEL_SLIDER1<<5) + (ADC_CHANNEL_SLIDER2<<10) + (ADC_CHANNEL_BATT<<15); // conversions 7 and more
|
||||
ADC1->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<20) + (ADC_CHANNEL_POT2<<25); // conversions 1 to 6
|
||||
#endif
|
||||
ADC1->SMPR1 = SAMPTIME + (SAMPTIME<<3) + (SAMPTIME<<6) + (SAMPTIME<<9) + (SAMPTIME<<12) + (SAMPTIME<<15) + (SAMPTIME<<18) + (SAMPTIME<<21) + (SAMPTIME<<24);
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
#define ADC_GPIO_PIN_BATT GPIO_Pin_0 // PC.00
|
||||
#define ADC_CHANNEL_POT1 ADC_Channel_6
|
||||
#define ADC_CHANNEL_POT2 ADC_Channel_8
|
||||
#define ADC_CHANNEL_POT3 ADC_Channel_9
|
||||
#define ADC_CHANNEL_SLIDER1 ADC_Channel_14
|
||||
#define ADC_CHANNEL_SLIDER2 ADC_Channel_15
|
||||
#define ADC_CHANNEL_BATT ADC_Channel_10
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f2xx.h"
|
||||
#include "../../CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h"
|
||||
|
||||
/** @addtogroup STM32F2xx_StdPeriph_Driver
|
||||
* @{
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f4xx.h"
|
||||
#include "../../CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||
|
||||
/** @addtogroup STM32F4xx_StdPeriph_Driver
|
||||
* @{
|
||||
|
||||
Reference in New Issue
Block a user