Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
f0cadac8
Commit
f0cadac8
authored
Sep 04, 2012
by
Henrik Nordstrom
Browse files
fel-gpio: Wrapper script to ease live GPIO settings
parent
8a2c09f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
fel-gpio
0 → 100755
View file @
f0cadac8
#!/bin/sh
pio_to_sram
=
0x2000
sram_to_pio
=
0x2004
if
[
-f
fel-pio.bin
]
;
then
./fel write 0x2000 fel-pio.bin
else
./fel write 0x2000 bin/fel-pio.bin
fi
./fel
exec
$pio_to_sram
./fel
read
0x3000 0x228 pio.reg
./pio
-i
pio.reg print
>
pio.old
cat
pio.old | fgrep
-v
'<0><0><0><0>'
while
read
cmd
;
do
./pio
-i
pio.reg
-o
pio.reg
$cmd
./fel write 0x3000 pio.reg
./fel exe 0x2004
./fel exe 0x2000
./fel
read
0x3000 0x228 pio.reg
./pio
-i
pio.reg print
>
pio.new
diff
-U0
pio.old pio.new
mv
-f
pio.new pio.old
done
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