forked from PAWPAW-Mirror/lib_xua
Tidied up XUD_SERIES_SUPPORT checking.
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
#include <xs1.h>
|
#include <xs1.h>
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <xs1_su.h>
|
#include <xs1_su.h>
|
||||||
#include <print.h>
|
|
||||||
|
#include "xud.h"
|
||||||
|
|
||||||
#define XS1_SU_PERIPH_USB_ID 0x1
|
#define XS1_SU_PERIPH_USB_ID 0x1
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ extern tileref tile[];
|
|||||||
|
|
||||||
void device_reboot_aux(void)
|
void device_reboot_aux(void)
|
||||||
{
|
{
|
||||||
#if (XUD_SERIES_SUPPORT == 1)
|
#if (XUD_SERIES_SUPPORT == XUD_U_SERIES)
|
||||||
/* Disconnect from bus */
|
/* Disconnect from bus */
|
||||||
unsigned data[] = {4};
|
unsigned data[] = {4};
|
||||||
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
|
||||||
@@ -52,7 +53,7 @@ void device_reboot_aux(void)
|
|||||||
/* Reboots XMOS device by writing to the PLL config register */
|
/* Reboots XMOS device by writing to the PLL config register */
|
||||||
void device_reboot_implementation(chanend spare)
|
void device_reboot_implementation(chanend spare)
|
||||||
{
|
{
|
||||||
#if (XUD_SERIES_SUPPORT != 1)
|
#if (XUD_SERIES_SUPPORT != XUD_U_SERIES)
|
||||||
outct(spare, XS1_CT_END); // have to do this before freeing the chanend
|
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
|
inct(spare); // Receive end ct from usb_buffer to close down in both directions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user