FOC: Fetch serial input without '-serial_esc' option
With this patch, the kernel fetches serial data also when the '-serial_esc' option is not set. To keep the patch minimally invasive, the 'serial ESC' functionality gets enabled by default and the existence of the '-serial_esc' argument gets only checked when an ESC character was received and the decision of entering the kernel debugger or not needs to be made. Fixes ssumpf/foc#3.
This commit is contained in:
committed by
Sebastian Sumpf
parent
fded832001
commit
6c831301d9
@@ -246,8 +246,8 @@ void Config::init()
|
||||
esc_hack = true;
|
||||
|
||||
#ifdef CONFIG_SERIAL
|
||||
if ( Koptions::o()->opt(Koptions::F_serial_esc)
|
||||
&& !Koptions::o()->opt(Koptions::F_noserial)
|
||||
if ( /*Koptions::o()->opt(Koptions::F_serial_esc)
|
||||
&&*/ !Koptions::o()->opt(Koptions::F_noserial)
|
||||
# ifdef CONFIG_KDB
|
||||
&& Koptions::o()->opt(Koptions::F_nokdb)
|
||||
# endif
|
||||
|
||||
@@ -31,6 +31,7 @@ IMPLEMENTATION [debug && serial && !ux]:
|
||||
#include "globals.h"
|
||||
#include "kernel_console.h"
|
||||
#include "keycodes.h"
|
||||
#include "koptions.h"
|
||||
#include "uart.h"
|
||||
|
||||
static Vkey::Echo_type vkey_echo;
|
||||
@@ -116,7 +117,7 @@ Vkey::check_()
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
if (c == KEY_ESC)
|
||||
if ((c == KEY_ESC) && (Koptions::o()->opt(Koptions::F_serial_esc)))
|
||||
{
|
||||
ret = 0; // break into kernel debugger
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user