stm32/stm32_adc.c fix clang warning

chip/stm32_adc.c:2529:32: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
setbits = ADC_CCR_DUAL_IND | ADC_CCR_DELAY(0) | ADC_CCR_MDMA_DISABLED |
^~~~~~~~~~~~~~~~
This commit is contained in:
raiden00pl 2022-11-02 18:53:30 +01:00 committed by Alan Carvalho de Assis
parent 85f727f232
commit ef517ed05c
1 changed files with 1 additions and 1 deletions

View File

@ -2526,7 +2526,7 @@ static void adc_common_cfg(struct stm32_dev_s *priv)
clrbits = ADC_CCR_DUAL_MASK | ADC_CCR_DELAY_MASK | ADC_CCR_DMACFG |
ADC_CCR_MDMA_MASK | ADC_CCR_CKMODE_MASK | ADC_CCR_VREFEN |
ADC_CCR_TSEN | ADC_CCR_VBATEN;
setbits = ADC_CCR_DUAL_IND | ADC_CCR_DELAY(0) | ADC_CCR_MDMA_DISABLED |
setbits = ADC_CCR_DUAL_IND | ADC_CCR_DELAY(1) | ADC_CCR_MDMA_DISABLED |
ADC_CCR_CKMODE_ASYNCH;
adccmn_modifyreg(priv, STM32_ADC_CCR_OFFSET, clrbits, setbits);