Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PTP noposix stack
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
PTP noposix stack
Commits
29f0d756
Commit
29f0d756
authored
Apr 25, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: added CHAN_SHIFTING RPC flag
parent
17c5c04a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
rt_ipc.c
rt/ipc/rt_ipc.c
+6
-2
rt_ipc.h
rt/ipc/rt_ipc.h
+2
-0
No files found.
rt/ipc/rt_ipc.c
View file @
29f0d756
...
@@ -36,7 +36,7 @@ static void clear_state()
...
@@ -36,7 +36,7 @@ static void clear_state()
/* Sets the phase setpoint on a given channel */
/* Sets the phase setpoint on a given channel */
int
rts_adjust_phase
(
int
channel
,
int32_t
phase_setpoint
)
int
rts_adjust_phase
(
int
channel
,
int32_t
phase_setpoint
)
{
{
TRACE
(
"Adjusting phase: ref channel %d, setpoint=%d ps.
\n
"
,
channel
,
phase_setpoint
);
//
TRACE("Adjusting phase: ref channel %d, setpoint=%d ps.\n", channel, phase_setpoint);
spll_set_phase_shift
(
0
,
phase_setpoint
);
spll_set_phase_shift
(
0
,
phase_setpoint
);
pstate
.
channels
[
channel
].
phase_setpoint
=
phase_setpoint
;
pstate
.
channels
[
channel
].
phase_setpoint
=
phase_setpoint
;
return
0
;
return
0
;
...
@@ -119,7 +119,11 @@ void rts_update()
...
@@ -119,7 +119,11 @@ void rts_update()
CH
.
flags
=
CHAN_DISABLED
;
CH
.
flags
=
CHAN_DISABLED
;
else
{
else
{
if
(
i
==
pstate
.
current_ref
)
if
(
i
==
pstate
.
current_ref
)
{
spll_get_phase_shift
(
0
,
&
CH
.
phase_current
,
NULL
);
spll_get_phase_shift
(
0
,
&
CH
.
phase_current
,
NULL
);
if
(
spll_shifter_busy
(
0
))
CH
.
flags
|=
CHAN_SHIFTING
;
}
if
(
spll_read_ptracker
(
i
,
&
CH
.
phase_loopback
))
if
(
spll_read_ptracker
(
i
,
&
CH
.
phase_loopback
))
CH
.
flags
|=
CHAN_PMEAS_READY
;
CH
.
flags
|=
CHAN_PMEAS_READY
;
}
}
...
@@ -141,7 +145,7 @@ static int rts_get_state_func(const struct minipc_pd *pd, uint32_t *args, void *
...
@@ -141,7 +145,7 @@ static int rts_get_state_func(const struct minipc_pd *pd, uint32_t *args, void *
struct
rts_pll_state
*
tmp
=
(
struct
rts_pll_state
*
)
ret
;
struct
rts_pll_state
*
tmp
=
(
struct
rts_pll_state
*
)
ret
;
int
i
;
int
i
;
TRACE
(
"IPC Call: %s [rv at %x]
\n
"
,
__FUNCTION__
,
ret
);
//
TRACE("IPC Call: %s [rv at %x]\n", __FUNCTION__, ret);
/* gaaaah, somebody should write a SWIG plugin for generating this stuff. */
/* gaaaah, somebody should write a SWIG plugin for generating this stuff. */
tmp
->
current_ref
=
htonl
(
pstate
.
current_ref
);
tmp
->
current_ref
=
htonl
(
pstate
.
current_ref
);
...
...
rt/ipc/rt_ipc.h
View file @
29f0d756
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#define CHAN_PMEAS_READY (1<<3)
#define CHAN_PMEAS_READY (1<<3)
/* Channel not available/disabled */
/* Channel not available/disabled */
#define CHAN_DISABLED (1<<4)
#define CHAN_DISABLED (1<<4)
/* Channel is busy adjusting phase */
#define CHAN_SHIFTING (1<<5)
/* DMTD clock is present */
/* DMTD clock is present */
#define RTS_DMTD_LOCKED (1<<0)
#define RTS_DMTD_LOCKED (1<<0)
...
...
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