forked from PAWPAW-Mirror/lib_xua
Merge pull request #118 from larry-xmos/feature/dfu_detach_time_out
Expose DFU detach timeout value
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved
|
// Copyright (c) 2011-2020, XMOS Ltd, All rights reserved
|
||||||
/*
|
/*
|
||||||
* @brief Defines relating to device configuration and customisation of lib_xua
|
* @brief Defines relating to device configuration and customisation of lib_xua
|
||||||
* @author Ross Owen, XMOS Limited
|
* @author Ross Owen, XMOS Limited
|
||||||
@@ -1445,6 +1445,12 @@ enum USBEndpointNumber_Out
|
|||||||
#error Bad DEFAULT_MCLK_FREQ
|
#error Bad DEFAULT_MCLK_FREQ
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* DFU functional descriptor wDetachTimeOut field (milliseconds)
|
||||||
|
* Time for device to wait for bus reset after DETACH request before reverting to idle state */
|
||||||
|
#ifndef DFU_DETACH_TIME_OUT
|
||||||
|
#define DFU_DETACH_TIME_OUT 250
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ((MCLK_441 % MIN_FREQ) == 0)
|
#if ((MCLK_441 % MIN_FREQ) == 0)
|
||||||
#define MIN_FREQ_44 MIN_FREQ
|
#define MIN_FREQ_44 MIN_FREQ
|
||||||
#define MIN_FREQ_48 ((48000 * 512)/((44100 * 512)/MIN_FREQ))
|
#define MIN_FREQ_48 ((48000 * 512)/((44100 * 512)/MIN_FREQ))
|
||||||
@@ -1466,4 +1472,3 @@ enum USBEndpointNumber_Out
|
|||||||
#if (CODEC_MASTER == 1) && (DSD_CHANS_DAC != 0)
|
#if (CODEC_MASTER == 1) && (DSD_CHANS_DAC != 0)
|
||||||
#error CODEC_MASTER with DSD is currently unsupported
|
#error CODEC_MASTER with DSD is currently unsupported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -2068,8 +2068,8 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
|
|||||||
0x09, /* 0 Size */
|
0x09, /* 0 Size */
|
||||||
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
||||||
0x07, /* 2 bmAttributes */
|
0x07, /* 2 bmAttributes */
|
||||||
0xFA, /* 3 wDetachTimeOut */
|
DFU_DETACH_TIME_OUT & 0xFF, /* 3 wDetachTimeOut */
|
||||||
0x00, /* 4 wDetachTimeOut */
|
(DFU_DETACH_TIME_OUT >> 8) & 0xFF, /* 4 wDetachTimeOut */
|
||||||
0x40, /* 5 wTransferSize */
|
0x40, /* 5 wTransferSize */
|
||||||
0x00, /* 6 wTransferSize */
|
0x00, /* 6 wTransferSize */
|
||||||
0x10, /* 7 bcdDFUVersion */
|
0x10, /* 7 bcdDFUVersion */
|
||||||
@@ -2849,8 +2849,8 @@ unsigned char cfgDesc_Audio1[] =
|
|||||||
0x09, /* 0 Size */
|
0x09, /* 0 Size */
|
||||||
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
||||||
0x07, /* 2 bmAttributes */
|
0x07, /* 2 bmAttributes */
|
||||||
0xFA, /* 3 wDetachTimeOut */
|
DFU_DETACH_TIME_OUT & 0xFF, /* 3 wDetachTimeOut */
|
||||||
0x00, /* 4 wDetachTimeOut */
|
(DFU_DETACH_TIME_OUT >> 8) & 0xFF, /* 4 wDetachTimeOut */
|
||||||
0x40, /* 5 wTransferSize */
|
0x40, /* 5 wTransferSize */
|
||||||
0x00, /* 6 wTransferSize */
|
0x00, /* 6 wTransferSize */
|
||||||
0x10, /* 7 bcdDFUVersion */
|
0x10, /* 7 bcdDFUVersion */
|
||||||
|
|||||||
Reference in New Issue
Block a user