pynq.lib.switch Module

The pynq.lib.switch module is a driver for reading, and waiting for value changes on onboard switches.

class pynq.lib.switch.Switch(device)[source]

Bases: object

This class controls the onboard switches.


An object with appropriate Switch methods


Read the current value of the switch.


Wait for the switch to be closed or opened.

Parameters:value (int) – 1 for the switch up and 0 for the switch down