Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
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
White Rabbit Switch - Software
Commits
fac124a6
Commit
fac124a6
authored
Apr 19, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/libswitchhw: mega-cool LED slide on the startup, fixed null pointer strcmp() bug
parent
ebea1d8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
i2c_sfp.c
userspace/libswitchhw/i2c_sfp.c
+18
-1
No files found.
userspace/libswitchhw/i2c_sfp.c
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
{
...
...
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