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
29
Issues
29
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
d47f8be2
Commit
d47f8be2
authored
Oct 09, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup some compilation warnings
parent
1fe5fdfc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
15 deletions
+16
-15
console.c
dev/console.c
+0
-2
netif.c
dev/netif.c
+5
-5
simple_uart.c
dev/simple_uart.c
+7
-6
netif.h
include/dev/netif.h
+3
-2
simple_uart.h
include/dev/simple_uart.h
+1
-0
No files found.
dev/console.c
View file @
d47f8be2
...
...
@@ -105,8 +105,6 @@ static int con_uart_put_string(struct console_device* dev, const char *s)
static
int
con_uart_getc
(
struct
console_device
*
dev
)
{
struct
console_uart_priv_data
*
priv
=
(
struct
console_uart_priv_data
*
)
dev
->
priv
;
//if( dev->flags & CONSOLE_FLAGS_MODE_BINARY )
//return 0;
...
...
dev/netif.c
View file @
d47f8be2
...
...
@@ -22,7 +22,7 @@
static
int
netif_n_count
=
0
;
static
struct
wrc_netif_device
netif_devs
[
WRC_NETIF_MAX_DEVICES
];
struct
wrc_endpoint_dev
*
netif_get_default_endpoint
()
struct
wrc_endpoint_dev
*
netif_get_default_endpoint
(
void
)
{
if
(
netif_n_count
==
0
)
return
NULL
;
...
...
@@ -50,12 +50,12 @@ int netif_register_device( const char *name, const char* desc, struct wr_endpoin
return
0
;
}
int
netif_get_device_count
()
int
netif_get_device_count
(
void
)
{
return
netif_n_count
;
}
static
int
netif_update_task
()
static
int
netif_update_task
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
netif_n_count
;
i
++
)
...
...
@@ -101,8 +101,8 @@ struct wrc_netif_device* netif_get_device(int idx)
}
int
netif_init
()
int
netif_init
(
void
)
{
wrc_task_create
(
"netif"
,
NULL
,
netif_update_task
);
return
0
;
}
\ No newline at end of file
}
dev/simple_uart.c
View file @
d47f8be2
...
...
@@ -53,6 +53,13 @@ int suart_write_string(struct simple_uart_device *dev, const char *s)
return
s
-
t
;
}
int
suart_get_rx_fifo_count
(
struct
simple_uart_device
*
dev
)
{
uint32_t
r
=
readl
(
dev
->
base
+
UART_REG_SR
);
return
UART_SR_RX_FIFO_BYTES_R
(
r
);
}
int
suart_poll
(
struct
simple_uart_device
*
dev
)
{
if
(
suart_is_fifo_supported
(
dev
)
)
...
...
@@ -77,12 +84,6 @@ int suart_get_tx_fifo_count( struct simple_uart_device *dev )
return
-
1
;
}
int
suart_get_rx_fifo_count
(
struct
simple_uart_device
*
dev
)
{
uint32_t
r
=
readl
(
dev
->
base
+
UART_REG_SR
);
return
UART_SR_RX_FIFO_BYTES_R
(
r
);
}
int
suart_purge_tx_fifo
(
struct
simple_uart_device
*
dev
)
{
// fixme
...
...
include/dev/netif.h
View file @
d47f8be2
...
...
@@ -27,9 +27,10 @@ struct wrc_netif_device
int
tx_packets
;
};
struct
wrc_endpoint_dev
*
netif_get_default_endpoint
();
struct
wrc_endpoint_dev
*
netif_get_default_endpoint
(
void
);
int
netif_register_device
(
const
char
*
name
,
const
char
*
desc
,
struct
wr_endpoint_device
*
ep
);
int
netif_get_device_count
();
int
netif_get_device_count
(
void
);
struct
wrc_netif_device
*
netif_get_device
(
int
idx
);
int
netif_init
(
void
);
#endif
include/dev/simple_uart.h
View file @
d47f8be2
...
...
@@ -21,5 +21,6 @@ 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
);
int
suart_poll
(
struct
simple_uart_device
*
dev
);
int
suart_is_fifo_supported
(
struct
simple_uart_device
*
dev
);
#endif
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