mirror of
https://github.com/ttrftech/NanoVNA.git
synced 2026-04-06 15:04:35 +00:00
work touch menu operation
This commit is contained in:
parent
8038df8c66
commit
0bf87f42aa
4 changed files with 261 additions and 139 deletions
5
adc.c
5
adc.c
|
|
@ -54,7 +54,7 @@ void adc_start_analog_watchdogd(ADC_TypeDef *adc, uint32_t chsel)
|
|||
is enabled.*/
|
||||
adc->ISR = adc->ISR;
|
||||
adc->IER = ADC_IER_AWDIE;
|
||||
adc->TR = ADC_TR(0, 2000);
|
||||
adc->TR = ADC_TR(0, TOUCH_THRESHOLD);
|
||||
adc->SMPR = ADC_SMPR_SMP_1P5;
|
||||
adc->CHSELR = chsel;
|
||||
|
||||
|
|
@ -92,8 +92,7 @@ void adc_interrupt(ADC_TypeDef *adc)
|
|||
}
|
||||
if (isr & ADC_ISR_AWD) {
|
||||
/* Analog watchdog error.*/
|
||||
extern int awd_count;
|
||||
awd_count++;
|
||||
handle_touch_interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue