Merge pull request #23 from larry-xmos/vf_2.0.1_alpha_merge

Merge back VocalFusion 2.0.1 release branch
This commit is contained in:
Ross Owen
2018-01-23 14:57:34 +00:00
committed by GitHub
4 changed files with 13 additions and 13 deletions

View File

@@ -56,7 +56,7 @@
#if (XUA_DFU_EN == 1)
#include "xua_dfu.h"
#define DFU_IF_NUM INPUT_INTERFACES + OUTPUT_INTERFACES + MIDI_INTERFACES + 1
extern void device_reboot(chanend);
extern void device_reboot(void);
#endif
unsigned int DFU_mode_active = 0; // 0 - App active, 1 - DFU active
@@ -579,7 +579,7 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
if(reset)
{
DFUDelay(50000000);
device_reboot(c_audioControl);
device_reboot();
}
}
#endif
@@ -794,7 +794,7 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
/* Send reboot command */
DFUDelay(5000000);
device_reboot(c_audioControl);
device_reboot();
}
}
#endif

View File

@@ -1,5 +1,6 @@
#include <xs1.h>
#include <platform.h>
#include <print.h>
#include <xs1_su.h>
#define XS1_SU_PERIPH_USB_ID 0x1
@@ -30,8 +31,10 @@ static void reset_tile(unsigned const tileId)
write_sswitch_reg_no_ack(tileId, 6, pllVal);
}
/* Note - resetting is per *node* not tile */
static inline void device_reboot_aux(void)
/* Reboots XMOS device by writing to the PLL config register
* Note - resetting is per *node* not tile
*/
void device_reboot(void)
{
#if (XUD_SERIES_SUPPORT == 1)
/* Disconnect from bus */
@@ -72,10 +75,10 @@ static inline void device_reboot_aux(void)
#ifdef __XS2A__
/* Reset all even tiles, starting from the remote ones */
for(unsigned int tileNum = tileArrayLength-2; tileNum>=0; tileNum-=2)
for(int tileNum = tileArrayLength-2; tileNum>=0; tileNum-=2)
#else
/* Reset all tiles, starting from the remote ones */
for(unsigned int tileNum = tileArrayLength-1; tileNum>=0; tileNum--)
for(int tileNum = tileArrayLength-1; tileNum>=0; tileNum--)
#endif
{
/* Cannot cast tileref to unsigned! */
@@ -96,11 +99,6 @@ static inline void device_reboot_aux(void)
/* Finally reboot the node this tile resides on */
reset_tile(localTileId);
#endif
}
/* Reboots XMOS device by writing to the PLL config register */
void device_reboot(chanend spare)
{
device_reboot_aux();
while(1);
while (1);
}