Update AN00246 to API with master clock passed in

This commit is contained in:
Larry Snizek
2019-08-20 16:41:49 +01:00
parent f4ab2d9b82
commit 58eb2fe612
4 changed files with 8 additions and 21 deletions

View File

@@ -5,7 +5,8 @@ lib_xua Change Log
-----
* CHANGED: Remove sharing of global master clock port variable for
compatibility with tools 14.4
compatibility with tools 14.4 (API change but preserve 0.1
version as this is maintenance branch)
* CHANGED: Remove obsolete -fsubword-select to clear warning in tools 14.4
0.1.2

View File

@@ -3,14 +3,14 @@ APP_NAME = app_xua_simple
TARGET = xk-audio-216-mc.xn
# The flags passed to xcc when building the application
XCC_FLAGS = -fcomment-asm -Xmapper --map -Xmapper MAPFILE -O3 -report -fsubword-select -save-temps \
-g -Wno-unused-function -Wno-timing -DXUD_SERIES_SUPPORT=XUD_X200_SERIES -DUSB_TILE=tile[1] \
-DSDA_HIGH=2 -DSCL_HIGH=1 -fxscope
XCC_FLAGS = -fcomment-asm -Xmapper --map -Xmapper MAPFILE -O3 -report -save-temps \
-g -Wno-unused-function -Wno-timing -DXUD_SERIES_SUPPORT=XUD_X200_SERIES -DUSB_TILE=tile[1] \
-DSDA_HIGH=2 -DSCL_HIGH=1 -fxscope
# The USED_MODULES variable lists other module used by the application. These
# modules will extend the SOURCE_DIRS, INCLUDE_DIRS and LIB_DIRS variables.
# Modules are expected to be in the directory above the BASE_DIR directory.
USED_MODULES = lib_xua lib_device_control lib_xud module_i2c_shared module_i2c_single_port module_locks
USED_MODULES = lib_xua lib_xud module_i2c_shared module_i2c_single_port
#=============================================================================
# The following part of the Makefile includes the common build infrastructure

View File

@@ -24,13 +24,7 @@ buffered out port:32 p_bclk = PORT_I2S_BCLK; /* I2S L/R-clock */
/* Note, declared unsafe as sometimes we want to share this port
e.g. PDM mics and I2S use same master clock IO */
port p_mclk_in_ = PORT_MCLK_IN;
unsafe
{
/* TODO simplify this */
unsafe port p_mclk_in; /* Audio master clock input */
}
in port p_mclk_in = PORT_MCLK_IN;
in port p_for_mclk_count = PORT_MCLK_COUNT; /* Extra port for counting master clock ticks */
in port p_mclk_in2 = PORT_MCLK_IN2;
@@ -85,11 +79,7 @@ int main()
/* IOHub core does most of the audio IO i.e. I2S (also serves as a hub for all audio) */
on tile[0]: {
unsafe
{
p_mclk_in = p_mclk_in_;
}
XUA_AudioHub(c_aud);
XUA_AudioHub(c_aud, p_mclk_in);
}
}

View File

@@ -60,10 +60,6 @@ Warnings relating to configuration defines located in this XC source file rather
#warning AUDIO_CLASS not defined, using 2
#endif
#ifndef AUDIO_CLASS_FALLBACK
#warning AUDIO_CLASS_FALLBACK not defined, using 0 (i.e. disabled)
#endif
/* Sanity check on FS channel counts */
#if (NUM_USB_CHAN_OUT_FS > NUM_USB_CHAN_OUT)
#error NUM_USB_CHAN_OUT_FS expected to be less than or equal to NUM_USB_CHAN_OUT