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
4
Merge Requests
4
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
996c13fc
Commit
996c13fc
authored
Apr 23, 2020
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ertm14: started working on the UI monitor
parent
6f5b3eb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
cmd_ertm14.c
boards/ertm14/cmd_ertm14.c
+42
-0
No files found.
boards/ertm14/cmd_ertm14.c
View file @
996c13fc
...
...
@@ -316,12 +316,54 @@ static int cmd_ertm(const char *args[])
}
}
#define ERTM14_MON_REFRESH_PERIOD 1000 // ms
static
timeout_t
ertm14_mon_timer
;
static
int
ertm14_monitor_ui
()
{
if
(
!
tmo_expired
(
&
ertm14_mon_timer
))
return
0
;
uint32_t
ret
;
uint32_t
val
;
tmo_restart
(
&
ertm14_mon_timer
);
term_clear
();
cprintf
(
C_BLUE
,
"eRTM14/15 Board Monitor"
);
cprintf
(
C_GREY
,
"
\n
Esc = exit
\n\n
"
);
ret
=
diag_read_word
(
8
,
DIAG_RO_BANK
,
&
val
);
cprintf
(
C_GREY
,
"Streamer RX Count: "
);
cprintf
(
C_WHITE
,
"%d
\n
"
,
val
);
return
0
;
}
static
int
cmd_ertm_ui
(
const
char
*
args
[])
{
tmo_init
(
&
ertm14_mon_timer
,
ERTM14_MON_REFRESH_PERIOD
);
shell_activate_ui_command
(
ertm14_monitor_ui
);
return
0
;
}
DEFINE_WRC_COMMAND
(
ertm
)
=
{
.
name
=
"ertm"
,
.
exec
=
cmd_ertm
,
};
DEFINE_WRC_COMMAND
(
ertm_ui
)
=
{
.
name
=
"eu"
,
// fixme
.
exec
=
cmd_ertm_ui
,
};
void
ertm14_shell_init
()
{
shell_register_command
(
&
__wrc_cmd_ertm
);
shell_register_command
(
&
__wrc_cmd_ertm_ui
);
}
\ No newline at end of file
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