From 55f04968df1d1023af9bcb8347a5e87de80f6210 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Sun, 26 May 2024 16:10:33 +0200 Subject: [PATCH] Exec request within IRQ --- Makefile | 2 ++ mc8051fun | 2 +- pinsh.c | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 00d9fa5..72eb6b4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +-include defs.mak + SDCC ?= sdcc SDAR ?= sdar STCCODESIZE ?= 8192 diff --git a/mc8051fun b/mc8051fun index 30f4108..e7b5070 160000 --- a/mc8051fun +++ b/mc8051fun @@ -1 +1 @@ -Subproject commit 30f410891cec7c2ccdae1aa3b6061618ce93c801 +Subproject commit e7b50704d0903d516bb4ffa2839eb13acebea73c diff --git a/pinsh.c b/pinsh.c index 220936a..d029051 100644 --- a/pinsh.c +++ b/pinsh.c @@ -6,7 +6,7 @@ uint8_t pinsh_buf[PINSH_BUF_SIZE]; volatile int pinsh_buf_pos=0; -void pinsh_irq_handler() +void pinsh_uart_irq_handler() { if (RI) { unsigned char b = SBUF; @@ -134,7 +134,6 @@ static void assign_port(int n, const char*cmd) static void pinsh_exec_p(const char *cmd) { - if (!cmd[0]){ show_stat(); return; @@ -161,6 +160,11 @@ static void pinsh_exec_p(const char *cmd) void pinsh_exec(const char *cmd) { + pinsh_output("\r\n"); + if(cmd[0]=='p') pinsh_exec_p(cmd+1); + + + pinsh_buf_pos=0; }