Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Software for White Rabbit PTP Core
Manage
Activity
Members
Labels
Plan
Issues
39
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Software for White Rabbit PTP Core
Commits
2148903b
There was an error fetching the commit references. Please try again later.
Commit
2148903b
authored
12 years ago
by
Grzegorz Daniluk
Browse files
Options
Downloads
Patches
Plain Diff
move shell.h to include and add defines for running GUI and STAT logs
parent
061364a8
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/shell.h
+6
-0
6 additions, 0 deletions
include/shell.h
shell/cmd_gui.c
+2
-4
2 additions, 4 deletions
shell/cmd_gui.c
wrc_main.c
+7
-5
7 additions, 5 deletions
wrc_main.c
with
15 additions
and
9 deletions
shell
/shell.h
→
include
/shell.h
+
6
−
0
View file @
2148903b
#ifndef __SHELL_H
#ifndef __SHELL_H
#define __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
*
fromhex
(
const
char
*
hex
,
int
*
v
);
const
char
*
fromdec
(
const
char
*
dec
,
int
*
v
);
const
char
*
fromdec
(
const
char
*
dec
,
int
*
v
);
...
...
This diff is collapsed.
Click to expand it.
shell/cmd_gui.c
+
2
−
4
View file @
2148903b
...
@@ -5,10 +5,8 @@
...
@@ -5,10 +5,8 @@
#include
"shell.h"
#include
"shell.h"
extern
int
wrc_gui_mode
;
int
cmd_gui
(
const
char
*
args
[])
int
cmd_gui
(
const
char
*
args
[])
{
{
wrc_
g
ui_mode
=
1
;
wrc_ui_mode
=
UI_GUI_MODE
;
return
0
;
return
0
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wrc_main.c
+
7
−
5
View file @
2148903b
...
@@ -14,10 +14,13 @@
...
@@ -14,10 +14,13 @@
//#include "eeprom.h"
//#include "eeprom.h"
#include
"softpll_ng.h"
#include
"softpll_ng.h"
#include
"onewire.h"
#include
"onewire.h"
#include
"shell.h"
#include
"lib/ipv4.h"
#include
"lib/ipv4.h"
#include
"wrc_ptp.h"
#include
"wrc_ptp.h"
int
wrc_ui_mode
=
0
;
///////////////////////////////////
///////////////////////////////////
//Calibration data (from EEPROM if available)
//Calibration data (from EEPROM if available)
#ifdef WRPC_MASTER
#ifdef WRPC_MASTER
...
@@ -99,13 +102,12 @@ int wrc_check_link()
...
@@ -99,13 +102,12 @@ int wrc_check_link()
}
}
int
wrc_extra_debug
=
0
;
int
wrc_extra_debug
=
0
;
int
wrc_gui_mode
=
0
;
void
wrc_debug_printf
(
int
subsys
,
const
char
*
fmt
,
...)
void
wrc_debug_printf
(
int
subsys
,
const
char
*
fmt
,
...)
{
{
va_list
ap
;
va_list
ap
;
if
(
wrc_
g
ui_mode
)
return
;
if
(
wrc_ui_mode
)
return
;
va_start
(
ap
,
fmt
);
va_start
(
ap
,
fmt
);
...
@@ -122,13 +124,13 @@ int wrc_man_phase = 0;
...
@@ -122,13 +124,13 @@ int wrc_man_phase = 0;
static
void
ui_update
()
static
void
ui_update
()
{
{
if
(
wrc_
g
ui_mode
)
if
(
wrc_ui_mode
==
UI_GUI_MODE
)
{
{
wrc_mon_gui
();
wrc_mon_gui
();
if
(
uart_read_byte
()
==
27
)
if
(
uart_read_byte
()
==
27
)
{
{
shell_init
();
shell_init
();
wrc_
g
ui_mode
=
0
;
wrc_ui_mode
=
UI_SHELL_MODE
;
}
}
}
}
else
else
...
@@ -139,7 +141,7 @@ static void ui_update()
...
@@ -139,7 +141,7 @@ static void ui_update()
int
main
(
void
)
int
main
(
void
)
{
{
wrc_extra_debug
=
1
;
wrc_extra_debug
=
1
;
wrc_
g
ui_mode
=
0
;
wrc_ui_mode
=
UI_SHELL_MODE
;
wrc_initialize
();
wrc_initialize
();
shell_init
();
shell_init
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment