VF PROJET A ENVOYER
This commit is contained in:
parent
38722b033e
commit
1dba92b392
1 changed files with 0 additions and 9 deletions
|
|
@ -15,8 +15,6 @@ void MyADC_Init(ADC_TypeDef *ADC, char channel){
|
||||||
}
|
}
|
||||||
|
|
||||||
void start_conversion(ADC_TypeDef *ADC){
|
void start_conversion(ADC_TypeDef *ADC){
|
||||||
//ADC->CR2 |= ADC_CR2_EXTSEL;
|
|
||||||
//ADC->CR2 |= ADC_CR2_EXTTRIG; // Permettre le démarage externe
|
|
||||||
ADC->CR2 |= ADC_CR2_SWSTART; // demander une conversion externe
|
ADC->CR2 |= ADC_CR2_SWSTART; // demander une conversion externe
|
||||||
//Si on veut faire par scrutation et non par intéruption, laisser les lignes suivantes
|
//Si on veut faire par scrutation et non par intéruption, laisser les lignes suivantes
|
||||||
//while(!(ADC->SR & ADC_SR_EOC)); // attendre la fin (EOC = 1)
|
//while(!(ADC->SR & ADC_SR_EOC)); // attendre la fin (EOC = 1)
|
||||||
|
|
@ -35,10 +33,3 @@ void ADC1_2_IRQHandler(void){
|
||||||
ADC1->CR1 &=~ ADC_SR_EOC;
|
ADC1->CR1 &=~ ADC_SR_EOC;
|
||||||
ptr_function();
|
ptr_function();
|
||||||
}
|
}
|
||||||
|
|
||||||
//void Set_samp_ts(ADC_TypeDef *ADC, int Rain){
|
|
||||||
// float ts;
|
|
||||||
// float cylcle;
|
|
||||||
// ts = 9.010913347*(Rain +1000.00)*0.000000000008;
|
|
||||||
// cycle = ts*12/0.000001;
|
|
||||||
// ADC->SMPR1 |=
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue