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
658efaee17
commit
2c02a4b89f
@@ -233,8 +233,8 @@ void Config::init()
|
|||||||
esc_hack = true;
|
esc_hack = true;
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL
|
#ifdef CONFIG_SERIAL
|
||||||
if ( Koptions::o()->opt(Koptions::F_serial_esc)
|
if ( /*Koptions::o()->opt(Koptions::F_serial_esc)
|
||||||
&& !Koptions::o()->opt(Koptions::F_noserial)
|
&&*/ !Koptions::o()->opt(Koptions::F_noserial)
|
||||||
# ifdef CONFIG_KDB
|
# ifdef CONFIG_KDB
|
||||||
&& Koptions::o()->opt(Koptions::F_nokdb)
|
&& Koptions::o()->opt(Koptions::F_nokdb)
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ IMPLEMENTATION [debug && serial && !ux]:
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "kernel_console.h"
|
#include "kernel_console.h"
|
||||||
#include "keycodes.h"
|
#include "keycodes.h"
|
||||||
|
#include "koptions.h"
|
||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
|
|
||||||
static Vkey::Echo_type vkey_echo;
|
static Vkey::Echo_type vkey_echo;
|
||||||
@@ -116,7 +117,7 @@ Vkey::check_()
|
|||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (c == KEY_ESC)
|
if ((c == KEY_ESC) && (Koptions::o()->opt(Koptions::F_serial_esc)))
|
||||||
{
|
{
|
||||||
ret = 0; // break into kernel debugger
|
ret = 0; // break into kernel debugger
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user