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
f9e8b825
Commit
f9e8b825
authored
Apr 20, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: store information whether SFP was found in DB
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
54593958
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
sfp.c
dev/sfp.c
+1
-0
sfp.h
include/sfp.h
+3
-0
cmd_sfp.c
shell/cmd_sfp.c
+4
-1
No files found.
dev/sfp.c
View file @
f9e8b825
...
...
@@ -19,6 +19,7 @@
int32_t
sfp_alpha
=
73622176
;
/* default values if could not read EEPROM */
int32_t
sfp_deltaTx
=
0
;
int32_t
sfp_deltaRx
=
0
;
int32_t
sfp_in_db
=
0
;
int
sfp_present
(
void
)
{
...
...
include/sfp.h
View file @
f9e8b825
...
...
@@ -10,7 +10,10 @@
#include <stdint.h>
#define SFP_PN_LEN 16
#define SFP_NOT_MATCHED 1
#define SFP_MATCHED 2
extern
int32_t
sfp_in_db
;
extern
int32_t
sfp_alpha
;
extern
int32_t
sfp_deltaTx
;
extern
int32_t
sfp_deltaRx
;
...
...
shell/cmd_sfp.c
View file @
f9e8b825
...
...
@@ -106,8 +106,11 @@ static int cmd_sfp(const char *args[])
sfp_deltaTx
=
sfp
.
dTx
;
sfp_deltaRx
=
sfp
.
dRx
;
sfp_alpha
=
sfp
.
alpha
;
}
else
sfp_in_db
=
SFP_MATCHED
;
}
else
{
pp_printf
(
"Could not match to DB
\n
"
);
sfp_in_db
=
SFP_NOT_MATCHED
;
}
return
0
;
}
else
if
(
args
[
0
]
&&
!
strcasecmp
(
args
[
0
],
"ena"
))
{
if
(
!
args
[
1
])
...
...
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