forked from PAWPAW-Mirror/lib_xua
Use a consistent method to interpret the HID_CONTROLS pre-processor symbol throughout the code base.
This commit is contained in:
@@ -58,7 +58,7 @@ void XUA_Buffer(
|
|||||||
chanend c_sof,
|
chanend c_sof,
|
||||||
chanend c_aud_ctl,
|
chanend c_aud_ctl,
|
||||||
in port p_off_mclk
|
in port p_off_mclk
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, chanend c_hid
|
, chanend c_hid
|
||||||
#endif
|
#endif
|
||||||
, chanend c_aud
|
, chanend c_aud
|
||||||
@@ -97,7 +97,7 @@ void XUA_Buffer_Ep(chanend c_aud_out,
|
|||||||
chanend c_sof,
|
chanend c_sof,
|
||||||
chanend c_aud_ctl,
|
chanend c_aud_ctl,
|
||||||
in port p_off_mclk
|
in port p_off_mclk
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, chanend c_hid
|
, chanend c_hid
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#ifdef CHAN_BUFF_CTRL
|
||||||
|
|||||||
@@ -425,10 +425,6 @@
|
|||||||
#define HID_CONTROLS (0)
|
#define HID_CONTROLS (0)
|
||||||
#endif
|
#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)
|
/* @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.
|
* 0: XMOS is I2S master. 1: CODEC is I2s master.
|
||||||
@@ -1177,7 +1173,7 @@ enum USBEndpointNumber_In
|
|||||||
#ifdef MIDI
|
#ifdef MIDI
|
||||||
ENDPOINT_NUMBER_IN_MIDI,
|
ENDPOINT_NUMBER_IN_MIDI,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
ENDPOINT_NUMBER_IN_HID,
|
ENDPOINT_NUMBER_IN_HID,
|
||||||
#endif
|
#endif
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
|
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
#include "user_hid.h"
|
#include "user_hid.h"
|
||||||
#endif
|
#endif
|
||||||
#define MAX(x,y) ((x)>(y) ? (x) : (y))
|
#define MAX(x,y) ((x)>(y) ? (x) : (y))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "xud.h"
|
#include "xud.h"
|
||||||
#include "testct_byref.h"
|
#include "testct_byref.h"
|
||||||
|
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
#include "user_hid.h"
|
#include "user_hid.h"
|
||||||
unsigned char g_hidData[1] = {0};
|
unsigned char g_hidData[1] = {0};
|
||||||
#endif
|
#endif
|
||||||
@@ -120,7 +120,7 @@ void XUA_Buffer(
|
|||||||
chanend c_sof,
|
chanend c_sof,
|
||||||
chanend c_aud_ctl,
|
chanend c_aud_ctl,
|
||||||
in port p_off_mclk
|
in port p_off_mclk
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, chanend c_hid
|
, chanend c_hid
|
||||||
#endif
|
#endif
|
||||||
, chanend c_aud
|
, chanend c_aud
|
||||||
@@ -164,7 +164,7 @@ void XUA_Buffer(
|
|||||||
c_clk_int,
|
c_clk_int,
|
||||||
#endif
|
#endif
|
||||||
c_sof, c_aud_ctl, p_off_mclk
|
c_sof, c_aud_ctl, p_off_mclk
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, c_hid
|
, c_hid
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#ifdef CHAN_BUFF_CTRL
|
||||||
@@ -223,7 +223,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
|||||||
chanend c_sof,
|
chanend c_sof,
|
||||||
chanend c_aud_ctl,
|
chanend c_aud_ctl,
|
||||||
in port p_off_mclk
|
in port p_off_mclk
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, chanend c_hid
|
, chanend c_hid
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#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);
|
XUD_ep ep_int = XUD_InitEp(c_ep_int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
XUD_ep ep_hid = XUD_InitEp(c_hid);
|
XUD_ep ep_hid = XUD_InitEp(c_hid);
|
||||||
#endif
|
#endif
|
||||||
unsigned u_tmp;
|
unsigned u_tmp;
|
||||||
@@ -364,7 +364,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
XUD_SetReady_In(ep_hid, g_hidData, 1);
|
XUD_SetReady_In(ep_hid, g_hidData, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
/* HID Report Data */
|
/* HID Report Data */
|
||||||
case XUD_SetData_Select(c_hid, ep_hid, result):
|
case XUD_SetData_Select(c_hid, ep_hid, result):
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ enum USBInterfaceNumber
|
|||||||
INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS,
|
INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if defined(HID_CONTROLS) && (HID_CONTROLS != 0)
|
#if( 0 < HID_CONTROLS )
|
||||||
INTERFACE_NUMBER_HID,
|
INTERFACE_NUMBER_HID,
|
||||||
#endif
|
#endif
|
||||||
INTERFACE_COUNT /* End marker */
|
INTERFACE_COUNT /* End marker */
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#include "vendorrequests.h"
|
#include "vendorrequests.h"
|
||||||
#include "xc_ptr.h"
|
#include "xc_ptr.h"
|
||||||
#include "xua_ep0_uacreqs.h"
|
#include "xua_ep0_uacreqs.h"
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
#include "hid.h"
|
#include "hid.h"
|
||||||
#endif
|
#endif
|
||||||
#if DSD_CHANS_DAC > 0
|
#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)
|
switch(sp.bRequest)
|
||||||
{
|
{
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
case USB_GET_DESCRIPTOR:
|
case USB_GET_DESCRIPTOR:
|
||||||
|
|
||||||
/* Check what inteface request is for */
|
/* 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)
|
switch(sp.bRequest)
|
||||||
{
|
{
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
case USB_GET_DESCRIPTOR:
|
case USB_GET_DESCRIPTOR:
|
||||||
|
|
||||||
/* Check what inteface request is for */
|
/* Check what inteface request is for */
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ XUD_EpType epTypeTableIn[ENDPOINT_COUNT_IN] = { XUD_EPTYPE_CTL | XUD_STATUS_ENAB
|
|||||||
#ifdef MIDI
|
#ifdef MIDI
|
||||||
XUD_EPTYPE_BUL,
|
XUD_EPTYPE_BUL,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
XUD_EPTYPE_INT,
|
XUD_EPTYPE_INT,
|
||||||
#endif
|
#endif
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
@@ -400,7 +400,7 @@ VENDOR_REQUESTS_PARAMS_DEC_
|
|||||||
c_clk_int,
|
c_clk_int,
|
||||||
#endif
|
#endif
|
||||||
c_sof, c_aud_ctl, p_for_mclk_count
|
c_sof, c_aud_ctl, p_for_mclk_count
|
||||||
#ifdef HID_CONTROLS
|
#if( 0 < HID_CONTROLS )
|
||||||
, c_xud_in[ENDPOINT_NUMBER_IN_HID]
|
, c_xud_in[ENDPOINT_NUMBER_IN_HID]
|
||||||
#endif
|
#endif
|
||||||
#ifdef CHAN_BUFF_CTRL
|
#ifdef CHAN_BUFF_CTRL
|
||||||
|
|||||||
Reference in New Issue
Block a user