Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
d39a1c20
Commit
d39a1c20
authored
Sep 23, 2019
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: fix missing escape seuqences on faster UARTs
parent
b2edf852
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
shell.c
shell/shell.c
+17
-8
No files found.
shell/shell.c
View file @
d39a1c20
...
...
@@ -153,6 +153,7 @@ void shell_init()
int
shell_interactive
()
{
int
c
;
uint32_t
t_start
;
switch
(
state
)
{
case
SH_PROMPT
:
...
...
@@ -163,18 +164,26 @@ int shell_interactive()
return
1
;
case
SH_INPUT
:
c
=
console_getc
();
t_start
=
timer_get_tics
();
if
(
c
<
0
)
return
0
;
do
{
c
=
console_getc
()
;
if
(
c
==
27
||
((
current_key
&
ESCAPE_FLAG
)
&&
c
==
91
))
current_key
=
ESCAPE_FLAG
;
else
current_key
|=
c
;
if
(
c
<
0
&&
!
(
current_key
&
ESCAPE_FLAG
)
)
return
0
;
if
(
current_key
&
0xff
)
{
if
(
c
==
27
||
((
current_key
&
ESCAPE_FLAG
)
&&
c
==
91
))
{
current_key
=
ESCAPE_FLAG
;
}
else
{
current_key
|=
c
;
break
;
}
}
while
(
(
timer_get_tics
()
-
t_start
)
<
100
);
if
(
current_key
&
0xff
)
{
switch
(
current_key
)
{
case
KEY_LEFT
:
if
(
cmd_pos
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment