Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
6b6d9d20
Commit
6b6d9d20
authored
Oct 28, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Plain Diff
merged with framepars, fixed re-trigger
parents
4f937f92
a8a661b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
pgm_functions.c
src/drivers/elphel/pgm_functions.c
+13
-11
sensor_common.c
src/drivers/elphel/sensor_common.c
+1
-1
No files found.
src/drivers/elphel/pgm_functions.c
View file @
6b6d9d20
...
@@ -2615,18 +2615,9 @@ int pgm_trigseq (int sensor_port, ///< sensor port number (0..3
...
@@ -2615,18 +2615,9 @@ int pgm_trigseq (int sensor_port, ///< sensor port number (0..3
// dev_dbg(g_dev_ptr,"{%d} port_csp0_addr[0x%x]=0x%x\n",sensor_port, (int) X313_WA_IOPINS, (int) X313_WA_IOPINS_DIS_TRIG_OUT);
// dev_dbg(g_dev_ptr,"{%d} port_csp0_addr[0x%x]=0x%x\n",sensor_port, (int) X313_WA_IOPINS, (int) X313_WA_IOPINS_DIS_TRIG_OUT);
}
}
}
}
// Sequencer period changed? (0 - stopped, 1 - single trigger, >=256 - start repetitive)
if
(
FRAMEPAR_MODIFIED
(
P_TRIG_PERIOD
))
{
if
(
unlikely
((
thispars
->
pars
[
P_TRIG_PERIOD
]
>
1
)
&&
(
thispars
->
pars
[
P_TRIG_PERIOD
]
<
256
)))
{
// Wrong value, restore old one
SETFRAMEPARS_SET
(
P_TRIG_PERIOD
,
prevpars
->
pars
[
P_TRIG_PERIOD
]);
//+1
}
else
{
set_x393_camsync_trig_period
(
thispars
->
pars
[
P_TRIG_PERIOD
]);
update_master_channel
=
1
;
dev_dbg
(
g_dev_ptr
,
"{%d} set_x393_camsync_trig_period(0x%lx)
\n
"
,
sensor_port
,
thispars
->
pars
[
P_TRIG_PERIOD
]);
MDP
(
DBGB_PADD
,
sensor_port
,
"set_x393_camsync_trig_period(0x%lx)
\n
"
,
thispars
->
pars
[
P_TRIG_PERIOD
])
}
}
// Bit length changed or not yet initialized?
// Bit length changed or not yet initialized?
// Put before period to help re-trigger with the same period as was before
// Alternatively - make retrigger always single?
if
(
FRAMEPAR_MODIFIED
(
P_TRIG_BITLENGTH
)
||
(
thispars
->
pars
[
P_TRIG_BITLENGTH
]
==
0
))
{
if
(
FRAMEPAR_MODIFIED
(
P_TRIG_BITLENGTH
)
||
(
thispars
->
pars
[
P_TRIG_BITLENGTH
]
==
0
))
{
d
=
thispars
->
pars
[
P_TRIG_BITLENGTH
];
d
=
thispars
->
pars
[
P_TRIG_BITLENGTH
];
if
(
unlikely
((
d
<
2
)
||
(
d
>
255
)))
{
// Wrong value, restore old one
if
(
unlikely
((
d
<
2
)
||
(
d
>
255
)))
{
// Wrong value, restore old one
...
@@ -2638,6 +2629,17 @@ int pgm_trigseq (int sensor_port, ///< sensor port number (0..3
...
@@ -2638,6 +2629,17 @@ int pgm_trigseq (int sensor_port, ///< sensor port number (0..3
dev_dbg
(
g_dev_ptr
,
"{%d} set_x393_camsync_trig_period(0x%x) (bit length)
\n
"
,
sensor_port
,
d
);
dev_dbg
(
g_dev_ptr
,
"{%d} set_x393_camsync_trig_period(0x%x) (bit length)
\n
"
,
sensor_port
,
d
);
MDP
(
DBGB_PADD
,
sensor_port
,
"set_x393_camsync_trig_period(0x%x) (bit length)
\n
"
,
d
)
MDP
(
DBGB_PADD
,
sensor_port
,
"set_x393_camsync_trig_period(0x%x) (bit length)
\n
"
,
d
)
}
}
// Sequencer period changed? (0 - stopped, 1 - single trigger, >=256 - start repetitive)
if
(
FRAMEPAR_MODIFIED
(
P_TRIG_PERIOD
))
{
if
(
unlikely
((
thispars
->
pars
[
P_TRIG_PERIOD
]
>
1
)
&&
(
thispars
->
pars
[
P_TRIG_PERIOD
]
<
256
)))
{
// Wrong value, restore old one
SETFRAMEPARS_SET
(
P_TRIG_PERIOD
,
prevpars
->
pars
[
P_TRIG_PERIOD
]);
//+1
}
else
{
set_x393_camsync_trig_period
(
thispars
->
pars
[
P_TRIG_PERIOD
]);
update_master_channel
=
1
;
dev_dbg
(
g_dev_ptr
,
"{%d} set_x393_camsync_trig_period(0x%lx)
\n
"
,
sensor_port
,
thispars
->
pars
[
P_TRIG_PERIOD
]);
MDP
(
DBGB_PADD
,
sensor_port
,
"set_x393_camsync_trig_period(0x%lx)
\n
"
,
thispars
->
pars
[
P_TRIG_PERIOD
])
}
}
// P_EXTERN_TIMESTAMP changed? (0 - internal sequencer)
// P_EXTERN_TIMESTAMP changed? (0 - internal sequencer)
if
(
FRAMEPAR_MODIFIED
(
P_EXTERN_TIMESTAMP
))
{
if
(
FRAMEPAR_MODIFIED
(
P_EXTERN_TIMESTAMP
))
{
camsync_mode
.
ext
=
thispars
->
pars
[
P_EXTERN_TIMESTAMP
]
?
1
:
0
;
camsync_mode
.
ext
=
thispars
->
pars
[
P_EXTERN_TIMESTAMP
]
?
1
:
0
;
...
...
src/drivers/elphel/sensor_common.c
View file @
6b6d9d20
...
@@ -1001,7 +1001,7 @@ void sensor_interrupts (int on, ///< 0 -interrupt disable, 1 - interrupt enabl
...
@@ -1001,7 +1001,7 @@ void sensor_interrupts (int on, ///< 0 -interrupt disable, 1 - interrupt enabl
void
trigger_restart
(
void
)
void
trigger_restart
(
void
)
{
{
u32
period
=
get_x393_camsync_trig_period
();
u32
period
=
get_x393_camsync_trig_period
();
if
(
!
period
)
period
=
1
;
if
(
!
(
period
&
~
31
))
period
=
1
;
// if 0 or bit length setup
set_x393_camsync_trig_period
(
period
);
set_x393_camsync_trig_period
(
period
);
dev_dbg
(
g_dev_ptr
,
"Reset trigger period in immediate mode = %d (0x%x)
\n
"
,
(
int
)
period
,
(
int
)
period
);
dev_dbg
(
g_dev_ptr
,
"Reset trigger period in immediate mode = %d (0x%x)
\n
"
,
(
int
)
period
,
(
int
)
period
);
}
}
...
...
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