예제 #1
0
 def test_spi_controller(self):
     """Demo instanciation with an SpiController.
     """
     spi = SpiController(cs_count=1)
     spi.configure(self.ftdi_url)
     flash = SerialFlashManager.get_from_controller(spi, cs=0,
                                                    freq=self.frequency)
예제 #2
0
 def test_usb_device(self):
     """Demo instanciation from an existing UsbDevice.
     """
     candidate = Ftdi.get_identifiers(self.ftdi_url)
     usbdev = UsbTools.get_device(candidate[0])
     spi = SpiController(cs_count=1)
     spi.configure(usbdev, interface=candidate[1])
     flash = SerialFlashManager.get_from_controller(spi, cs=0,
                                                    freq=self.frequency)