HDMI Co-routine Examples

Are there any examples for asynchronous versions of read and write frames?
(Code block taken from the user-guide online)

async def readframes():
    while True:
        frame = await hdmi_in.readframe_async()
        await dma.sendchannel.wait_async()
async def writeframes():
    while True:
        frame = hdmi_out.newframe()
        await dma.recvchannel.wait()
        await hdmi_out.writeframe_async(frame)

I have created task to run the coroutine and I wanted to see whether there is an example is I can refer to.

Board: PYNQ-Z1
Video-in spec: (from hdmi_in.mode function)
VideoMode: width=1280 height=720 bpp=24 fps=60

1 Like