Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Mock Turtle
Commits
0d51b769
Commit
0d51b769
authored
Jul 29, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd:lib: fix channel check
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
b7de97ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
libwrtd-output.c
applications/wrtd/lib/libwrtd-output.c
+8
-8
No files found.
applications/wrtd/lib/libwrtd-output.c
View file @
0d51b769
...
...
@@ -146,7 +146,7 @@ int wrtd_out_state_get(struct wrtd_node *dev, unsigned int output,
uint32_t
seq
=
0
,
id
;
uint32_t
dead_time_ticks
,
pulse_width_ticks
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -232,7 +232,7 @@ int wrtd_out_enable(struct wrtd_node *dev, unsigned int output,
struct
wrnc_msg
msg
;
int
err
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -273,7 +273,7 @@ int wrtd_out_trig_assign(struct wrtd_node *dev, unsigned int output,
uint32_t
seq
=
0
,
id
;
struct
wrtd_trigger_handle
tmp_handle
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -367,7 +367,7 @@ int wrtd_out_trig_get_all(struct wrtd_node *dev, unsigned int output,
struct
wrtd_trigger_handle
handle
=
{
0
,
0
,
output
};
/* Set ptr to 0 so that we get the first available */
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -482,7 +482,7 @@ static int wrtd_out_rule_delay_set(struct wrtd_node *dev,
struct
wrnc_msg
msg
=
wrnc_msg_init
(
16
);
uint32_t
id
,
seq
=
0
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -536,7 +536,7 @@ int wrtd_out_pulse_width_set(struct wrtd_node *dev, unsigned int output,
int
err
,
tmp
=
0
;
uint32_t
seq
=
0
,
id
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -650,7 +650,7 @@ int wrtd_out_trigger_mode_set(struct wrtd_node *dev,
struct
wrnc_msg
msg
=
wrnc_msg_init
(
4
);
uint32_t
seq
=
0
,
id
,
m
=
mode
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
@@ -701,7 +701,7 @@ int wrtd_out_counters_reset(struct wrtd_node *dev, unsigned int output)
struct
wrnc_msg
msg
=
wrnc_msg_init
(
3
);
uint32_t
seq
=
0
,
id
=
WRTD_CMD_FD_CHAN_RESET_COUNTERS
;
if
(
output
>
FD_NUM_CHANNELS
)
{
if
(
output
>
=
FD_NUM_CHANNELS
)
{
errno
=
EWRTD_INVALID_CHANNEL
;
return
-
1
;
}
...
...
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