summaryrefslogtreecommitdiffhomepage
path: root/digital/asserv/tools/write_eeprom.py
blob: b6b9abd91a9aea2b4d02191a30975bb210614264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys

import asserv
import asserv.init
import proto.popen_io
import serial

if sys.argv[1] == '!':
    io = proto.popen_io.PopenIO (sys.argv[2:])
    init = asserv.init.host
else:
    io = serial.Serial (sys.argv[1])
    init = asserv.init.target
a = asserv.Proto (io, **init)
a.write_eeprom ()
a.close ()