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
7
Merge Requests
7
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
b9a4bea1
Commit
b9a4bea1
authored
May 24, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v3-switch_for_wrpc: read alpha parameter from FMC EEPROM based on currently used SFP
parent
e672af7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
Makefile
Makefile
+1
-1
wrc_main.c
wrc_main.c
+10
-9
No files found.
Makefile
View file @
b9a4bea1
PLATFORM
=
lm32
OBJS_WRC
=
wrc_main.o dev/uart.o dev/endpoint.o dev/minic.o dev/pps_gen.o dev/syscon.o dev/softpll_ng.o lib/mprintf.o dev/ep_pfilter.o dev/dna.o dev/i2c.o monitor/monitor.o dev/onewire.o
#
dev/eeprom.o
OBJS_WRC
=
wrc_main.o dev/uart.o dev/endpoint.o dev/minic.o dev/pps_gen.o dev/syscon.o dev/softpll_ng.o lib/mprintf.o dev/ep_pfilter.o dev/dna.o dev/i2c.o monitor/monitor.o dev/onewire.o dev/eeprom.o
D
=
ptp-noposix
PTPD_CFLAGS
=
-ffreestanding
-DPTPD_FREESTANDING
-DWRPC_EXTRA_SLIM
-DPTPD_MSBF
-DPTPD_DBG
...
...
wrc_main.c
View file @
b9a4bea1
...
...
@@ -65,7 +65,7 @@ static PtpClockDS ptpClockDS;
int32_t
sfp_alpha
=
0
;
int32_t
sfp_alpha
=
-
73622176
;
//default value if could not read EEPROM
int32_t
sfp_deltaTx
=
0
;
int32_t
sfp_deltaRx
=
0
;
...
...
@@ -219,12 +219,12 @@ void wrc_initialize()
for
(
i
=
0
;
i
<
16
;
i
++
)
mprintf
(
"%c"
,
sfp_pn
[
i
]);
mprintf
(
"
\n
"
);
/*
*
if( !access_eeprom(sfp_pn, &sfp_alpha, &sfp_deltaTx, &sfp_deltaRx) )
*
{
*
mprintf("SFP: alpha=%d, deltaTx=%d, deltaRx=%d\n", sfp_alpha, sfp_deltaTx, sfp_deltaRx);
*
}
*/
if
(
!
access_eeprom
(
sfp_pn
,
&
sfp_alpha
,
&
sfp_deltaTx
,
&
sfp_deltaRx
)
)
{
mprintf
(
"SFP: alpha=%d, deltaTx=%d, deltaRx=%d
\n
"
,
sfp_alpha
,
sfp_deltaTx
,
sfp_deltaRx
);
}
}
#endif
...
...
@@ -362,11 +362,12 @@ extern volatile int irq_cnt;
int
main
(
void
)
{
wrc_initialize
();
wrc_extra_debug
=
1
;
wrc_gui_mode
=
0
;
wrc_initialize
();
#if WRPC_MASTER
spll_init
(
SPLL_MODE_FREE_RUNNING_MASTER
,
0
,
1
);
//spll_init(SPLL_MODE_GRAND_MASTER, 0, 1);
...
...
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