Commit fb2f9faf authored by user's avatar user

Add a function to return the file descriptor of the SPEC board.

This function is used by the fmc_delay C library.
parent 0927c197
......@@ -70,6 +70,9 @@ class Gennum(object):
self.loaderlib = CDLL(cwd + Gennum.rr_loader_lib)
self.fd =, os.O_RDWR)
def get_fd(self):
return self.fd
def iread(self, bar, offset, width):
"""do a read by means of the ioctl interface
......@@ -188,10 +191,11 @@ class Gennum(object):
return self.errno
def load_firmware(self, bitstream):
self.err = self.loaderlib.rr_init(self.fd)
return self.loaderlib.rr_load_bitstream_from_file(bitstream)
self.err = self.loaderlib.rr_load_bitstream_from_file(bitstream)
return self.err
if __name__ == '__main__':
g = Gennum()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment