fix hall driver??
This commit is contained in:
parent
736cd974ad
commit
488e6ea813
@ -34,7 +34,7 @@ void ADCConfig(void) {
|
|||||||
ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
|
ADC_InitStructure.ADC_ContinuousConvMode = DISABLE;
|
||||||
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigInjecConv_None;
|
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigInjecConv_None;
|
||||||
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
|
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
|
||||||
ADC_InitStructure.ADC_NbrOfChannel = 2;
|
ADC_InitStructure.ADC_NbrOfChannel = 4;
|
||||||
ADC_Init(ADC1, &ADC_InitStructure);
|
ADC_Init(ADC1, &ADC_InitStructure);
|
||||||
|
|
||||||
ADC_InjectedSequencerLengthConfig(ADC1, 4);
|
ADC_InjectedSequencerLengthConfig(ADC1, 4);
|
||||||
@ -72,8 +72,4 @@ void ADC1_IRQHandler() {
|
|||||||
adcFlag = 1;
|
adcFlag = 1;
|
||||||
ADC_ClearITPendingBit(ADC1, ADC_IT_JEOC);
|
ADC_ClearITPendingBit(ADC1, ADC_IT_JEOC);
|
||||||
}
|
}
|
||||||
if (ADC_GetITStatus(ADC1, ADC_IT_JEOC) == SET) {
|
|
||||||
adcFlag = 1;
|
|
||||||
ADC_ClearITPendingBit(ADC1, ADC_IT_JEOC);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user