chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
153e80380f27ef2405ee3b8c159e7b6de7c67ad8
[reprap-play.git]
/
read-firmware
1
#!/bin/bash
2
3
set -ex
4
5
if [ $# = 0 ]; then
6
port=/dev/ttyUSB0
7
else
8
port="$1"; shift
9
fi
10
11
ad () {
12
avrdude -b 38400 -v -P $port -p atmega644P -c arduino "$@"
13
}
14
15
args=''
16
for f in flash eeprom hfuse lfuse efuse; do
17
args+=" -U $f:r:firmware-$f.hex:i"
18
done
19
20
ad "$@"
21
ad "$@" $args