Unit tests for IIS driver.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
static void run_iis_test |
( |
const struct test_case * |
test | ) |
|
|
static |
Test audio data transfer and receive.
- Parameters
-
Since the transfer and receive timing is not under control, we need adjust here the enable sequence and add some delay functions if it's needed.
References iis_config::data_format, delay_us, flag, iis_config::fs_ratio, genclk_config_defaults(), genclk_config_set_divider(), genclk_config_set_source(), genclk_enable(), genclk_enable_source(), GENCLK_SRC_CLK_CPU, IIS_CHANNEL_STEREO, IIS_DATE_16BIT_COMPACT, iis_disable(), iis_enable(), iis_enable_clocks(), iis_enable_reception(), iis_enable_transmission(), IIS_FS_RATE_256, iis_get_config_defaults(), iis_init(), IIS_ONE_DMA_CHANNEL_FOR_BOTH_CHANNELS, IIS_SLOT_LENGTH_16BIT, input_samples, iis_config::loopback, output_samples, PDCA_CH_TRANSFER_COMPLETED, pdca_channel_disable(), pdca_channel_enable(), pdca_channel_set_config(), pdca_channel_write_load(), pdca_disable(), pdca_enable(), pdca_get_channel_status(), PDCA_IISC_CHANNEL0, PDCA_IISC_CHANNEL1, pll_config_init(), pll_enable(), PLL_SRC_OSC0, pll_wait_for_lock(), iis_config::rx_channels, iis_config::rx_dma, iis_config::slot_length, SOUND_SAMPLES, sysclk_set_prescalers(), sysclk_set_source(), SYSCLK_SRC_PLL0, test_assert_true, iis_config::tx_channels, and iis_config::tx_dma.
Referenced by main().