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
5544569e
Commit
5544569e
authored
Sep 10, 2019
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
left commented out functions used for debugging the stack size, also used CONFIG_DEBUG_STACK_USAGE
parent
d3ea80fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
mt9x001.c
src/drivers/elphel/mt9x001.c
+31
-0
No files found.
src/drivers/elphel/mt9x001.c
View file @
5544569e
...
@@ -691,6 +691,7 @@ static unsigned short mt9d001_inits[]=
...
@@ -691,6 +691,7 @@ static unsigned short mt9d001_inits[]=
P_MT9X001_CALCTRL
,
0x8498
P_MT9X001_CALCTRL
,
0x8498
};
};
/** Register initial writes for MT9T031 */
/** Register initial writes for MT9T031 */
static
unsigned
short
mt9t001_inits
[]
=
static
unsigned
short
mt9t001_inits
[]
=
{
{
...
@@ -795,6 +796,9 @@ int mt9x001_pgm_exposure (int sensor_port, struct sensor_t * sensor, struct
...
@@ -795,6 +796,9 @@ int mt9x001_pgm_exposure (int sensor_port, struct sensor_t * sensor, struct
int
mt9x001_pgm_gains
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
int
mt9x001_pgm_gains
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
int
mt9x001_pgm_triggermode
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
int
mt9x001_pgm_triggermode
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
int
mt9x001_pgm_sensorregs
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
int
mt9x001_pgm_sensorregs
(
int
sensor_port
,
struct
sensor_t
*
sensor
,
struct
framepars_t
*
thispars
,
struct
framepars_t
*
prevpars
,
int
frame16
);
//int mt9x001_debug_recursion(int sensor_port, int i);
// @brief read 2 bytes from i2c
// @brief read 2 bytes from i2c
#ifdef NC353
#ifdef NC353
#define I2C_READ_DATA16(x) ((i2c_read_data[(x)<<1]<<8)+i2c_read_data[((x)<<1)+1])
#define I2C_READ_DATA16(x) ((i2c_read_data[(x)<<1]<<8)+i2c_read_data[((x)<<1)+1])
...
@@ -1007,6 +1011,7 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
...
@@ -1007,6 +1011,7 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
int
regval
,
regnum
,
mreg
,
j
;
int
regval
,
regnum
,
mreg
,
j
;
int
sensor_register_overwrites_number
;
int
sensor_register_overwrites_number
;
int
sensor_subtype
;
int
sensor_subtype
;
int
stack_debug_variable
;
dev_dbg
(
g_dev_ptr
,
"{%d} frame16=%d
\n
"
,
sensor_port
,
frame16
);
dev_dbg
(
g_dev_ptr
,
"{%d} frame16=%d
\n
"
,
sensor_port
,
frame16
);
if
(
frame16
>=
0
)
return
-
1
;
// should be ASAP
if
(
frame16
>=
0
)
return
-
1
;
// should be ASAP
...
@@ -1115,9 +1120,35 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
...
@@ -1115,9 +1120,35 @@ int mt9x001_pgm_initsensor (int sensor_port, ///< sensor port
}
}
MDF4
(
for
(
i
=
0
;
i
<
1023
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
dev_dbg
(
g_dev_ptr
,
"
\n
"
);
dev_dbg
(
g_dev_ptr
,
" 0x%06lx"
,
GLOBALPARS
(
sensor_port
,
G_SENSOR_CALIB
+
i
));});
MDF4
(
for
(
i
=
0
;
i
<
1023
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
dev_dbg
(
g_dev_ptr
,
"
\n
"
);
dev_dbg
(
g_dev_ptr
,
" 0x%06lx"
,
GLOBALPARS
(
sensor_port
,
G_SENSOR_CALIB
+
i
));});
// for debugging - find stack pointer
/*
set_globalParam(sensor_port, G_DLY359_C1, &stack_debug_variable);
stack_debug_variable = get_globalParam(sensor_port, G_DLY359_C2);
mt9x001_debug_recursion(sensor_port, stack_debug_variable);
// store pid
set_globalParam(sensor_port, G_DLY359_P3, current->pid);
// end of stack debugging
*/
return
0
;
return
0
;
}
}
// debug to see how much stack is left
/*
int mt9x001_debug_recursion(int sensor_port, int i)
{
int j=i-1;
if (j<=0){
set_globalParam(sensor_port, G_DLY359_C3, &j);
}else{
mt9x001_debug_recursion(sensor_port,j);
}
return 0;
}
*/
/**
/**
* Program sensor input in FPGA (Bayer, 8/16 bits, FPN, test mode, number of lines).
* Program sensor input in FPGA (Bayer, 8/16 bits, FPN, test mode, number of lines).
*/
*/
...
...
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