Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-init
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-init
Commits
4e330ce7
Commit
4e330ce7
authored
Dec 23, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10389 board not present case
parent
ff7dbb03
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
+30
-24
init_elphel393.py
src/init_elphel393.py
+30
-24
No files found.
src/init_elphel393.py
View file @
4e330ce7
...
@@ -133,6 +133,7 @@ def init_autoexp_daemon(index):
...
@@ -133,6 +133,7 @@ def init_autoexp_daemon(index):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
def
init_sata
(
sata_en
,
pydir
):
def
init_sata
(
sata_en
,
pydir
):
if
os
.
path
.
isfile
(
"/sys/devices/soc0/elphel393-pwr@0/detected_10389"
):
if
(
sata_en
==
1
):
if
(
sata_en
==
1
):
if
not
get_fpga
():
if
not
get_fpga
():
log_msg
(
"Waiting for the FPGA to be programmed to start SATA"
,
4
)
log_msg
(
"Waiting for the FPGA to be programmed to start SATA"
,
4
)
...
@@ -146,12 +147,15 @@ def init_sata(sata_en,pydir):
...
@@ -146,12 +147,15 @@ def init_sata(sata_en,pydir):
shout
(
"modprobe ahci_elphel &"
)
shout
(
"modprobe ahci_elphel &"
)
shout
(
"sleep 2"
)
shout
(
"sleep 2"
)
shout
(
"echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module"
)
shout
(
"echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module"
)
else
:
log_msg
(
"10389 was not detected: skipping SATA init"
)
def
init_usb_hub
():
def
init_usb_hub
():
"""
"""
Initializes USB HUB on 10389 board (stays init
u
ialized through reboot, does not respond after initialized)
Initializes USB HUB on 10389 board (stays initialized through reboot, does not respond after initialized)
"""
"""
if
not
os
.
path
.
exists
(
'/sys/bus/usb/devices/1-1'
):
if
not
os
.
path
.
exists
(
'/sys/bus/usb/devices/1-1'
):
if
os
.
path
.
isfile
(
'/sys/devices/soc0/elphel393-pwr@0/detected_10389'
):
shout
(
"i2cset -y 0 0x2c 0xff 0x0201 w"
)
shout
(
"i2cset -y 0 0x2c 0xff 0x0201 w"
)
shout
(
"i2cset -y 0 0x2c 0xff 0x0001 w"
)
shout
(
"i2cset -y 0 0x2c 0xff 0x0001 w"
)
shout
(
"i2cset -y 0 0x2c 0x00 0x3401 w"
)
shout
(
"i2cset -y 0 0x2c 0x00 0x3401 w"
)
...
@@ -161,6 +165,8 @@ def init_usb_hub():
...
@@ -161,6 +165,8 @@ def init_usb_hub():
shout
(
"i2cset -y 0 0x2c 0x08 0x0001 w"
)
shout
(
"i2cset -y 0 0x2c 0x08 0x0001 w"
)
shout
(
"i2cset -y 0 0x2c 0xff 0x0101 w"
)
shout
(
"i2cset -y 0 0x2c 0xff 0x0101 w"
)
log_msg
(
"Initialized USB hub with Vendor=1234"
)
log_msg
(
"Initialized USB hub with Vendor=1234"
)
else
:
log_msg
(
"10389 was not detected: skipping USB hub init"
)
else
:
else
:
log_msg
(
"USB hub was already initialized"
)
log_msg
(
"USB hub was already initialized"
)
...
@@ -249,7 +255,7 @@ else:
...
@@ -249,7 +255,7 @@ else:
log_msg
(
"skip imgsrv"
)
log_msg
(
"skip imgsrv"
)
#5
#5
log_msg
(
sys
.
argv
[
0
]
+
": auto exposure
and auto white balance
"
)
log_msg
(
sys
.
argv
[
0
]
+
": auto exposure
daemon
"
)
if
switch
[
'autoexp_daemon'
]
==
1
:
if
switch
[
'autoexp_daemon'
]
==
1
:
for
i
in
range
(
1
,
5
):
for
i
in
range
(
1
,
5
):
init_autoexp_daemon
(
str
(
i
-
1
))
init_autoexp_daemon
(
str
(
i
-
1
))
...
...
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