summaryrefslogtreecommitdiff
path: root/digital/mimot/tools/write_eeprom.py
diff options
context:
space:
mode:
Diffstat (limited to 'digital/mimot/tools/write_eeprom.py')
-rw-r--r--digital/mimot/tools/write_eeprom.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/digital/mimot/tools/write_eeprom.py b/digital/mimot/tools/write_eeprom.py
new file mode 100644
index 00000000..ab2ae315
--- /dev/null
+++ b/digital/mimot/tools/write_eeprom.py
@@ -0,0 +1,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 ()