Added build error if NUM_USB_CHAN_IN/OUT_FS > NUM_USB_CHAN_IN/OUT

This commit is contained in:
Ross Owen
2015-12-01 13:10:28 +00:00
parent 56feb05100
commit 2b9367322d

View File

@@ -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