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

@@ -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);
}
}