Example for “ i2s_channel_register_event_callback “

JosephN
Posts: 2
Joined: Mon Jul 03, 2023 5:13 am

Example for “ i2s_channel_register_event_callback “

Postby JosephN » Mon Jul 03, 2023 5:20 am

I’m making an asynchronous I2S system where the esp32 and read from a microphone and write to a speaker at the same time. According to espressIf documentation, i2s_read() and i2s_write() are blocking functions, so for asynchronous I2S, we have to register some callbacks for it but I’m not sure how. Any already made examples or guidance would be much appreciated. Thank you.

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Example for “ i2s_channel_register_event_callback “

Postby ESP_Sprite » Mon Jul 03, 2023 8:30 am

You could simply read and write from two separate tasks. If you still want to use events, there's some test code here that may be enlightening.

Who is online

Users browsing this forum: No registered users and 136 guests