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
f81f75ed
Commit
f81f75ed
authored
Jul 08, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation warnings
parent
8e4e9093
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
20 deletions
+21
-20
shell.h
include/shell.h
+2
-2
storage.h
include/storage.h
+1
-0
wrc.h
include/wrc.h
+1
-0
glue.c
sdb-lib/glue.c
+1
-1
shell.c
shell/shell.c
+2
-2
wrc_main.c
wrc_main.c
+14
-15
No files found.
include/shell.h
View file @
f81f75ed
...
...
@@ -38,7 +38,7 @@ void shell_boot_script(void);
void
shell_show_build_init
(
void
);
void
shell_register_command
(
struct
wrc_shell_cmd
*
cmd
);
void
shell_list_cmds
(
void
);
void
shell_register_commands
();
void
shell_activate_ui_command
(
int
(
*
callback
)()
);
void
shell_register_commands
(
void
);
void
shell_activate_ui_command
(
int
(
*
callback
)(
void
)
);
#endif
include/storage.h
View file @
f81f75ed
...
...
@@ -139,6 +139,7 @@ int storage_load_calibration(void);
int
storage_save_calibration
(
void
);
int
storage_read_hdl_cfg
(
void
);
int
storage_mount
(
struct
storage_device
*
dev
);
#endif
include/wrc.h
View file @
f81f75ed
...
...
@@ -53,6 +53,7 @@
extern
int
wrc_vlan_number
;
int
wrc_mon_gui
(
void
);
int
wrc_log_stats
(
void
);
void
shell_init
(
void
);
/* Default width (in 8ns/16ns units) of the pulses on the PPS output */
...
...
sdb-lib/glue.c
View file @
f81f75ed
...
...
@@ -199,7 +199,7 @@ int sdbfs_open_name(struct sdbfs *fs, const char *name)
return
-
ENOENT
;
sdbfs_scan
(
fs
,
1
);
/* new scan: get the interconnect and igore it */
while
(
(
d
=
sdbfs_scan
(
fs
,
0
))
!=
NULL
)
{
if
(
strncmp
(
name
,
d
->
sdb_component
.
product
.
name
,
len
))
if
(
strncmp
(
name
,
(
char
*
)
d
->
sdb_component
.
product
.
name
,
len
))
continue
;
if
(
len
<
19
&&
d
->
sdb_component
.
product
.
name
[
len
]
!=
' '
)
continue
;
...
...
shell/shell.c
View file @
f81f75ed
...
...
@@ -50,7 +50,7 @@ static struct wrc_shell_cmd *cmds[ SHELL_MAX_COMMANDS ];
static
int
n_cmds
=
0
;
int
shell_is_interacting
;
int
(
*
shell_ui_callback
)();
int
(
*
shell_ui_callback
)(
void
);
static
int
insert
(
char
c
)
{
...
...
@@ -349,7 +349,7 @@ void shell_activate_ui_command( int (*callback)() )
#define REGISTER_WRC_COMMAND(_name) \
{ extern struct wrc_shell_cmd __wrc_cmd_ ## _name; shell_register_command( &__wrc_cmd_ ## _name ); }
void
shell_register_commands
()
void
shell_register_commands
(
void
)
{
REGISTER_WRC_COMMAND
(
gui
);
REGISTER_WRC_COMMAND
(
ps
);
...
...
wrc_main.c
View file @
f81f75ed
...
...
@@ -30,6 +30,7 @@
#include <lib/ipv4.h>
#include <dev/rxts_calibrator.h>
#include <dev/flash.h>
#include <dev/gpio.h>
#include <wrc_ptp.h>
#include <system_checks.h>
...
...
@@ -64,8 +65,6 @@ int wrc_wr_diags(void); // fixme: move the header
static
void
wrc_initialize
(
void
)
{
uint8_t
mac_addr
[
6
];
#ifdef CONFIG_USE_SDB
sdb_find_devices
();
#endif
...
...
@@ -111,7 +110,7 @@ static void wrc_initialize(void)
int
link_status
;
static
int
is_link_up
()
static
int
is_link_up
(
void
)
{
return
link_status
==
LINK_UP
;
}
...
...
@@ -203,20 +202,20 @@ static void wrc_dispatch_ptp_events_init(void)
prev_timing_ok
=
0
;
}
static
void
wrc_dispatch_ptp_events_poll
(
void
)
static
int
wrc_dispatch_ptp_events_poll
(
void
)
{
extern
struct
pp_instance
ppi_static
;
struct
pp_instance
*
ppi
=
&
ppi_static
;
struct
wr_servo_state
*
ss
=
&
((
struct
wr_data
*
)
ppi
->
ext_data
)
->
servo_state
;
struct
pp_instance
*
ppi
=
&
ppi_static
;
struct
wr_servo_state
*
ss
=
&
((
struct
wr_data
*
)
ppi
->
ext_data
)
->
servo_state
;
int
mode
=
wrc_ptp_get_mode
();
int
mode
=
wrc_ptp_get_mode
();
if
(
mode
!=
prev_ptp_mode
)
{
main_dbg
(
"PTP mode changed.
\n
"
);
if
(
mode
!=
prev_ptp_mode
)
{
main_dbg
(
"PTP mode changed.
\n
"
);
prev_timing_ok
=
0
;
event_post
(
WRC_EVENT_PTP_MODE_CHANGED
);
}
event_post
(
WRC_EVENT_PTP_MODE_CHANGED
);
}
prev_ptp_mode
=
mode
;
...
...
@@ -259,11 +258,11 @@ static void wrc_dispatch_ptp_events_poll(void)
prev_ptp_state
=
ppi
->
state
;
prev_servo_state
=
ss
->
state
;
}
extern
void
wrc_log_stats
(
void
);
return
1
;
}
static
void
create_tasks
()
static
void
create_tasks
(
void
)
{
struct
wrc_task
*
t
;
...
...
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