if bit_clock_pin is word_select_pin or bit_clock_pin is data_pin or
word_select_pin \
continue
if is_hardware_i2s(bit_clock_pin, word_select_pin, data_pin):
print("Bit clock pin:", bit_clock_pin, "\t Word select pin:",
word_select_pin,
else:
pass
For details about the I2S API, check out the
Multitasking with asyncio
CircuitPython uses the asyncio library to support
CircuitPython, which includes the
e multitasking is a style of programming in which multiple tasks take turns running.
Each task runs until it needs to wait for something, or until it decides it has run for
long enough and should let another task run.
In cooperative multitasking, a scheduler manages the tasks. Only one task runs at a
time. When a task gives up control and starts waiting, the scheduler starts another
task that is ready to run. The scheduler runs an event loop which repeats this process
over and over for all the tasks assigned to the event loop.
A task is a kind of coroutine (). A coroutine can stop in the middle of some code.
When the coroutine is called again, it starts where it left off. A coroutine is declared
with the keyword
giving up control at that point.
This diagram shows the scheduler, running an event loop, with three tasks: Task 1 is
running, Task 2 is ready to run, and is waiting for Task 1 to give up control, and Task 3
is waiting for something else, and isn't ready to run yet.
©Adafruit Industries
is data_pin:
"\t Data pin:", data_pin)
async
, and the keyword
async
CircuitPython
docs ().
cooperative
and
language keywords. Cooperativ
await
indicates that the coroutine is
await
multitasking ()
in
Page 181 of 263
Need help?
Do you have a question about the ESP32-S3 and is the answer not in the manual?