Skip to content

Commit

Permalink
Merge pull request #3 from Xilinx/master
Browse files Browse the repository at this point in the history
change wait_for_level to wait_for_value (Xilinx#1416)
  • Loading branch information
H1MSK committed Mar 22, 2023
2 parents f1af412 + de6b6fc commit 3fc55d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/overlay_design_methodology/pynq_and_asyncio.rst
Expand Up @@ -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<pynq-lib-button>` and
:ref:`Switch<pynq-lib-switch>` classes have a function ``wait_for_level`` and a
coroutine ``wait_for_level_async`` which block until the corresponding button or
:ref:`Switch<pynq-lib-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.

Expand All @@ -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
Expand Down

0 comments on commit 3fc55d5

Please sign in to comment.