From 962e91adeca2238307e5e30eb2c71512754fb24b Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Mon, 14 Oct 2019 16:47:59 +0100 Subject: [PATCH] Include xua.h to pick up the NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT pre-processor symbols. They're used further down in the file. If not present through an #include of xua_h outside of and before the #include of descriptor_defs.h or through definition in the Make file, the enumeration of interface numbers silently mis-assigns values. --- lib_xua/src/core/endpoint0/descriptor_defs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib_xua/src/core/endpoint0/descriptor_defs.h b/lib_xua/src/core/endpoint0/descriptor_defs.h index 53ba28ed..1f29d58e 100644 --- a/lib_xua/src/core/endpoint0/descriptor_defs.h +++ b/lib_xua/src/core/endpoint0/descriptor_defs.h @@ -3,6 +3,11 @@ #ifndef __DESCRIPTOR_DEFS_H__ #define __DESCRIPTOR_DEFS_H__ +/* + Include xua.h to pick up the #defines of NUM_USB_CHAN_IN and NUM_USB_CHAN_OUT. + */ +#include "xua.h" + #if (NUM_USB_CHAN_IN > 0) && (NUM_USB_CHAN_OUT > 0) #define AUDIO_INTERFACE_COUNT 3 #elif (NUM_USB_CHAN_IN > 0) || (NUM_USB_CHAN_OUT > 0)