forked from PAWPAW-Mirror/lib_xua
changed define name USB_DESCRIPTOR_OVERRIDE_RATE_RES to XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#endif
|
||||
#define MAX(x,y) ((x)>(y) ? (x) : (y))
|
||||
|
||||
#if(defined USB_DESCRIPTOR_OVERRIDE_RATE_RES)
|
||||
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
|
||||
extern uint32_t get_usb_to_device_rate();
|
||||
extern uint32_t get_device_to_usb_rate();
|
||||
extern uint32_t get_usb_to_device_bit_res();
|
||||
@@ -165,7 +165,7 @@ int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_FS;
|
||||
void handle_audio_request(chanend c_mix_out)
|
||||
{
|
||||
int space_left;
|
||||
#if(defined USB_DESCRIPTOR_OVERRIDE_RATE_RES)
|
||||
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
|
||||
g_curSubSlot_Out = get_usb_to_device_bit_res() >> 3;
|
||||
g_curSubSlot_In = get_device_to_usb_bit_res() >> 3;
|
||||
#endif
|
||||
|
||||
@@ -65,7 +65,7 @@ extern void device_reboot(void);
|
||||
#include "xua_hid.h"
|
||||
#endif
|
||||
|
||||
#if(defined USB_DESCRIPTOR_OVERRIDE_RATE_RES)
|
||||
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
|
||||
extern uint32_t get_usb_to_device_rate();
|
||||
extern uint32_t get_device_to_usb_rate();
|
||||
extern uint32_t get_usb_to_device_bit_res();
|
||||
@@ -344,7 +344,7 @@ void XUA_Endpoint0_init(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioCont
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USB_DESCRIPTOR_OVERRIDE_RATE_RES //change USB descriptor frequencies and bit resolution values here
|
||||
#ifdef XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES //change USB descriptor frequencies and bit resolution values here
|
||||
|
||||
cfgDesc_Audio1[USB_AS_IN_INTERFACE_DESCRIPTOR_OFFSET_SUB_FRAME] = get_device_to_usb_bit_res() >> 3; //sub frame rate = bit rate /8
|
||||
cfgDesc_Audio1[USB_AS_IN_INTERFACE_DESCRIPTOR_OFFSET_SUB_FRAME + 1] = (get_device_to_usb_bit_res() & 0xff); //bit resolution
|
||||
|
||||
@@ -2367,7 +2367,7 @@ const unsigned num_freqs_a1 = MAX(3, (0
|
||||
#define CFG_TOTAL_LENGTH_A1 (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES + HID_INTERFACE_BYTES)
|
||||
#endif
|
||||
|
||||
#ifdef USB_DESCRIPTOR_OVERRIDE_RATE_RES
|
||||
#ifdef XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES
|
||||
#define AS_INTERFACE_BYTES (7)
|
||||
#define INTERFACE_DESCRIPTOR_BYTES (9)
|
||||
#define AS_FORMAT_TYPE_BYTES (17)
|
||||
|
||||
Reference in New Issue
Block a user