code help. Write/Read to buffer with SakuraG

Hello, I’m trying to understand this code: github.com/newaetech/chipwhispe … SAKURAG.py

I’ve noticed that for reading/writting to the buffer you have to write: sasebo.write / sasebo.read.

Why do you put sasebo before the method? sasebo is the buffer, right? where does this name come from?

What happend if I just put “write” without sasebo ?

Example codes:

Thanks in advance

Hello there,

The “sasebo” is the FTDI D2XX driver. There is a chunk of code like this:

def con(self):
        try:
            self.sasebo = ft.openEx(self.serNo)
        except ft.ftd2xx.DeviceError, e:
            self.sasebo = None
            print "Failed to find device: %s" % str(e)
            return False

        self.sasebo.setTimeouts(1000, 1000)

        return True

The line “self.sasebo = …” sets the SASEBO piece to be your FTDI D2XX driver API. So it’s just read/writing to that chip!

-Colin