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
9b4c6728
Commit
9b4c6728
authored
Jul 10, 2020
by
Tomasz Wlostowski
Committed by
Grzegorz Daniluk
Oct 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: calibration command now allows to read/set all calibration parameters
parent
b6fb96aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
cmd_calib.c
shell/cmd_calib.c
+26
-4
No files found.
shell/cmd_calib.c
View file @
9b4c6728
...
...
@@ -24,10 +24,32 @@ static int cmd_calibration(const char *args[])
{
uint32_t
trans
;
if
(
args
[
0
]
&&
!
strcasecmp
(
args
[
0
],
"force"
))
{
if
(
measure_t24p
(
&
trans
)
<
0
)
return
-
1
;
return
storage_phtrans
(
&
trans
,
1
);
if
(
args
[
0
])
{
if
(
!
strcasecmp
(
args
[
0
],
"force"
))
{
if
(
measure_t24p
(
&
trans
)
<
0
)
return
-
1
;
return
storage_phtrans
(
&
trans
,
1
);
}
else
if
(
!
strcasecmp
(
args
[
0
],
"load"
)
)
{
storage_load_calibration
();
}
else
if
(
!
strcasecmp
(
args
[
0
],
"setp"
)
)
{
uint32_t
param
=
0
;
param
|=
((
uint32_t
)(
args
[
1
][
0
]))
<<
24
;
param
|=
((
uint32_t
)(
args
[
1
][
1
]))
<<
16
;
param
|=
((
uint32_t
)(
args
[
1
][
2
]))
<<
8
;
param
|=
((
uint32_t
)(
args
[
1
][
3
]))
<<
0
;
int
value
=
atoi
(
args
[
2
]);
pp_printf
(
"Setting calibration parameter %s [0x%x] to %d
\n
"
,
args
[
1
],
param
,
value
);
storage_set_calibration_parameter
(
param
,
value
);
}
}
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