diff --git a/module_dfu/src/dfu.xc b/module_dfu/src/dfu.xc index 28f0e88c..a1a7e4cc 100644 --- a/module_dfu/src/dfu.xc +++ b/module_dfu/src/dfu.xc @@ -3,11 +3,7 @@ #include "devicedefines.h" #include "xud.h" -//#ifdef ARCH_G -//#include "XUD_USB_Defines.h" -//#else #include "usb.h" -//#endif #include "dfu_types.h" #include "flash_interface.h" diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index 7d12bfd2..0db5f12a 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -250,7 +250,7 @@ /* Device release number in BCD: 0xJJMN */ #define BCD_DEVICE_J 6 #define BCD_DEVICE_M 3 -#define BCD_DEVICE_N 2 +#define BCD_DEVICE_N 3 #ifndef BCD_DEVICE #define BCD_DEVICE ((BCD_DEVICE_J << 8) | ((BCD_DEVICE_M & 0xF) << 4) | (BCD_DEVICE_N & 0xF)) diff --git a/module_usb_audio/reboot.xc b/module_usb_audio/reboot.xc index 74964d6d..ace0b64a 100644 --- a/module_usb_audio/reboot.xc +++ b/module_usb_audio/reboot.xc @@ -10,10 +10,9 @@ unsigned get_tile_id(tileref); extern tileref tile[]; -/* Reboots XMOS device by writing to the PLL config register */ -void device_reboot_implementation(chanend spare) -{ -#ifdef XUD_ON_U_SERIES +void device_reboot_aux(void) +{ +#if (XUD_SERIES_SUPPORT == 1) /* Disconnect from bus */ unsigned data[] = {4}; write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data); @@ -27,12 +26,6 @@ void device_reboot_implementation(chanend spare) unsigned int tileId; unsigned int tileArrayLength; - 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)); - /* 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)); @@ -54,5 +47,17 @@ void device_reboot_implementation(chanend spare) read_sswitch_reg(localTileId, 6, pllVal); write_sswitch_reg_no_ack(localTileId, 6, pllVal); #endif - +} + +/* Reboots XMOS device by writing to the PLL config register */ +void device_reboot_implementation(chanend spare) +{ +#if (XUD_SERIES_SUPPORT != 1) + 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(); }