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
7
Merge Requests
7
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
dc68323e
Commit
dc68323e
authored
Apr 05, 2022
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add optional command calibration show
parent
c948de4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
Kconfig
Kconfig
+8
-0
cmd_calib.c
shell/cmd_calib.c
+21
-0
No files found.
Kconfig
View file @
dc68323e
...
...
@@ -310,6 +310,14 @@ config GENSDBFS
This option adds _sdb fs_ command to write empty SDBFS filesystem
image in Flash/EEPROM.
config CMD_CALIBRATION_SHOW
depends on WR_NODE
boolean "Add command to print all calibration values"
default n
help
Adds an "show" to the calibration command to print all
calibration values.
config VLAN
depends on WR_NODE
boolean "Filter and rx/tx frames in a VLAN (as opposed to untagged)"
...
...
shell/cmd_calib.c
View file @
dc68323e
...
...
@@ -50,7 +50,28 @@ static int cmd_calibration(const char *args[])
args
[
1
],
(
unsigned
int
)
param
,
value
);
storage_set_calibration_parameter
(
param
,
value
);
}
#ifdef CONFIG_CMD_CALIBRATION_SHOW
else
if
(
!
strcmp
(
args
[
0
],
"show"
))
{
wrc_cal_data_t
*
cal
;
unsigned
i
;
if
(
!
storage_is_calibration_loaded
())
{
pp_printf
(
"calibrations not loaded
\n
"
);
return
0
;
}
cal
=
storage_get_calibration_data
();
pp_printf
(
"%u params:
\n
"
,
(
unsigned
)
cal
->
param_count
);
for
(
i
=
0
;
i
<
cal
->
param_count
;
i
++
)
{
unsigned
id
=
cal
->
params
[
i
].
id
;
pp_printf
(
" %c%c%c%c = %u
\n
"
,
(
id
>>
24
)
&
0xff
,
(
id
>>
16
)
&
0xff
,
(
id
>>
8
)
&
0xff
,
(
id
>>
0
)
&
0xff
,
(
unsigned
)
cal
->
params
[
i
].
value
);
}
}
#endif
}
else
if
(
!
args
[
0
])
{
if
(
storage_phtrans
(
&
trans
,
0
)
>
0
)
{
pp_printf
(
"Found phase transition in EEPROM: %dps
\n
"
,
...
...
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