From 9fcfac7996dae288817495311820186b721752b0 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 6 Jun 2013 12:14:59 +0100 Subject: [PATCH] Only warn about not having PID_AUDIO1 defined when AUDIO_CLASS=1 or AUDIO_CLASS_FALLBACK is defined --- module_usb_audio/devicedefines.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index ae54f71e..70d901bc 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -174,14 +174,20 @@ #define VENDOR_ID (0x20B1) /* XMOS VID */ #endif +#if defined(AUDIO_CLASS_FALLBACK) && (AUDIO_CLASS_FALLBACK==0) +#undef AUDIO_CLASS_FALLBACK +#endif + +#if (AUDIO_CLASS==1) || defined(AUDIO_CLASS_FALLBACK) #ifndef PID_AUDIO_1 #define PID_AUDIO_1 (0x0001) -#warning PRODUCT_ID not defined. Using 0x0001 +#warning PID_AUDIO_1 not defined. Using 0x0001 +#endif #endif #ifndef PID_AUDIO_2 #define PID_AUDIO_2 (0x0001) -#warning PRODUCT_ID not defined. Using 0x0001 +#warning PID_AUDIO_2 not defined. Using 0x0001 #endif /* Device release number in BCD: 0xJJMNi */ @@ -436,9 +442,7 @@ #endif #endif -#if defined(AUDIO_CLASS_FALLBACK) && (AUDIO_CLASS_FALLBACK==0) -#undef AUDIO_CLASS_FALLBACK -#endif + /* Defines for DFU */ #ifndef PID_DFU