How to use the pfio.get_spi_handler function in pfio

To help you get started, we’ve selected a few pfio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thomasmacpherson / piface / python / piface / spivisualiser.py View on Github external
def init():
    window = gtk.Window()
    window.connect("delete-event", gtk.main_quit)
    window.set_title("SPI Visualiser")
    window.set_size_request(500, 200)

    visualiser = SpiVisualiserSection()
    sender     = SpiSenderSection()

    pfio.spi_handler = pfio.get_spi_handler()
    pfio.spi_visualiser_section = visualiser

    visualiser.show()
    sender.show()

    container = gtk.VBox()
    container.pack_start(child=visualiser, expand=True, fill=True)
    container.pack_start(child=sender, expand=False)
    container.show()
    window.add(container)
    window.show()
    gtk.main()