Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-camogm
Commits
40500893
Commit
40500893
authored
Sep 14, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove raw device file opening
parent
213e3b1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
camogm_jpeg.c
camogm_jpeg.c
+0
-15
No files found.
camogm_jpeg.c
View file @
40500893
...
...
@@ -71,16 +71,6 @@ int camogm_start_jpeg(camogm_state *state)
}
}
else
{
if
(
state
->
rawdev_op
)
{
state
->
rawdev
.
rawdev_fd
=
open
(
state
->
rawdev
.
rawdev_path
,
O_RDWR
);
if
(
state
->
rawdev
.
rawdev_fd
<
0
)
{
D0
(
perror
(
__func__
));
D0
(
fprintf
(
debug_file
,
"Error opening raw device %s
\n
"
,
state
->
rawdev
.
rawdev_path
));
return
-
CAMOGM_FRAME_FILE_ERR
;
}
D3
(
fprintf
(
debug_file
,
"Open raw device %s; start_pos = %llu, end_pos = %llu, curr_pos = %llu
\n
"
,
state
->
rawdev
.
rawdev_path
,
state
->
rawdev
.
start_pos
,
state
->
rawdev
.
end_pos
,
state
->
rawdev
.
curr_pos_w
));
lseek64
(
state
->
rawdev
.
rawdev_fd
,
state
->
rawdev
.
curr_pos_w
,
SEEK_SET
);
state
->
rawdev
.
sysfs_fd
=
open
(
SYSFS_AHCI_WRITE
,
O_WRONLY
);
fprintf
(
debug_file
,
"Open sysfs file: %s
\n
"
,
SYSFS_AHCI_WRITE
);
if
(
state
->
rawdev
.
sysfs_fd
<
0
)
{
...
...
@@ -163,11 +153,6 @@ int camogm_end_jpeg(camogm_state *state)
struct
frame_data
fdata
=
{
0
};
if
(
state
->
rawdev_op
)
{
D0
(
fprintf
(
debug_file
,
"Closing raw device %s
\n
"
,
state
->
rawdev
.
rawdev_path
));
ret
=
close
(
state
->
rawdev
.
rawdev_fd
);
if
(
ret
==
-
1
)
D0
(
fprintf
(
debug_file
,
"Error: %s
\n
"
,
strerror
(
errno
)));
fdata
.
cmd
=
DRV_CMD_FINISH
;
if
(
write
(
state
->
rawdev
.
sysfs_fd
,
&
fdata
,
sizeof
(
struct
frame_data
))
<
0
)
{
D0
(
fprintf
(
debug_file
,
"Error sending 'finish' command to driver
\n
"
));
...
...
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