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
7
Merge Requests
7
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
66a18461
Commit
66a18461
authored
Dec 10, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export ertm sync modes in the public interface
parent
814529a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
libertm.c
libertm/libertm.c
+5
-5
libertm.h
libertm/libertm.h
+6
-1
No files found.
libertm/libertm.c
View file @
66a18461
...
...
@@ -1101,7 +1101,7 @@ int ertm_nco_reset_get_status(struct ertm_status *handle, struct ertm_nco_reset
}
int
ertm_nco_reset_subscribe
(
struct
ertm_status
*
handle
,
enum
ertm_connector
connector
,
int
enabl
e
,
int
channel
,
uint32_t
stream_id
)
enum
ertm_connector
connector
,
int
mod
e
,
int
channel
,
uint32_t
stream_id
)
{
struct
uart_link
*
link
=
&
handle
->
link
;
struct
ertm14_board_state
*
bs
=
&
handle
->
state
->
board_state
;
...
...
@@ -1116,16 +1116,16 @@ int ertm_nco_reset_subscribe(struct ertm_status *handle,
if
((
res
=
get_dds
(
bs
,
connector
,
&
dds
))
!=
0
)
return
res
;
if
(
!
((
enabl
e
==
ERTM14_SYNC_SOURCE_NONE
)
||
(
enabl
e
==
ERTM14_SYNC_SOURCE_RF_TRIGGER
)
||
(
enabl
e
==
ERTM14_SYNC_SOURCE_PPS
)))
{
if
(
!
((
mod
e
==
ERTM14_SYNC_SOURCE_NONE
)
||
(
mod
e
==
ERTM14_SYNC_SOURCE_RF_TRIGGER
)
||
(
mod
e
==
ERTM14_SYNC_SOURCE_PPS
)))
{
errno
=
-
EINVAL
;
return
ERTM_BAD_SYNC_SOURCE
;
}
/* need DDS LO/REF; type of sync; and reset the counter */
/* channel does not play any role here, nor stream (yet) */
nco_subscription
->
sync_source
=
enabl
e
;
nco_subscription
->
sync_source
=
mod
e
;
nco_subscription
->
connector
=
(
connector
==
ERTM_LO
)
?
ERTM14_DDS_SYNC_LO
:
ERTM14_DDS_SYNC_REF
;
nco_subscription
->
reset_count
=
0
;
...
...
libertm/libertm.h
View file @
66a18461
...
...
@@ -80,6 +80,11 @@ enum ertm_connector {
#define ERTM_SYNC_STATE_WAIT_TRIGGER ERTM14_CLK_SYNC_STATE_WAIT_TRIGGER
#define ERTM_SYNC_STATE_READY ERTM14_CLK_SYNC_STATE_READY
/* sync modes */
#define ERTM_SYNC_SOURCE_NONE ERTM14_SYNC_SOURCE_NONE
#define ERTM_SYNC_SOURCE_PPS ERTM14_SYNC_SOURCE_PPS
#define ERTM_SYNC_SOURCE_RF_TRIGGER ERTM14_SYNC_SOURCE_RF_TRIGGER
struct
ertm_sync_states
{
int
sync_state
;
char
*
label
;
...
...
@@ -294,7 +299,7 @@ int ertm_get_voltages(struct ertm_status *handle, struct ertm_voltages *volts);
int
ertm_rf_nco_reset_enable
(
struct
ertm_status
*
handle
,
int
enable
);
int
ertm_rf_nco_reset
(
struct
ertm_status
*
handle
);
int
ertm_nco_reset_subscribe
(
struct
ertm_status
*
handle
,
enum
ertm_connector
,
int
enabl
e
,
int
channel
,
uint32_t
stream_id
);
enum
ertm_connector
,
int
mod
e
,
int
channel
,
uint32_t
stream_id
);
int
ertm_nco_reset_get_status
(
struct
ertm_status
*
handle
,
struct
ertm_nco_reset
status
[]);
/* WR enable/diagnostics */
...
...
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