From d125860552be450e402f530e9ecfbb69f40862c2 Mon Sep 17 00:00:00 2001 From: Keith Au Date: Fri, 28 Feb 2020 10:48:46 +0800 Subject: [PATCH] changed define name USB_DESCRIPTOR_OVERRIDE_RATE_RES to XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES --- lib_xua/src/core/buffer/decouple/decouple.xc | 4 ++-- lib_xua/src/core/endpoint0/xua_endpoint0.c | 4 ++-- lib_xua/src/core/endpoint0/xua_ep0_descriptors.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib_xua/src/core/buffer/decouple/decouple.xc b/lib_xua/src/core/buffer/decouple/decouple.xc index b6dffe51..d501ad9f 100644 --- a/lib_xua/src/core/buffer/decouple/decouple.xc +++ b/lib_xua/src/core/buffer/decouple/decouple.xc @@ -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 diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index cce5a9c9..972f4a61 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -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 diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index c66c6dba..5e51b3dd 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -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)