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
2e49b3b3
Commit
2e49b3b3
authored
Oct 18, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added wrx servo state exchange
parent
c550ddab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
wrx_wrpc.c
dev/wrx_wrpc.c
+15
-6
No files found.
dev/wrx_wrpc.c
View file @
2e49b3b3
...
...
@@ -4,6 +4,7 @@
//#include "ptpd.h"
//#include "ptpd_exports.h"
#include "sfp.h"
#include <ppsi/ppsi.h>
#include <hw/endpoint_regs.h>
#include <hw/endpoint_mdio.h>
...
...
@@ -11,6 +12,8 @@
#define WRX_BASE 0x00000700 //!< Base address of WRX 256 bytes mailbox DPRAM (wr-cores: Aux-Master)
#define WRX_OFFSET 0x00020000 //!< wr-cores: WB_SECONDARY_CON
extern
struct
pp_instance
ppi_static
;
/* Map structure at memory location */
static
volatile
Wrx
*
_wrx
=
(
volatile
Wrx
*
)(
WRX_BASE
+
WRX_OFFSET
);
...
...
@@ -51,6 +54,7 @@ void wrxInit(uint8_t mac_addr[], uint16_t autonegotiation)
*/
}
// Execute on a regular basis (once per second) in main-loop
//void wrxUpdate(int linkStatus, PtpPortDS *ptpPortDS)
void
wrxUpdate
(
int
linkStatus
)
...
...
@@ -100,12 +104,17 @@ void wrxUpdate(int linkStatus)
else {
info->status |= WRX_STATUS_AUTONEG_ON;
}
info->pState = ptpPortDS->portState;
info->wState = ptpPortDS->wrPortState;
wr_servo_state_t *s = &ptpPortDS->wr_servo;
info->sState = s->next_state;
*/
struct
pp_instance
*
ppi
=
&
ppi_static
;
//info->pState = ptpPortDS->portState;
info
->
pState
=
ppi
->
state
;
//info->wState = ptpPortDS->wrPortState;
info
->
wState
=
WR_DSPOR
(
ppi
)
->
wrPortState
;
//wr_servo_state_t *s = &ptpPortDS->wr_servo;
//info->sState = s->next_state;
info
->
sState
=
((
struct
wr_data
*
)
ppi
->
ext_data
)
->
servo_state
.
state
;
/*
info->sDeltaTX = s->delta_tx_s;
info->sDeltaRX = s->delta_rx_s;
info->mDeltaTX = s->delta_tx_m;
...
...
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