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

import mimot
import mimot.init
import proto.popen_io
import serial

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