Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
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
White Rabbit Switch - Software
Commits
45bb0a33
Commit
45bb0a33
authored
Sep 06, 2019
by
Tomasz Wlostowski
Committed by
Jean-Claude BAU
Oct 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt_client: added rts_ptracker_set_average_samples() RT CPU call
parent
eed138d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
rt_ipc.h
userspace/include/rt_ipc.h
+16
-1
rt_client.c
userspace/libwr/rt_client.c
+13
-0
No files found.
userspace/include/rt_ipc.h
View file @
45bb0a33
...
...
@@ -117,7 +117,11 @@ int rts_lock_channel(int channel, int priority);
/* Enabled/disables phase tracking on a particular port */
int
rts_enable_ptracker
(
int
channel
,
int
enable
);
/* Enabled/disables phase tracking on a particular port */
/* Sets number of raw phase samples the DMTD uses to average to obtain the final phase value.
Lower number = faster measurements (useful during calibration). */
int
rts_ptracker_set_average_samples
(
int
channel
,
int
avg_samples
);
/* Debug stuff. Reserved for developers. Deliberately left undocumented. */
int
rts_debug_command
(
int
param
,
int
value
);
#ifdef RTIPC_EXPORT_STRUCTURES
...
...
@@ -179,6 +183,17 @@ static struct minipc_pd rtipc_rts_debug_command_struct = {
},
};
static
struct
minipc_pd
rtipc_rts_set_average_samples_struct
=
{
.
name
=
"gggg"
,
.
retval
=
MINIPC_ARG_ENCODE
(
MINIPC_ATYPE_INT
,
int
),
.
args
=
{
MINIPC_ARG_ENCODE
(
MINIPC_ATYPE_INT
,
int
),
MINIPC_ARG_ENCODE
(
MINIPC_ATYPE_INT
,
int
),
MINIPC_ARG_END
},
};
#endif
#endif
userspace/libwr/rt_client.c
View file @
45bb0a33
...
...
@@ -71,6 +71,19 @@ int rts_set_mode(int mode)
return
rval
;
}
int
rts_ptracker_set_average_samples
(
int
channel
,
int
avg_samples
)
{
int
rval
;
int
ret
=
minipc_call
(
client
,
RTS_TIMEOUT
,
&
rtipc_rts_set_average_samples_struct
,
&
rval
,
avg_samples
);
if
(
ret
<
0
)
return
ret
;
return
rval
;
}
/* Sets the phase setpoint on a given channel */
int
rts_adjust_phase
(
int
channel
,
int32_t
phase_setpoint
)
{
...
...
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