Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
FMC DEL 1ns 4cha
Commits
ede2d0c5
Commit
ede2d0c5
authored
Nov 06, 2023
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: fix library to be consistent with doc on error
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
d1165f23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
fdelay-output.c
software/lib/fdelay-output.c
+8
-4
No files found.
software/lib/fdelay-output.c
View file @
ede2d0c5
...
...
@@ -158,11 +158,15 @@ int fdelay_config_pulse(struct fdelay_board *userb,
therefore we temporarily have to check the output programming correctness in the user library. */
if
(
mode
==
FD_OUT_MODE_DELAY
||
mode
==
FD_OUT_MODE_DISABLED
)
{
if
(
pulse
->
rep
<
0
||
pulse
->
rep
>
16
)
/* delay mode allows trains of 1 to 16 pulses. */
return
-
EINVAL
;
if
(
pulse
->
rep
<
0
||
pulse
->
rep
>
16
)
{
/* delay mode allows trains of 1 to 16 pulses. */
errno
=
EINVAL
;
return
-
1
;
}
if
(
a
[
FD_ATTR_OUT_START_L
]
==
0
&&
a
[
FD_ATTR_OUT_START_COARSE
]
<
(
600
/
8
))
// 600 ns min delay
return
-
EINVAL
;
if
(
a
[
FD_ATTR_OUT_START_L
]
==
0
&&
a
[
FD_ATTR_OUT_START_COARSE
]
<
(
600
/
8
))
{
// 600 ns min delay
errno
=
EINVAL
;
return
-
1
;
}
}
/* we need to fill the nsample field of the control */
...
...
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