From 8e861e0a5e9381eab58bfa8af7c11ae20bf12ff5 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 24 May 2017 10:45:56 +0100 Subject: [PATCH] DFU flash code run on tile[0] even if XUD_TILE and AUDIO_IO_TILE are not 0 --- CHANGELOG.rst | 1 + module_usb_audio/audio_io/audio_io.xc | 4 ++-- module_usb_audio/audio_io/xua_audio.h | 2 +- module_usb_audio/main.xc | 13 ++++++++++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e9482274..c77b3866 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,7 @@ sc_usb_audio Change Log ----- - ADDED: DFU to UAC1 descriptors (guarded by DFU and FORCE_UAC1_DFU) - RESOLVED: Removed 'reinterpretation to type of larger alignment' warnings + - RESOLVED: DFU flash code run on tile[0] even if XUD_TILE and AUDIO_IO_TILE are not 0 7.1.0 ----- diff --git a/module_usb_audio/audio_io/audio_io.xc b/module_usb_audio/audio_io/audio_io.xc index e5e161c1..198ec462 100755 --- a/module_usb_audio/audio_io/audio_io.xc +++ b/module_usb_audio/audio_io/audio_io.xc @@ -1113,7 +1113,7 @@ chanend c_spdif_out, chanend c_dig_rx, #endif chanend ?c_config, chanend ?c -#if XUD_TILE != 0 +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) , server interface i_dfu ?dfuInterface #endif #if (NUM_PDM_MICS > 0) @@ -1392,7 +1392,7 @@ chanend ?c_config, chanend ?c while (1) { -#if XUD_TILE != 0 +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) [[combine]] par { diff --git a/module_usb_audio/audio_io/xua_audio.h b/module_usb_audio/audio_io/xua_audio.h index 12601237..0f7726b5 100644 --- a/module_usb_audio/audio_io/xua_audio.h +++ b/module_usb_audio/audio_io/xua_audio.h @@ -37,7 +37,7 @@ void audio(chanend c_in, chanend c_dig, #endif chanend ?c_config, chanend ?c_adc -#if (XUD_TILE != 0) +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) , server interface i_dfu ?dfuInterface #endif #if (NUM_PDM_MICS > 0) diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 45b47c67..0fafcbdc 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -415,7 +415,7 @@ void usb_audio_io(chanend c_aud_in, chanend ?c_adc, chanend ?c_adat_rx, chanend ?c_clk_ctl, chanend ?c_clk_int -#if (XUD_TILE != 0) +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) , server interface i_dfu ?dfuInterface #endif #if (NUM_PDM_MICS > 0) @@ -459,7 +459,7 @@ void usb_audio_io(chanend c_aud_in, chanend ?c_adc, c_dig_rx, #endif c_aud_cfg, c_adc -#if XUD_TILE != 0 +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) , dfuInterface #endif #if (NUM_PDM_MICS > 0) @@ -606,7 +606,7 @@ int main() , c_mix_ctl #endif ,c_aud_cfg, c_spdif_rx, c_adat_rx, c_clk_ctl, c_clk_int -#if XUD_TILE != 0 +#if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) , dfuInterface #endif #if (NUM_PDM_MICS > 0) @@ -674,6 +674,13 @@ int main() } #endif +#if (XUD_TILE != 0 ) && (AUDIO_IO_TILE != 0) + /* Run flash code on its own - hope it gets combined */ +#warning Running DFU flash code on its own + on stdcore[0]: DFUHandler(dfuInterface, null); +#endif + + #if (NUM_PDM_MICS > 0) on stdcore[PDM_TILE]: pdm_mic(c_ds_output); #ifdef MIC_PROCESSING_USE_INTERFACE