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
83
Issues
83
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
2ad9921c
Commit
2ad9921c
authored
Mar 31, 2020
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[HAL/leds] reset port leds when rebooting (or catching other SIG)
parent
99c0c2bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
hal_main.c
userspace/wrsw_hal/hal_main.c
+3
-0
hal_port_leds.c
userspace/wrsw_hal/hal_port_leds.c
+1
-1
hal_port_leds.h
userspace/wrsw_hal/hal_port_leds.h
+1
-1
hal_ports.c
userspace/wrsw_hal/hal_ports.c
+1
-1
No files found.
userspace/wrsw_hal/hal_main.c
View file @
2ad9921c
...
...
@@ -98,6 +98,9 @@ static void sighandler(int sig)
shw_io_write
(
shw_io_led_state_o
,
1
);
shw_io_write
(
shw_io_led_state_g
,
0
);
// Reset all port leds
led_clear_all_ports
();
call_cleanup_cbs
();
exit
(
0
);
}
...
...
userspace/wrsw_hal/hal_port_leds.c
View file @
2ad9921c
...
...
@@ -31,7 +31,7 @@ int led_get_blink_state(void) {
return
led_blink_state
;
}
void
led_
init_all_ports
(
struct
hal_port_state
*
ps
)
{
void
led_
clear_all_ports
(
void
)
{
int
i
;
// Clear data
...
...
userspace/wrsw_hal/hal_port_leds.h
View file @
2ad9921c
...
...
@@ -19,7 +19,7 @@
/* Prototypes */
extern
void
led_blink_state_change
(
void
);
extern
void
led_
init_all_ports
(
struct
hal_port_state
*
ps
);
extern
void
led_
clear_all_ports
(
void
);
extern
void
led_set_wrmode
(
int
portIndex
,
int
val
);
extern
void
led_link_update
(
struct
hal_port_state
*
port
);
extern
void
led_set_synched
(
int
portIndex
,
int
val
);
...
...
userspace/wrsw_hal/hal_ports.c
View file @
2ad9921c
...
...
@@ -260,7 +260,7 @@ int hal_port_shmem_init(char *logfilename)
hal_port_state_fsm_init_all
(
halPorts
.
ports
,
&
halPorts
.
globalLpdc
);
// Init main port FSM for all ports
led_
init_all_ports
(
halPorts
.
ports
);
// Reset all leds
led_
clear_all_ports
(
);
// Reset all leds
halPorts
.
numberOfPorts
=
index
;
pr_info
(
"Number of physical ports supported in HW: %d
\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