Use a consistent method to interpret the HID_CONTROLS pre-processor symbol throughout the code base.

This commit is contained in:
Michael Banther
2019-09-26 14:45:17 +01:00
parent ba666fb314
commit 37bbea3726
7 changed files with 17 additions and 21 deletions

View File

@@ -58,7 +58,7 @@ void XUA_Buffer(
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
, chanend c_aud
@@ -97,7 +97,7 @@ void XUA_Buffer_Ep(chanend c_aud_out,
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
#ifdef CHAN_BUFF_CTRL

View File

@@ -425,10 +425,6 @@
#define HID_CONTROLS (0)
#endif
#if defined(HID_CONTROLS) && (HID_CONTROLS == 0)
#undef HID_CONTROLS
#endif
/* @brief Defines whether XMOS device runs as master (i.e. drives LR and Bit clocks)
*
* 0: XMOS is I2S master. 1: CODEC is I2s master.
@@ -1177,7 +1173,7 @@ enum USBEndpointNumber_In
#ifdef MIDI
ENDPOINT_NUMBER_IN_MIDI,
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
ENDPOINT_NUMBER_IN_HID,
#endif
#ifdef IAP

View File

@@ -12,7 +12,7 @@
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
#include "user_hid.h"
#endif
#define MAX(x,y) ((x)>(y) ? (x) : (y))

View File

@@ -19,7 +19,7 @@
#include "xud.h"
#include "testct_byref.h"
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
#include "user_hid.h"
unsigned char g_hidData[1] = {0};
#endif
@@ -120,7 +120,7 @@ void XUA_Buffer(
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
, chanend c_aud
@@ -164,7 +164,7 @@ void XUA_Buffer(
c_clk_int,
#endif
c_sof, c_aud_ctl, p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, c_hid
#endif
#ifdef CHAN_BUFF_CTRL
@@ -223,7 +223,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
chanend c_sof,
chanend c_aud_ctl,
in port p_off_mclk
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, chanend c_hid
#endif
#ifdef CHAN_BUFF_CTRL
@@ -260,7 +260,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
XUD_ep ep_int = XUD_InitEp(c_ep_int);
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_ep ep_hid = XUD_InitEp(c_hid);
#endif
unsigned u_tmp;
@@ -364,7 +364,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
#endif
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_SetReady_In(ep_hid, g_hidData, 1);
#endif
@@ -875,7 +875,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
#endif
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
/* HID Report Data */
case XUD_SetData_Select(c_hid, ep_hid, result):
{

View File

@@ -54,7 +54,7 @@ enum USBInterfaceNumber
INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS,
#endif
#endif
#if defined(HID_CONTROLS) && (HID_CONTROLS != 0)
#if( 0 < HID_CONTROLS )
INTERFACE_NUMBER_HID,
#endif
INTERFACE_COUNT /* End marker */

View File

@@ -21,7 +21,7 @@
#include "vendorrequests.h"
#include "xc_ptr.h"
#include "xua_ep0_uacreqs.h"
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
#include "hid.h"
#endif
#if DSD_CHANS_DAC > 0
@@ -492,7 +492,7 @@ void XUA_Endpoint0_loop(XUD_Result_t result, USB_SetupPacket_t sp, chanend c_ep0
switch(sp.bRequest)
{
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
case USB_GET_DESCRIPTOR:
/* Check what inteface request is for */
@@ -871,7 +871,7 @@ void XUA_Endpoint0_lite_loop(XUD_Result_t result, USB_SetupPacket_t sp, chanend
switch(sp.bRequest)
{
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
case USB_GET_DESCRIPTOR:
/* Check what inteface request is for */

View File

@@ -259,7 +259,7 @@ XUD_EpType epTypeTableIn[ENDPOINT_COUNT_IN] = { XUD_EPTYPE_CTL | XUD_STATUS_ENAB
#ifdef MIDI
XUD_EPTYPE_BUL,
#endif
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
XUD_EPTYPE_INT,
#endif
#ifdef IAP
@@ -400,7 +400,7 @@ VENDOR_REQUESTS_PARAMS_DEC_
c_clk_int,
#endif
c_sof, c_aud_ctl, p_for_mclk_count
#ifdef HID_CONTROLS
#if( 0 < HID_CONTROLS )
, c_xud_in[ENDPOINT_NUMBER_IN_HID]
#endif
#ifdef CHAN_BUFF_CTRL