diff --git a/docs/source/overlay_design_methodology/pynq_and_asyncio.rst b/docs/source/overlay_design_methodology/pynq_and_asyncio.rst index 8c248daab..cdab64597 100644 --- a/docs/source/overlay_design_methodology/pynq_and_asyncio.rst +++ b/docs/source/overlay_design_methodology/pynq_and_asyncio.rst @@ -161,8 +161,8 @@ GPIO Peripherals User I/O peripherals can trigger interrupts when switches are toggled or buttons are pressed. Both the :ref:`Button` and -:ref:`Switch` classes have a function ``wait_for_level`` and a -coroutine ``wait_for_level_async`` which block until the corresponding button or +:ref:`Switch` classes have a function ``wait_for_value`` and a +coroutine ``wait_for_value_async`` which block until the corresponding button or switch has the specified value. This follows a convention throughout the pynq package that that coroutines have an ``_async`` suffix. @@ -178,9 +178,9 @@ is defined: button = base.buttons[number] led = base.leds[number] while True: - await button.wait_for_level_async(1) + await button.wait_for_value_async(1) led.on() - await button.wait_for_level_async(0) + await button.wait_for_value_async(0) led.off() Next add instances of the coroutine to the default event loop