Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change wait_for_level to wait_for_value #1416

Merged
merged 1 commit into from Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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