diff --git a/src/main.c b/src/main.c index 1c17f4f..3b8367b 100644 --- a/src/main.c +++ b/src/main.c @@ -86,9 +86,7 @@ static const char *usb_strings[] = { static bool paused = true; void sys_tick_handler(void) { - if (paused) return; - step6502(); - gpio_toggle(GPIOC, GPIO13); + // TODO: measure frequency } @@ -202,7 +200,13 @@ int main(void) reset6502(); - while (1) + while (1) { usbd_poll(usbd_dev); + + if (!paused) { + step6502(); + gpio_toggle(GPIOC, GPIO13); + } + } }