adc tested and working

This commit is contained in:
true 2026-05-08 17:48:27 -07:00
parent d280037880
commit 180aa589ee

View File

@ -173,7 +173,8 @@ int main(void)
} }
// stay a while // 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) __attribute__((interrupt("WCH-Interrupt-fast")));
void AWU_IRQHandler(void) void AWU_IRQHandler(void)
{ {
// clear interrupt flag
EXTI_ClearFlag(EXTI_Line27);
// SetSysClock_HSI(HCLK_24MHZ);
cnt++; cnt++;
if (cnt >= 1000) { if (cnt >= 1000) {
cnt = 0; cnt = 0;
@ -196,11 +202,7 @@ void AWU_IRQHandler(void)
matrix_send(); matrix_send();
// handle ADC // handle ADC
adc_next();
// handle buttons // handle buttons
// do we sleep?
// clear interrupt
EXTI_ClearFlag(EXTI_Line27);
} }