Merge branch 'master' into pdm_replay

This commit is contained in:
Brendon Le Comte
2017-05-25 13:36:53 +01:00
committed by GitHub
8 changed files with 37 additions and 22 deletions

View File

@@ -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
{

View File

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

View File

@@ -479,19 +479,19 @@
/**
* @brief Product string for Audio Class 2.0 mode.
*
* Default: "xCore USB Audio 2.0"
* Default: "XMOS xCORE (UAC2.0)"
*/
#ifndef PRODUCT_STR_A2
#define PRODUCT_STR_A2 "xCORE USB Audio 2.0"
#define PRODUCT_STR_A2 "XMOS xCORE (UAC2.0)"
#endif
/**
* @brief Product string for Audio Class 1.0 mode
*
* Default: "xCore USB Audio 1.0"
* Default: "XMOS xCORE (UAC1.0)"
*/
#ifndef PRODUCT_STR_A1
#define PRODUCT_STR_A1 "xCORE USB Audio 1.0"
#define PRODUCT_STR_A1 "XMOS xCORE (UAC1.0)"
#endif
/**

View File

@@ -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,7 +674,14 @@ int main()
}
#endif
#ifndef PDM_RECORD
#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
#ifndef PDM_RECORD
#if (NUM_PDM_MICS > 0)
on stdcore[PDM_TILE]: pdm_mic(c_ds_output);
#ifdef MIC_PROCESSING_USE_INTERFACE

View File

@@ -7,6 +7,8 @@
#define XS1_SU_PERIPH_USB_ID 0x1
#if (XUD_SERIES_SUPPORT == XUD_X200_SERIES)
#include "xs2_su_registers.h"
#define XS2_SU_PERIPH_USB_ID 0x1
#define PLL_MASK 0x7FFFFFFF
#else
#define PLL_MASK 0xFFFFFFFF
@@ -33,6 +35,12 @@ void device_reboot_aux(void)
unsigned int tileId;
unsigned int tileArrayLength;
#if (XUD_SERIES_SUPPORT == XUD_X200_SERIES)
/* Disconnect from bus */
unsigned data[] = {4};
write_periph_32(usb_tile, XS2_SU_PERIPH_USB_ID, XS1_GLX_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
#endif
/* Find size of tile array - note in future tools versions this will be available from platform.h */
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
@@ -61,14 +69,6 @@ void device_reboot_aux(void)
/* Reboots XMOS device by writing to the PLL config register */
void device_reboot(chanend spare)
{
#if (XUD_SERIES_SUPPORT != XUD_U_SERIES)
//outct(spare, XS1_CT_END); // have to do this before freeing the chanend
//inct(spare); // Receive end ct from usb_buffer to close down in both directions
/* Need a spare chanend so we can talk to the pll register */
//asm("freer res[%0]"::"r"(spare));
#endif
device_reboot_aux();
while(1);
}