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
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
2148903b
Commit
2148903b
authored
Jul 11, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move shell.h to include and add defines for running GUI and STAT logs
parent
061364a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
shell.h
include/shell.h
+6
-0
cmd_gui.c
shell/cmd_gui.c
+2
-4
wrc_main.c
wrc_main.c
+7
-5
No files found.
shell
/shell.h
→
include
/shell.h
View file @
2148903b
#ifndef __SHELL_H
#define __SHELL_H
#define UI_SHELL_MODE 0
#define UI_GUI_MODE 1
#define UI_STAT_MODE 2
extern
int
wrc_ui_mode
;
const
char
*
fromhex
(
const
char
*
hex
,
int
*
v
);
const
char
*
fromdec
(
const
char
*
dec
,
int
*
v
);
...
...
shell/cmd_gui.c
View file @
2148903b
...
...
@@ -5,10 +5,8 @@
#include "shell.h"
extern
int
wrc_gui_mode
;
int
cmd_gui
(
const
char
*
args
[])
{
wrc_
gui_mode
=
1
;
wrc_
ui_mode
=
UI_GUI_MODE
;
return
0
;
}
\ No newline at end of file
}
wrc_main.c
View file @
2148903b
...
...
@@ -14,10 +14,13 @@
//#include "eeprom.h"
#include "softpll_ng.h"
#include "onewire.h"
#include "shell.h"
#include "lib/ipv4.h"
#include "wrc_ptp.h"
int
wrc_ui_mode
=
0
;
///////////////////////////////////
//Calibration data (from EEPROM if available)
#ifdef WRPC_MASTER
...
...
@@ -99,13 +102,12 @@ int wrc_check_link()
}
int
wrc_extra_debug
=
0
;
int
wrc_gui_mode
=
0
;
void
wrc_debug_printf
(
int
subsys
,
const
char
*
fmt
,
...)
{
va_list
ap
;
if
(
wrc_
g
ui_mode
)
return
;
if
(
wrc_ui_mode
)
return
;
va_start
(
ap
,
fmt
);
...
...
@@ -122,13 +124,13 @@ int wrc_man_phase = 0;
static
void
ui_update
()
{
if
(
wrc_
gui_mode
)
if
(
wrc_
ui_mode
==
UI_GUI_MODE
)
{
wrc_mon_gui
();
if
(
uart_read_byte
()
==
27
)
{
shell_init
();
wrc_
gui_mode
=
0
;
wrc_
ui_mode
=
UI_SHELL_MODE
;
}
}
else
...
...
@@ -139,7 +141,7 @@ static void ui_update()
int
main
(
void
)
{
wrc_extra_debug
=
1
;
wrc_
gui_mode
=
0
;
wrc_
ui_mode
=
UI_SHELL_MODE
;
wrc_initialize
();
shell_init
();
...
...
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