stm32: adc_common_v2: Make EXTSEL and ALIGN definitions per chip
STM32G4 uses v2 ADC but has EXTSEL and ALIGN fields modified, rather than making a v3 ADC for these minor changes, the definitions have been moved to the chip specific headers, so that the common code can work for G4 onwards.
This commit is contained in:
@@ -57,6 +57,16 @@
|
||||
#define ADC_CALFACT(adc) MMIO32((adc) + 0xB4)
|
||||
|
||||
/* Register values */
|
||||
/* ADC_CFGR1 Values ---------------------------------------------------------*/
|
||||
|
||||
/** ALIGN: Data alignment */
|
||||
#define ADC_CFGR1_ALIGN (1 << 5)
|
||||
|
||||
/* EXTSEL[2:0]: External trigger selection for regular group */
|
||||
#define ADC_CFGR1_EXTSEL_SHIFT 6
|
||||
#define ADC_CFGR1_EXTSEL (0x7 << ADC_CFGR1_EXTSEL_SHIFT)
|
||||
#define ADC_CFGR1_EXTSEL_VAL(x) ((x) << ADC_CFGR1_EXTSEL_SHIFT)
|
||||
|
||||
/* ADC_CFGR2 Values ---------------------------------------------------------*/
|
||||
|
||||
#define ADC_CFGR2_CKMODE_SHIFT 30
|
||||
|
||||
Reference in New Issue
Block a user