diff --git a/module_usb_audio/warnings.xc b/module_usb_audio/warnings.xc index e85973a6..5cbab76f 100644 --- a/module_usb_audio/warnings.xc +++ b/module_usb_audio/warnings.xc @@ -61,4 +61,13 @@ Warnings relating to configuration defines located in this XC source file rather #warning AUDIO_CLASS_FALLBACK not defined, using 0 (i.e. disabled) #endif +/* Sanity check on FS channel counts */ +#if (NUM_USB_CHAN_OUT_FS > NUM_USB_CHAN_OUT) +#error NUM_USB_CHAN_OUT expected to be less than or equal to NUM_USB_CHAN_OUT +#endif + +#if (NUM_USB_CHAN_IN_FS > NUM_USB_CHAN_IN) +#error NUM_USB_CHAN_IN expected to be less than or equal to NUM_USB_CHAN_IN +#endif +