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
491e1df2
Commit
491e1df2
authored
Mar 09, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tested & fixed mux for 5MPx sensors
parent
53ff55a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
sensor_common.c
src/drivers/elphel/sensor_common.c
+19
-8
No files found.
src/drivers/elphel/sensor_common.c
View file @
491e1df2
...
@@ -1222,7 +1222,8 @@ int register_i2c_sensor(int ports_mask) ///< bitmask of the sensor ports to use
...
@@ -1222,7 +1222,8 @@ int register_i2c_sensor(int ports_mask) ///< bitmask of the sensor ports to use
x393_i2c_device_t
dev_sensor
;
x393_i2c_device_t
dev_sensor
;
struct
sensor_port_config_t
*
pcfg
;
struct
sensor_port_config_t
*
pcfg
;
const
char
*
name
;
const
char
*
name
;
const
char
*
name10359
;
//const char *name10359;
//const char *detect;
bool
mux
;
bool
mux
;
bool
broadcast_set
=
false
;
bool
broadcast_set
=
false
;
...
@@ -1243,24 +1244,34 @@ int register_i2c_sensor(int ports_mask) ///< bitmask of the sensor ports to use
...
@@ -1243,24 +1244,34 @@ int register_i2c_sensor(int ports_mask) ///< bitmask of the sensor ports to use
if
(
mux
){
if
(
mux
){
// returns 'mux10359', need 'el10359'
// returns 'mux10359', need 'el10359'
name
=
get_name_by_code
(
pcfg
->
mux
,
DETECT_MUX
);
//
name = get_name_by_code(pcfg->mux,DETECT_MUX);
// get reference name 'mux10359'
// get reference name 'mux10359'
name10359
=
get_name_by_code
(
SENSOR_MUX_10359
,
DETECT_MUX
);
//name10359 = get_name_by_code(SENSOR_MUX_10359,DETECT_MUX);
// get reference name 'detect'
dev_dbg
(
g_dev_ptr
,
"Comparing %s to reference %s
\n
"
,
name
,
name10359
);
// there's only one mux - 10359, so
name
=
"el10359"
;
if
(
name
!=
NULL
){
//dev_dbg(g_dev_ptr,"Comparing %s to reference %s\n",name,name10359);
//pr_info("Comparing %s to reference %s\n",name,name10359);
//if (name!=NULL){
// compare in case pcfg.mux was something else
// compare in case pcfg.mux was something else
/*
if (strncmp(name,name10359,strlen(name10359))==0){
if (strncmp(name,name10359,strlen(name10359))==0){
name = name_10359;
name = name_10359;
}
}
}
*/
//name = name_10359;
//}
pr_info
(
"checkpoint 1: %s
\n
"
,
name
);
class_mux
=
xi2c_dev_get
(
name
);
class_mux
=
xi2c_dev_get
(
name
);
pr_info
(
"checkpoint 2
\n
"
);
// TODO: request a line# from fpga table and register it (not class_mux->slave7)
// TODO: request a line# from fpga table and register it (not class_mux->slave7)
i2c_page_register
(
port
,
class_mux
->
slave7
);
i2c_page_register
(
port
,
class_mux
->
slave7
);
pr_info
(
"checkpoint 3
\n
"
);
set_xi2c_wrc
(
class_mux
,
port
,
class_mux
->
slave7
,
0
);
set_xi2c_wrc
(
class_mux
,
port
,
class_mux
->
slave7
,
0
);
pr_info
(
"checkpoint 4
\n
"
);
// 'write' recs for sensors
// 'write' recs for sensors
for
(
subchn
=
0
;
subchn
<
4
;
subchn
++
){
for
(
subchn
=
0
;
subchn
<
4
;
subchn
++
){
...
...
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