forked from PAWPAW-Mirror/lib_xua
xpd: Cleaned up whitespace
This commit is contained in:
@@ -344,7 +344,7 @@ int DFUReportResetState(chanend ?c_user_cmd)
|
||||
#ifdef START_IN_DFU
|
||||
flag = 0x11042011;
|
||||
#endif
|
||||
|
||||
|
||||
if (flag == 0x11042011)
|
||||
{
|
||||
unsigned int cmd_data[16];
|
||||
|
||||
@@ -47,7 +47,7 @@ static unsigned samplesOut[MAX(NUM_USB_CHAN_OUT, I2S_CHANS_DAC)];
|
||||
#endif
|
||||
|
||||
/* Two buffers for ADC data to allow for DAC and ADC I2S ports being offset */
|
||||
#define IN_CHAN_COUNT (I2S_CHANS_ADC + NUM_PDM_MICS + (8*ADAT_RX) + (2*SPDIF_RX))
|
||||
#define IN_CHAN_COUNT (I2S_CHANS_ADC + NUM_PDM_MICS + (8*ADAT_RX) + (2*SPDIF_RX))
|
||||
|
||||
static unsigned samplesIn[2][MAX(NUM_USB_CHAN_IN, IN_CHAN_COUNT)];
|
||||
|
||||
|
||||
@@ -1135,7 +1135,7 @@ int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp
|
||||
}
|
||||
#else
|
||||
return XUD_SetBuffer(ep0_in, (buffer, unsigned char[]), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2271,8 +2271,8 @@ const unsigned num_freqs_a1 = MAX(3, (0
|
||||
#define DFU_INTERFACES_A1 0
|
||||
#endif
|
||||
|
||||
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
|
||||
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
|
||||
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
|
||||
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
|
||||
* For us this is IT -> FU -> OT * 2 and a header */
|
||||
#define AC_TOTAL_LENGTH (AC_LENGTH + \
|
||||
(INPUT_INTERFACES_A1 * (12 + ( (8 + NUM_USB_CHAN_IN_FS) * INPUT_VOLUME_CONTROL) + 9)) +\
|
||||
@@ -2284,8 +2284,8 @@ const unsigned num_freqs_a1 = MAX(3, (0
|
||||
//#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (58 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES)
|
||||
//#endif
|
||||
|
||||
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
|
||||
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
|
||||
/* Total number of bytes returned for the class-specific AudioControl interface descriptor.
|
||||
* Includes the combined length of this descriptor header and all Unit and Terminal descriptors
|
||||
* For us this is IT -> FU -> OT * 2 and a header */
|
||||
#define AC_TOTAL_LENGTH (AC_LENGTH + \
|
||||
(INPUT_INTERFACES_A1 * (12 + ( (8 + NUM_USB_CHAN_IN_FS) * INPUT_VOLUME_CONTROL) + 9)) +\
|
||||
@@ -2512,7 +2512,7 @@ unsigned char cfgDesc_Audio1[] =
|
||||
0x01, /* bInterfaceClas - AUDIO */
|
||||
0x02, /* bInterfaceSubclass - AUDIO_STREAMING */
|
||||
0x00, /* bInterface Protocol - Unused */
|
||||
offsetof(StringDescTable_t, outputInterfaceStr_Audio1)/sizeof(char *), /* iInterface */
|
||||
offsetof(StringDescTable_t, outputInterfaceStr_Audio1)/sizeof(char *), /* iInterface */
|
||||
|
||||
/* Class-Specific AS Interface Descriptor (4.5.2) */
|
||||
0x07,
|
||||
@@ -2630,7 +2630,7 @@ unsigned char cfgDesc_Audio1[] =
|
||||
0x01, /* Interface class - AUDIO */
|
||||
0x02, /* subclass - AUDIO_STREAMING */
|
||||
0x00, /* Unused */
|
||||
offsetof(StringDescTable_t, inputInterfaceStr_Audio1)/sizeof(char *),
|
||||
offsetof(StringDescTable_t, inputInterfaceStr_Audio1)/sizeof(char *),
|
||||
|
||||
/* Standard Interface Descriptor - Audio streaming IN */
|
||||
0x09,
|
||||
@@ -2641,7 +2641,7 @@ unsigned char cfgDesc_Audio1[] =
|
||||
0x01, /* Interface class - AUDIO */
|
||||
0x02, /* Subclass - AUDIO_STREAMING */
|
||||
0x00, /* Unused */
|
||||
offsetof(StringDescTable_t, inputInterfaceStr_Audio1)/sizeof(char *),
|
||||
offsetof(StringDescTable_t, inputInterfaceStr_Audio1)/sizeof(char *),
|
||||
|
||||
/* CS_Interface AC interface header descriptor */
|
||||
0x07,
|
||||
|
||||
@@ -300,7 +300,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
|
||||
{
|
||||
/* Returns XUD_RES_OKAY for success, XUD_RES_RST for bus reset */
|
||||
XUD_Result_t result = USB_GetSetupPacket(ep0_out, ep0_in, &sp);
|
||||
|
||||
|
||||
if (result == XUD_RES_OKAY)
|
||||
{
|
||||
result = XUD_RES_ERR;
|
||||
|
||||
@@ -577,7 +577,7 @@ int main()
|
||||
par
|
||||
{
|
||||
USER_MAIN_CORES
|
||||
|
||||
|
||||
on tile[XUD_TILE]:
|
||||
par
|
||||
{
|
||||
@@ -694,7 +694,7 @@ int main()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PDM_RECORD
|
||||
#ifndef PDM_RECORD
|
||||
#if (NUM_PDM_MICS > 0)
|
||||
on stdcore[PDM_TILE]: pdm_mic(c_ds_output);
|
||||
#ifdef MIC_PROCESSING_USE_INTERFACE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#if (NUM_PDM_MICS > 0) && !defined(MIC_PROCESSING_USE_INTERFACE)
|
||||
|
||||
#include "mic_array_frame.h"
|
||||
#include "mic_array_frame.h"
|
||||
|
||||
/* Deafult implementations of user_pdm_init() and user_pdm_process(). Both can be over-ridden */
|
||||
void user_pdm_init() __attribute__ ((weak));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#define XS1_SU_PERIPH_USB_ID 0x1
|
||||
|
||||
//Normally we would enumerate the XUD_SERIES_SUPPORT possibilities using defines in
|
||||
//Normally we would enumerate the XUD_SERIES_SUPPORT possibilities using defines in
|
||||
//xud.h but we have hard coded them to remove dependancy of sc_xud
|
||||
|
||||
#if (XUD_SERIES_SUPPORT == 4)
|
||||
@@ -37,9 +37,9 @@ void device_reboot_aux(void)
|
||||
unsigned int tileArrayLength;
|
||||
|
||||
#if (XUD_SERIES_SUPPORT == 4)
|
||||
/* 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);
|
||||
/* 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 */
|
||||
|
||||
@@ -1020,4 +1020,4 @@ void decouple(chanend c_mix_out
|
||||
#endif /* NUM_USB_CHAN_IN > 0 */
|
||||
}
|
||||
}
|
||||
#endif /* NO_USB */
|
||||
#endif /* NO_USB */
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
#include <interrupt.h>
|
||||
|
||||
register_interrupt_handler(handle_audio_request, 1, 200)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -258,7 +258,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
||||
XUD_SetReady_In(ep_hid, g_hidData, 1);
|
||||
#endif
|
||||
|
||||
#if (AUDIO_CLASS == 1)
|
||||
#if (AUDIO_CLASS == 1)
|
||||
#if (NUM_USB_CHAN_IN == 0) || defined (UAC_FORCE_FEEDBACK_EP)
|
||||
/* In UAC1 we dont use a stream start event (and we are always FS) so mark FB EP ready now */
|
||||
XUD_SetReady_In(ep_aud_fb, (fb_clocks, unsigned char[]), 3);
|
||||
@@ -354,7 +354,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
||||
SET_SHARED_GLOBAL(g_freqChange_sampFreq, receivedSampleFreq);
|
||||
}
|
||||
#if (AUDIO_CLASS == 2)
|
||||
else
|
||||
else
|
||||
if(cmd == SET_STREAM_FORMAT_IN)
|
||||
{
|
||||
unsigned formatChange_DataFormat = inuint(c_aud_ctl);
|
||||
@@ -370,7 +370,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
|
||||
/* FIXME when FB EP is enabled there is no inital XUD_SetReady */
|
||||
else if (cmd == SET_STREAM_FORMAT_OUT)
|
||||
{
|
||||
|
||||
|
||||
XUD_BusSpeed_t busSpeed;
|
||||
unsigned formatChange_DataFormat = inuint(c_aud_ctl);
|
||||
unsigned formatChange_NumChans = inuint(c_aud_ctl);
|
||||
|
||||
@@ -22,4 +22,4 @@ void XUD_UserResume(void)
|
||||
UserHostActive(1);
|
||||
}
|
||||
}
|
||||
#endif /* NO_USB */
|
||||
#endif /* NO_USB */
|
||||
|
||||
Reference in New Issue
Block a user