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
38ce673e
Commit
38ce673e
authored
Apr 25, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/wrsw_hal: added enable/disable PPS command
parent
c7a89d70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
hal_exports.c
userspace/wrsw_hal/hal_exports.c
+5
-0
hal_exports.h
userspace/wrsw_hal/hal_exports.h
+3
-0
No files found.
userspace/wrsw_hal/hal_exports.c
View file @
38ce673e
...
...
@@ -23,6 +23,7 @@ int halexp_lock_cmd(const char *port_name, int command, int priority)
{
int
rval
;
TRACE
(
TRACE_INFO
,
"halexp_lock_cmd: cmd=%d port=%s tics =%lld
\n
"
,
command
,
port_name
,
shw_get_tics
());
switch
(
command
)
{
...
...
@@ -101,6 +102,10 @@ int halexp_pps_cmd(int cmd, hexp_pps_params_t *params)
case
HEXP_PPSG_CMD_POLL
:
busy
=
shw_pps_gen_busy
()
||
hal_phase_shifter_busy
();
return
busy
?
0
:
1
;
case
HEXP_PPSG_CMD_SET_VALID
:
return
shw_pps_gen_enable_output
(
params
->
pps_valid
);
}
return
-
1
;
/* fixme: real error code */
}
...
...
userspace/wrsw_hal/hal_exports.h
View file @
38ce673e
...
...
@@ -37,6 +37,7 @@
#define HEXP_PPSG_CMD_ADJUST_UTC 2
#define HEXP_PPSG_CMD_ADJUST_NSEC 3
#define HEXP_PPSG_CMD_POLL 4
#define HEXP_PPSG_CMD_SET_VALID 5
#define HEXP_ON 1
#define HEXP_OFF 0
...
...
@@ -65,6 +66,8 @@ typedef struct {
char
port_name
[
16
];
int
pps_valid
;
uint32_t
current_phase_shift
;
int32_t
adjust_phase_shift
;
...
...
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