mirror of
https://github.com/satoshinm/pill_6502.git
synced 2024-06-14 06:29:29 +00:00
Change serial pause/resume command to 'p'
This commit is contained in:
parent
35ec39e13f
commit
f53c02b815
10
src/main.c
10
src/main.c
|
@ -83,10 +83,10 @@ static const char *usb_strings[] = {
|
||||||
"Pill 6502 UART Port",
|
"Pill 6502 UART Port",
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool running = false;
|
static bool paused = true;
|
||||||
void sys_tick_handler(void)
|
void sys_tick_handler(void)
|
||||||
{
|
{
|
||||||
if (!running) return;
|
if (paused) return;
|
||||||
step6502();
|
step6502();
|
||||||
gpio_toggle(GPIOC, GPIO13);
|
gpio_toggle(GPIOC, GPIO13);
|
||||||
}
|
}
|
||||||
|
@ -102,9 +102,9 @@ char *process_serial_command(char *buf, int len) {
|
||||||
|
|
||||||
if (buf[0] == 'v') {
|
if (buf[0] == 'v') {
|
||||||
return "Pill 6502 version " FIRMWARE_VERSION;
|
return "Pill 6502 version " FIRMWARE_VERSION;
|
||||||
} else if (buf[0] == 'r') {
|
} else if (buf[0] == 'p') {
|
||||||
running = !running;
|
paused = !paused;
|
||||||
return running ? "resumed" : "paused";
|
return paused ? "paused" : "resumed";
|
||||||
} else if (buf[0] == 't') {
|
} else if (buf[0] == 't') {
|
||||||
static char buf[64];
|
static char buf[64];
|
||||||
snprintf(buf, sizeof(buf), "%ld ticks\r\n%ld instructions", clockticks6502, instructions);
|
snprintf(buf, sizeof(buf), "%ld ticks\r\n%ld instructions", clockticks6502, instructions);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user