Problem with masks in MDR32F9Qx_adc.h
vitkorob opened this issue · comments
Some macro are wrong in MDR32F9Qx_adc.h. assert_param triggered when the right data input.
Now:
#define IS_ADC1_CH_MASK(MASK) ((((MASK) & ~ADC2_ALL_CH_MSK) == 0) || \
((MASK) == ADC_CH_INT_VREF_MSK) || \
((MASK) == ADC_CH_TEMP_SENSOR_MSK))
Must be:
#define IS_ADC1_CH_MASK(MASK) (((MASK) & ~ADC1_ALL_CH_MSK) == 0)
Now:
#define IS_ADCx_CONFIG_IT(IT) (((IT) == ADCx_IT_OUT_OF_RANGE ) || \
((IT) == ADCx_IT_END_OF_CONVERSION))
Must be:
#define ADCx_ALL_IT_MSK (ADCx_IT_OUT_OF_RANGE | \
ADCx_IT_END_OF_CONVERSION)
#define IS_ADCx_CONFIG_IT(IT) (((IT) & ~ADCx_ALL_IT_MSK) == 0)
@vitkorob Please open the pull request.