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
68baa53f
Commit
68baa53f
authored
Nov 20, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various: add some 'static', save 100 bytes
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
1704a668
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
9 deletions
+6
-9
endpoint.c
dev/endpoint.c
+2
-2
uart.c
dev/uart.c
+1
-1
endpoint.h
include/endpoint.h
+0
-3
wrc_main.c
wrc_main.c
+3
-3
No files found.
dev/endpoint.c
View file @
68baa53f
...
...
@@ -31,14 +31,14 @@ static int autoneg_enabled;
volatile
struct
EP_WB
*
EP
;
/* functions for accessing PCS (MDIO) registers */
uint16_t
pcs_read
(
int
location
)
static
uint16_t
pcs_read
(
int
location
)
{
EP
->
MDIO_CR
=
EP_MDIO_CR_ADDR_W
(
location
>>
2
);
while
((
EP
->
MDIO_ASR
&
EP_MDIO_ASR_READY
)
==
0
)
;
return
EP_MDIO_ASR_RDATA_R
(
EP
->
MDIO_ASR
)
&
0xffff
;
}
void
pcs_write
(
int
location
,
int
value
)
static
void
pcs_write
(
int
location
,
int
value
)
{
EP
->
MDIO_CR
=
EP_MDIO_CR_ADDR_W
(
location
>>
2
)
|
EP_MDIO_CR_DATA_W
(
value
)
...
...
dev/uart.c
View file @
68baa53f
...
...
@@ -44,7 +44,7 @@ int uart_write_string(const char *s)
int
puts
(
const
char
*
s
)
__attribute__
((
alias
(
"uart_write_string"
)));
int
uart_poll
()
static
int
uart_poll
()
{
return
uart
->
SR
&
UART_SR_RX_RDY
;
}
...
...
include/endpoint.h
View file @
68baa53f
...
...
@@ -29,7 +29,4 @@ int ep_cal_pattern_disable();
void
pfilter_init_default
();
uint16_t
pcs_read
(
int
location
);
void
pcs_write
(
int
location
,
int
value
);
#endif
wrc_main.c
View file @
68baa53f
...
...
@@ -40,7 +40,7 @@ int32_t sfp_deltaTx = 46407;
int32_t
sfp_deltaRx
=
167843
;
uint32_t
cal_phase_transition
=
2389
;
void
wrc_initialize
()
static
void
wrc_initialize
()
{
uint8_t
mac_addr
[
6
];
...
...
@@ -89,7 +89,7 @@ void wrc_initialize()
#define LINK_UP 3
#define LINK_DOWN 4
int
wrc_check_link
()
static
int
wrc_check_link
()
{
static
int
prev_link_state
=
-
1
;
int
link_state
=
ep_link_up
(
NULL
);
...
...
@@ -152,7 +152,7 @@ static void ui_update()
extern
uint32_t
_endram
;
#define ENDRAM_MAGIC 0xbadc0ffe
void
check_stack
(
void
)
static
void
check_stack
(
void
)
{
while
(
_endram
!=
ENDRAM_MAGIC
)
{
mprintf
(
"Stack overflow!
\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