revert xua_ep0_uacreqs.xc so that frequency global variable is not affected by USB command. Now frequency can be varied by changing the default value.

This commit is contained in:
Keith Au
2020-01-07 15:01:54 +08:00
parent 3b80f63cb9
commit 6b1da7610f
3 changed files with 21 additions and 18 deletions

View File

@@ -231,6 +231,13 @@
*/
#ifndef DEFAULT_AUDOUT_FREQ
#define DEFAULT_AUDOUT_FREQ (48000)
#define USB_IN_DESCRIPTOR_FREQ_OVERRIDE //used if USB in frequency is not conifigurable by USB endpoint command
#ifdef USB_IN_DESCRIPTOR_FREQ_OVERRIDE
#define USB_IN_FREQ_DESCIPTOR_OFFSET 161 //161- (3 * 3) are the position of descriptor that needed to be modified for USB in frequency
#define CHARIFY_SR(x) (x & 0xff),((x & 0xff00)>> 8),((x & 0xff0000)>> 16)
#endif
#endif
/* Audio Class Defines */