summaryrefslogtreecommitdiffstats
path: root/toprammer
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-02-07 14:09:04 +0100
committerMichael Buesch <mb@bu3sch.de>2010-02-07 14:09:04 +0100
commit098382460369033083a23f1fa20991a5533c9b26 (patch)
tree56b01280ee1e3a5ad373add20144cac9a867d0f8 /toprammer
parent8c78271b641ebfbb0b0a4df0a7a0bdc619bbfb26 (diff)
downloadtoprammer-098382460369033083a23f1fa20991a5533c9b26.tar.xz
toprammer-098382460369033083a23f1fa20991a5533c9b26.zip
Add function for writing to the FPGA
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'toprammer')
-rwxr-xr-xtoprammer7
1 files changed, 6 insertions, 1 deletions
diff --git a/toprammer b/toprammer
index 7a4e63e..00b57f4 100755
--- a/toprammer
+++ b/toprammer
@@ -289,10 +289,15 @@ class TOP:
"""Read a byte from the FPGA data line into the status register."""
self.send("\x01")
- def cmdFPGAWriteByte(self, byte):
+ def cmdFPGAWriteByte(self, byte):#FIXME
"""Write a byte to the FPGA data line."""
self.send("\x10" + chr(byte))
+ def cmdFPGAWrite(self, address, byte):
+ """Write a byte to an FPGA address."""
+ cmd = chr(0x0A) + chr(address) + chr(byte)
+ self.send(cmd)
+
def cmdSetGNDPin(self, zifPin):
"""Assign GND to a ZIF socket pin. 0=none"""
valid = (0, 5, 14, 15, 16, 17, 18, 19, 20, 24, 26, 27,
bues.ch cgit interface