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
958090f2
Commit
958090f2
authored
Jul 09, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes to compilation warnings
parent
9e5e9f80
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
26 additions
and
27 deletions
+26
-27
cmd_ertm14.c
boards/ertm14/cmd_ertm14.c
+2
-2
board.c
boards/generic/board.c
+1
-0
console.c
dev/console.c
+2
-2
endpoint.c
dev/endpoint.c
+1
-2
console.h
include/dev/console.h
+1
-0
simple_uart.h
include/dev/simple_uart.h
+1
-0
event.c
lib/event.c
+3
-3
event.h
lib/event.h
+3
-3
snmp.c
lib/snmp.c
+2
-2
wrc-tasks.c
lib/wrc-tasks.c
+6
-5
cmd_diag.c
shell/cmd_diag.c
+0
-2
cmd_ps.c
shell/cmd_ps.c
+3
-3
cmd_sdb.c
shell/cmd_sdb.c
+0
-2
shell.c
shell/shell.c
+1
-1
No files found.
boards/ertm14/cmd_ertm14.c
View file @
958090f2
...
...
@@ -332,7 +332,7 @@ static const char *nco_sync_source_to_string(int src)
}
static
int
ertm14_monitor_ui
()
static
int
ertm14_monitor_ui
(
void
)
{
if
(
!
tmo_expired
(
&
ertm14_mon_timer
))
return
0
;
...
...
@@ -393,4 +393,4 @@ void ertm14_shell_init()
{
shell_register_command
(
&
__wrc_cmd_ertm
);
shell_register_command
(
&
__wrc_cmd_ertm_ui
);
}
\ No newline at end of file
}
boards/generic/board.c
View file @
958090f2
...
...
@@ -2,6 +2,7 @@
#include "dev/bb_spi.h"
#include "dev/spi_flash.h"
#include "dev/syscon.h"
#include "dev/endpoint.h"
#include "storage.h"
int
wrc_board_early_init
()
...
...
dev/console.c
View file @
958090f2
...
...
@@ -193,7 +193,7 @@ int puts(const char *s)
return
con_uart_put_string
(
&
console_uart_dev
,
s
);
}
int
i
,
rv
;
int
i
,
rv
=
0
;
for
(
i
=
0
;
i
<
BOARD_MAX_CONSOLE_DEVICES
;
i
++
)
{
...
...
@@ -225,7 +225,7 @@ int console_getc()
return
-
1
;
}
void
console_register_device
(
struct
console_device
*
dev
)
static
void
console_register_device
(
struct
console_device
*
dev
)
{
int
i
;
for
(
i
=
0
;
i
<
BOARD_MAX_CONSOLE_DEVICES
;
i
++
)
...
...
dev/endpoint.c
View file @
958090f2
...
...
@@ -8,6 +8,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <wrc.h>
#include "board.h"
...
...
@@ -136,8 +137,6 @@ void ep_reset_phy(void)
starts up 802.3 autonegotiation process */
int
ep_enable
(
int
enabled
,
int
autoneg
)
{
uint16_t
mcr
;
if
(
!
enabled
)
{
EP
->
ECR
=
0
;
return
0
;
...
...
include/dev/console.h
View file @
958090f2
...
...
@@ -20,6 +20,7 @@ extern struct console_device *console;
void
console_set_device
(
struct
console_device
*
dev
);
void
console_uart_write_bytes
(
uint8_t
*
buf
,
int
count
);
void
console_uart_set_crlf_mode
(
int
on
);
void
console_init
(
void
);
int
console_getc
(
void
);
...
...
include/dev/simple_uart.h
View file @
958090f2
...
...
@@ -17,6 +17,7 @@ struct simple_uart_device {
(CPU_CLOCK >> 8)) / (CPU_CLOCK >> 7) )
void
suart_init
(
struct
simple_uart_device
*
dev
,
uint32_t
base_addr
,
int
baudrate
);
void
suart_init_default_baudrate
(
struct
simple_uart_device
*
dev
,
uint32_t
base_addr
);
void
suart_write_byte
(
struct
simple_uart_device
*
dev
,
int
b
);
int
suart_write_string
(
struct
simple_uart_device
*
dev
,
const
char
*
s
);
int
suart_read_byte
(
struct
simple_uart_device
*
dev
);
...
...
lib/event.c
View file @
958090f2
...
...
@@ -72,7 +72,7 @@ static inline int queue_full(struct event_queue *buf)
return
buf
->
size
==
buf
->
count
;
}
static
inline
int
queue_purge
(
struct
event_queue
*
buf
)
static
inline
void
queue_purge
(
struct
event_queue
*
buf
)
{
buf
->
head
=
buf
->
tail
=
buf
->
count
=
0
;
}
...
...
@@ -128,7 +128,7 @@ int event_poll( int handler )
return
queue_get
(
&
eh
->
queue
);
}
int
events_init
(
)
void
events_init
(
void
)
{
int
i
;
...
...
@@ -138,7 +138,7 @@ int events_init()
handlers
[
i
].
enabled
=
0
;
}
int
events_dispatch
(
)
void
events_dispatch
(
void
)
{
int
i
;
...
...
lib/event.h
View file @
958090f2
...
...
@@ -15,7 +15,7 @@ int event_listener_create( void );
int
event_handler_enable
(
int
id
,
int
enable
);
int
event_post
(
int
event
);
int
event_poll
(
int
handler
);
int
events_init
(
void
);
int
events_dispatch
(
void
);
void
events_init
(
void
);
void
events_dispatch
(
void
);
#endif
\ No newline at end of file
#endif
lib/snmp.c
View file @
958090f2
...
...
@@ -1440,8 +1440,8 @@ static int set_sdb(uint8_t *buf, struct snmp_oid *obj)
int
ret
;
int32_t
*
apply_mode
;
uint8_t
i2c_adr
=
FMC_EEPROM_ADR
;
int
blocksize
=
1
;
//
uint8_t i2c_adr = FMC_EEPROM_ADR;
//
int blocksize = 1;
int
forced_base
=
0
;
apply_mode
=
obj
->
p
;
...
...
lib/wrc-tasks.c
View file @
958090f2
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "wrc.h"
#include "wrc-task.h"
...
...
@@ -80,7 +81,7 @@ static void wrc_run_task(struct wrc_task *t)
account_task
(
t
,
done_sth
);
}
struct
wrc_task
*
wrc_task_create
(
const
char
*
name
,
void
(
*
init
)(
),
int
(
*
job
)(
)
)
struct
wrc_task
*
wrc_task_create
(
const
char
*
name
,
void
(
*
init
)(
void
),
int
(
*
job
)(
void
)
)
{
struct
wrc_task
*
t
=
NULL
;
int
i
;
...
...
@@ -97,9 +98,9 @@ struct wrc_task* wrc_task_create( const char *name, void (*init)(), int (*job)()
t
->
used
=
1
;
t
->
init
=
init
;
t
->
job
=
job
;
t
->
enabled
=
NULL
;
strncpy
(
t
->
name
,
name
,
16
);
t
->
enabled
=
NULL
;
strncpy
(
t
->
name
,
name
,
16
);
return
t
;
}
...
...
@@ -109,7 +110,7 @@ struct wrc_task *wrc_task_get(int tid)
return
&
tasks
[
tid
];
}
void
wrc_task_set_enable
(
struct
wrc_task
*
task
,
int
(
*
enabled
)()
)
void
wrc_task_set_enable
(
struct
wrc_task
*
task
,
int
(
*
enabled
)(
void
)
)
{
task
->
enabled
=
enabled
;
}
...
...
shell/cmd_diag.c
View file @
958090f2
...
...
@@ -28,8 +28,6 @@ static int cmd_diag(const char *args[])
return
0
;
}
int
all
=
strcasecmp
(
args
[
0
],
"all"
);
if
(
!
strcasecmp
(
args
[
0
],
"all"
))
{
int
i
;
...
...
shell/cmd_ps.c
View file @
958090f2
...
...
@@ -23,12 +23,12 @@ static int cmd_ps(const char *args[])
if
(
!
strcasecmp
(
args
[
0
],
"reset"
))
{
for
(
i
=
0
;
i
<
WRC_MAX_TASKS
;
i
++
)
{
struct
wrc_task
*
t
=
wrc_task_get
(
i
);
t
=
wrc_task_get
(
i
);
if
(
!
t
)
return
0
;
if
(
!
t
->
used
)
continue
;
t
->
nrun
=
t
->
seconds
=
t
->
nanos
=
t
->
max_run_ticks
=
0
;
t
->
nrun
=
t
->
seconds
=
t
->
nanos
=
t
->
max_run_ticks
=
0
;
}
return
0
;
}
else
if
(
!
strcasecmp
(
args
[
0
],
"max"
))
{
...
...
@@ -42,7 +42,7 @@ static int cmd_ps(const char *args[])
pp_printf
(
" iterations seconds.micros max_ms name
\n
"
);
for
(
i
=
0
;
i
<
WRC_MAX_TASKS
;
i
++
)
{
struct
wrc_task
*
t
=
wrc_task_get
(
i
);
t
=
wrc_task_get
(
i
);
if
(
!
t
)
return
0
;
if
(
!
t
->
used
)
...
...
shell/cmd_sdb.c
View file @
958090f2
...
...
@@ -20,8 +20,6 @@
static
int
cmd_sdb
(
const
char
*
args
[])
{
int
blocksize
=
1
;
if
(
!
args
[
0
])
{
pp_printf
(
"Command expected: format, ls
\n
"
);
...
...
shell/shell.c
View file @
958090f2
...
...
@@ -338,7 +338,7 @@ void shell_list_cmds()
}
}
void
shell_activate_ui_command
(
int
(
*
callback
)()
)
void
shell_activate_ui_command
(
int
(
*
callback
)(
void
)
)
{
shell_ui_callback
=
callback
;
state
=
SH_EXEC_UI
;
...
...
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