Microchip® Advanced Software Framework

sam/drivers/iisc/unit_tests/unit_tests.c File Reference

Unit tests for IIS driver.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include <conf_test.h>
#include <string.h>

Macros

#define PDCA_IISC_CHANNEL0   0
 
#define PDCA_IISC_CHANNEL1   1
 
#define SOUND_SAMPLES   0x100
 

Functions

int main (void)
 Run IISC driver unit tests. More...
 
static void run_iis_test (const struct test_case *test)
 Test audio data transfer and receive. More...
 

Variables

volatile uint32_t flag = true
 
int16_t input_samples [SOUND_SAMPLES]
 
int16_t output_samples [SOUND_SAMPLES]
 
static const pdca_channel_config_t pdca_iisc_config_rx
 
static const pdca_channel_config_t pdca_iisc_config_tx
 

#define PDCA_IISC_CHANNEL0   0

Referenced by run_iis_test().

#define PDCA_IISC_CHANNEL1   1

Referenced by run_iis_test().

#define SOUND_SAMPLES   0x100

Referenced by run_iis_test().

volatile uint32_t flag = true
int16_t input_samples[SOUND_SAMPLES]

Referenced by run_iis_test().

int16_t output_samples[SOUND_SAMPLES]

Referenced by run_iis_test().

const pdca_channel_config_t pdca_iisc_config_rx
static
Initial value:
= {
.addr = 0,
.pid = IISC_PDCA_ID_RX,
.size = 0,
.r_addr = 0,
.r_size = 0,
.ring = false,
.transfer_size = PDCA_MR_SIZE_WORD
}
const pdca_channel_config_t pdca_iisc_config_tx
static
Initial value:
= {
.addr = 0,
.pid = IISC_PDCA_ID_TX,
.size = 0,
.r_addr = 0,
.r_size = 0,
.ring = false,
.transfer_size = PDCA_MR_SIZE_WORD
}