diff --git a/module_dfu/src/dfu.xc b/module_dfu/src/dfu.xc index 9c96b262..828217b8 100644 --- a/module_dfu/src/dfu.xc +++ b/module_dfu/src/dfu.xc @@ -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]; diff --git a/module_usb_audio/audio_io/audio_io.xc b/module_usb_audio/audio_io/audio_io.xc index 023eb391..02d20427 100755 --- a/module_usb_audio/audio_io/audio_io.xc +++ b/module_usb_audio/audio_io/audio_io.xc @@ -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)]; diff --git a/module_usb_audio/endpoint0/audiorequests.xc b/module_usb_audio/endpoint0/audiorequests.xc index 8a19d5e0..a6238bb0 100644 --- a/module_usb_audio/endpoint0/audiorequests.xc +++ b/module_usb_audio/endpoint0/audiorequests.xc @@ -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; } diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h index 072ff2ae..01e648ff 100644 --- a/module_usb_audio/endpoint0/descriptors.h +++ b/module_usb_audio/endpoint0/descriptors.h @@ -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, diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index c2cc21e2..5fb019bb 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -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; diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index 9dc57990..735d5749 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -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 diff --git a/module_usb_audio/pdm_mics/pdm_mic_user.c b/module_usb_audio/pdm_mics/pdm_mic_user.c index 13870738..5d4106b6 100644 --- a/module_usb_audio/pdm_mics/pdm_mic_user.c +++ b/module_usb_audio/pdm_mics/pdm_mic_user.c @@ -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)); diff --git a/module_usb_audio/reboot.xc b/module_usb_audio/reboot.xc index d8ab2ef4..0087d84e 100644 --- a/module_usb_audio/reboot.xc +++ b/module_usb_audio/reboot.xc @@ -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 */ diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 3ad34c28..e338ea35 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -1020,4 +1020,4 @@ void decouple(chanend c_mix_out #endif /* NUM_USB_CHAN_IN > 0 */ } } -#endif /* NO_USB */ \ No newline at end of file +#endif /* NO_USB */ diff --git a/module_usb_audio/usb_buffer/decouple_interrupt.c b/module_usb_audio/usb_buffer/decouple_interrupt.c index 0e026740..79bfeefe 100644 --- a/module_usb_audio/usb_buffer/decouple_interrupt.c +++ b/module_usb_audio/usb_buffer/decouple_interrupt.c @@ -2,4 +2,4 @@ #include register_interrupt_handler(handle_audio_request, 1, 200) -#endif \ No newline at end of file +#endif diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 8c322894..861abb51 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -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); diff --git a/module_usb_audio/xuduser/xuduser.c b/module_usb_audio/xuduser/xuduser.c index f7259bb3..5c698e00 100644 --- a/module_usb_audio/xuduser/xuduser.c +++ b/module_usb_audio/xuduser/xuduser.c @@ -22,4 +22,4 @@ void XUD_UserResume(void) UserHostActive(1); } } -#endif /* NO_USB */ \ No newline at end of file +#endif /* NO_USB */