Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
99
Issue boards
Milestones
Wiki
Code
Merge requests
4
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
White Rabbit Switch - Software
Commits
fac124a6
Commit
fac124a6
authored
12 years ago
by
Tomasz Wlostowski
Browse files
Options
Downloads
Patches
Plain Diff
userspace/libswitchhw: mega-cool LED slide on the startup, fixed null pointer strcmp() bug
parent
ebea1d8b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userspace/libswitchhw/i2c_sfp.c
+18
-1
18 additions, 1 deletion
userspace/libswitchhw/i2c_sfp.c
with
18 additions
and
1 deletion
userspace/libswitchhw/i2c_sfp.c
+
18
−
1
View file @
fac124a6
...
...
@@ -400,6 +400,23 @@ void shw_sfp_gpio_init(void)
i2c_transfer
(
bus
,
addr
+
i
,
2
,
0
,
conf_output
);
i2c_transfer
(
bus
,
addr
+
i
,
2
,
0
,
set_output
);
}
for
(
i
=
0
;
i
<
18
;
i
++
)
{
shw_sfp_set_led_synced
(
i
,
1
);
shw_udelay
(
7000
);
shw_sfp_set_led_link
(
i
,
1
);
shw_udelay
(
7000
);
}
for
(
i
=
0
;
i
<
18
;
i
++
)
{
shw_sfp_set_led_synced
(
i
,
0
);
shw_udelay
(
7000
);
shw_sfp_set_led_link
(
i
,
0
);
shw_udelay
(
7000
);
}
}
void
shw_sfp_gpio_set
(
int
num
,
uint8_t
state
)
...
...
@@ -566,7 +583,7 @@ int shw_sfp_read_db(char *filename)
sfp
=
malloc
(
sizeof
(
struct
shw_sfp_caldata
));
strcpy
(
sfp
->
part_num
,
sfp_pn
);
if
(
strcmp
(
sfp_vs
,
""
)
==
0
)
{
if
(
!
sfp_vs
||
strcmp
(
sfp_vs
,
""
)
==
0
)
{
sfp
->
vendor_serial
[
0
]
=
0
;
sfp
->
flags
|=
SFP_FLAG_CLASS_DATA
;
}
else
{
...
...
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