Exec request within IRQ

This commit is contained in:
7u83 2024-05-26 16:10:33 +02:00
parent fdff359ec3
commit 55f04968df
3 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,5 @@
-include defs.mak
SDCC ?= sdcc SDCC ?= sdcc
SDAR ?= sdar SDAR ?= sdar
STCCODESIZE ?= 8192 STCCODESIZE ?= 8192

@ -1 +1 @@
Subproject commit 30f410891cec7c2ccdae1aa3b6061618ce93c801 Subproject commit e7b50704d0903d516bb4ffa2839eb13acebea73c

View File

@ -6,7 +6,7 @@ uint8_t pinsh_buf[PINSH_BUF_SIZE];
volatile int pinsh_buf_pos=0; volatile int pinsh_buf_pos=0;
void pinsh_irq_handler() void pinsh_uart_irq_handler()
{ {
if (RI) { if (RI) {
unsigned char b = SBUF; 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) static void pinsh_exec_p(const char *cmd)
{ {
if (!cmd[0]){ if (!cmd[0]){
show_stat(); show_stat();
return; return;
@ -161,6 +160,11 @@ static void pinsh_exec_p(const char *cmd)
void pinsh_exec(const char *cmd) void pinsh_exec(const char *cmd)
{ {
pinsh_output("\r\n");
if(cmd[0]=='p') if(cmd[0]=='p')
pinsh_exec_p(cmd+1); pinsh_exec_p(cmd+1);
pinsh_buf_pos=0;
} }