mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-16 14:08:46 +08:00

This commit implements the loopback mode for the i2schar example application. This mode - available only when both RX and TX are enabled - allows the user to test the I2S buses when the TX pin is connected to the RX pin. This is done by pre-filling a buffer with known data (additionally, it checks the peripheral's data width to format the data in the buffer accordingly) and passing it for both the transmitter and the receiver threads. This buffer is written to the TX and the received buffer is compared to the known buffer. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>