mirror of
https://github.com/satoshinm/pill_6502.git
synced 2024-12-28 23:30:30 +00:00
Step 6502 CPU while polling for USB between each instruction
This commit is contained in:
parent
173981df79
commit
e99cb9b068
12
src/main.c
12
src/main.c
@ -86,9 +86,7 @@ static const char *usb_strings[] = {
|
|||||||
static bool paused = true;
|
static bool paused = true;
|
||||||
void sys_tick_handler(void)
|
void sys_tick_handler(void)
|
||||||
{
|
{
|
||||||
if (paused) return;
|
// TODO: measure frequency
|
||||||
step6502();
|
|
||||||
gpio_toggle(GPIOC, GPIO13);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -202,7 +200,13 @@ int main(void)
|
|||||||
|
|
||||||
reset6502();
|
reset6502();
|
||||||
|
|
||||||
while (1)
|
while (1) {
|
||||||
usbd_poll(usbd_dev);
|
usbd_poll(usbd_dev);
|
||||||
|
|
||||||
|
if (!paused) {
|
||||||
|
step6502();
|
||||||
|
gpio_toggle(GPIOC, GPIO13);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user