adc tested and working
This commit is contained in:
parent
d280037880
commit
180aa589ee
@ -173,7 +173,8 @@ int main(void)
|
||||
}
|
||||
|
||||
// stay a while
|
||||
__WFI();
|
||||
// __WFI();
|
||||
PWR_EnterSTANDBYMode();
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,6 +182,11 @@ int main(void)
|
||||
void AWU_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void AWU_IRQHandler(void)
|
||||
{
|
||||
// clear interrupt flag
|
||||
EXTI_ClearFlag(EXTI_Line27);
|
||||
|
||||
// SetSysClock_HSI(HCLK_24MHZ);
|
||||
|
||||
cnt++;
|
||||
if (cnt >= 1000) {
|
||||
cnt = 0;
|
||||
@ -196,11 +202,7 @@ void AWU_IRQHandler(void)
|
||||
matrix_send();
|
||||
|
||||
// handle ADC
|
||||
adc_next();
|
||||
|
||||
// handle buttons
|
||||
|
||||
// do we sleep?
|
||||
|
||||
// clear interrupt
|
||||
EXTI_ClearFlag(EXTI_Line27);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user