Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 TDC 1ns 5cha - Software
Commits
58559a93
Commit
58559a93
authored
Apr 18, 2014
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: small fixes in WR enable/query functions
parent
2e2b7b59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
fmctdc-lib.c
lib/fmctdc-lib.c
+6
-13
No files found.
lib/fmctdc-lib.c
View file @
58559a93
...
@@ -404,23 +404,16 @@ int fmctdc_wr_mode(struct fmctdc_board *userb, int on)
...
@@ -404,23 +404,16 @@ int fmctdc_wr_mode(struct fmctdc_board *userb, int on)
{
{
__define_board
(
b
,
userb
);
__define_board
(
b
,
userb
);
if
(
on
)
if
(
on
)
return
__fmctdc_command
(
b
,
FT_CMD_WR_ENABLE
);
__fmctdc_command
(
b
,
FT_CMD_WR_ENABLE
);
else
else
return
__fmctdc_command
(
b
,
FT_CMD_WR_DISABLE
);
__fmctdc_command
(
b
,
FT_CMD_WR_DISABLE
);
return
errno
;
}
}
extern
int
fmctdc_check_wr_mode
(
struct
fmctdc_board
*
userb
)
extern
int
fmctdc_check_wr_mode
(
struct
fmctdc_board
*
userb
)
{
{
int
ret
;
__define_board
(
b
,
userb
);
__define_board
(
b
,
userb
);
ret
=
__fmctdc_command
(
b
,
FT_CMD_WR_QUERY
);
if
(
__fmctdc_command
(
b
,
FT_CMD_WR_QUERY
)
==
0
)
return
0
;
switch
(
ret
)
{
return
errno
;
case
0
:
return
1
;
/* no error: locked to WR */
case
-
EAGAIN
:
return
0
;
/* EAGAIN: not locked yet */
default:
return
ret
;
/* other error code: just an error ;) */
}
}
}
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