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
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
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
54593958
Commit
54593958
authored
Apr 21, 2016
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: move sfp related definitions
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
cbbfef4e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
9 deletions
+13
-9
sfp.c
dev/sfp.c
+5
-0
sfp.h
include/sfp.h
+6
-0
storage.h
include/storage.h
+2
-4
wrc_main.c
wrc_main.c
+0
-5
No files found.
dev/sfp.c
View file @
54593958
...
...
@@ -15,6 +15,11 @@
#include "i2c.h"
#include "sfp.h"
/* Calibration data (from EEPROM if available) */
int32_t
sfp_alpha
=
73622176
;
/* default values if could not read EEPROM */
int32_t
sfp_deltaTx
=
0
;
int32_t
sfp_deltaRx
=
0
;
int
sfp_present
(
void
)
{
return
!
gpio_in
(
GPIO_SFP_DET
);
...
...
include/sfp.h
View file @
54593958
...
...
@@ -9,6 +9,12 @@
#include <stdint.h>
#define SFP_PN_LEN 16
extern
int32_t
sfp_alpha
;
extern
int32_t
sfp_deltaTx
;
extern
int32_t
sfp_deltaRx
;
/* Returns 1 if there's a SFP transceiver inserted in the socket. */
int
sfp_present
(
void
);
...
...
include/storage.h
View file @
54593958
...
...
@@ -9,6 +9,8 @@
#ifndef __STORAGE_H
#define __STORAGE_H
#include "sfp.h"
#define SFP_SECTION_PATTERN 0xdeadbeef
#if defined CONFIG_LEGACY_EEPROM
...
...
@@ -38,16 +40,12 @@
#define SFPS_MAX 4
#endif
#define SFP_PN_LEN 16
#define EE_RET_I2CERR -1
#define EE_RET_DBFULL -2
#define EE_RET_CORRPT -3
#define EE_RET_POSERR -4
extern
int32_t
sfp_alpha
;
extern
int32_t
sfp_deltaTx
;
extern
int32_t
sfp_deltaRx
;
extern
uint32_t
cal_phase_transition
;
extern
uint8_t
has_eeprom
;
...
...
wrc_main.c
View file @
54593958
...
...
@@ -38,11 +38,6 @@ int wrc_ui_mode = UI_SHELL_MODE;
int
wrc_ui_refperiod
=
TICS_PER_SECOND
;
/* 1 sec */
int
wrc_phase_tracking
=
1
;
///////////////////////////////////
//Calibration data (from EEPROM if available)
int32_t
sfp_alpha
=
73622176
;
//default values if could not read EEPROM
int32_t
sfp_deltaTx
=
0
;
int32_t
sfp_deltaRx
=
0
;
uint32_t
cal_phase_transition
=
2389
;
int
wrc_vlan_number
=
CONFIG_VLAN_NR
;
...
...
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