forked from PAWPAW-Mirror/lib_xua
Also update i2s_loopback test to work with 14.4 tools
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2017-2018, XMOS Ltd, All rights reserved
|
// Copyright (c) 2017-2019, XMOS Ltd, All rights reserved
|
||||||
|
|
||||||
/* A very simple *example* of a USB audio application (and as such is un-verified for production)
|
/* A very simple *example* of a USB audio application (and as such is un-verified for production)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
|
// Copyright (c) 2016-2019, XMOS Ltd, All rights reserved
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <print.h>
|
#include <print.h>
|
||||||
@@ -79,18 +79,12 @@ buffered out port:32 p_bclk = PORT_I2S_BCLK; /* I2S L/R-clock */
|
|||||||
|
|
||||||
/* Note, declared unsafe as sometimes we want to share this port
|
/* Note, declared unsafe as sometimes we want to share this port
|
||||||
e.g. PDM mics and I2S use same master clock IO */
|
e.g. PDM mics and I2S use same master clock IO */
|
||||||
port p_mclk_in_ = PORT_MCLK_IN;
|
in port p_mclk_in = PORT_MCLK_IN;
|
||||||
|
|
||||||
/* Clock-block declarations */
|
/* Clock-block declarations */
|
||||||
clock clk_audio_bclk = on tile[AUDIO_IO_TILE]: XS1_CLKBLK_1; /* Bit clock */
|
clock clk_audio_bclk = on tile[AUDIO_IO_TILE]: XS1_CLKBLK_1; /* Bit clock */
|
||||||
clock clk_audio_mclk = on tile[AUDIO_IO_TILE]: XS1_CLKBLK_2; /* Master clock */
|
clock clk_audio_mclk = on tile[AUDIO_IO_TILE]: XS1_CLKBLK_2; /* Master clock */
|
||||||
|
|
||||||
unsafe
|
|
||||||
{
|
|
||||||
/* TODO simplify this */
|
|
||||||
unsafe port p_mclk_in; /* Audio master clock input */
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef SIMULATION
|
#ifdef SIMULATION
|
||||||
#define INITIAL_SKIP_FRAMES 10
|
#define INITIAL_SKIP_FRAMES 10
|
||||||
#define TOTAL_TEST_FRAMES 100
|
#define TOTAL_TEST_FRAMES 100
|
||||||
@@ -224,13 +218,9 @@ int main(void)
|
|||||||
par {
|
par {
|
||||||
on tile[AUDIO_IO_TILE]:
|
on tile[AUDIO_IO_TILE]:
|
||||||
{
|
{
|
||||||
unsafe
|
|
||||||
{
|
|
||||||
p_mclk_in = p_mclk_in_;
|
|
||||||
}
|
|
||||||
par
|
par
|
||||||
{
|
{
|
||||||
XUA_AudioHub(c_out);
|
XUA_AudioHub(c_out, p_mclk_in);
|
||||||
generator(c_checker, c_out);
|
generator(c_checker, c_out);
|
||||||
checker(c_checker, 0);
|
checker(c_checker, 0);
|
||||||
#ifdef SIMULATION
|
#ifdef SIMULATION
|
||||||
|
|||||||
Reference in New Issue
Block a user