diff --git a/lib_xua/src/core/README.rst b/lib_xua/src/core/README.rst deleted file mode 100644 index 4a512faa..00000000 --- a/lib_xua/src/core/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -USB AUDIO MODULE -================ - -:scope: General Use -:description: Core USB Audio Module -:keywords: USB Audio UAC2 -:boards: XR-USB-AUDIO-20-MC - - diff --git a/lib_xua/src/core/dsd_support.h b/lib_xua/src/core/audiohub/dsd_support.h similarity index 100% rename from lib_xua/src/core/dsd_support.h rename to lib_xua/src/core/audiohub/dsd_support.h diff --git a/lib_xua/src/core/audiohub/xua_audiohub.xc b/lib_xua/src/core/audiohub/xua_audiohub.xc index 581aa092..78d75c7b 100755 --- a/lib_xua/src/core/audiohub/xua_audiohub.xc +++ b/lib_xua/src/core/audiohub/xua_audiohub.xc @@ -17,7 +17,6 @@ #include "xua.h" #include "audioports.h" -#include "audiohw.h" #include "mic_array_conf.h" #if (XUA_SPDIF_TX_EN) #include "SpdifTransmit.h" @@ -29,7 +28,7 @@ #endif #endif -#include "commands.h" +#include "xua_commands.h" #include "xc_ptr.h" #define MAX(x,y) ((x)>(y) ? (x) : (y)) diff --git a/lib_xua/src/core/audiohw.h b/lib_xua/src/core/audiohw.h deleted file mode 100644 index e93739c6..00000000 --- a/lib_xua/src/core/audiohw.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _CODEC_H_ -#define _CODEC_H_ - -#endif diff --git a/lib_xua/src/core/buffer/decouple/decouple.xc b/lib_xua/src/core/buffer/decouple/decouple.xc index 6ddf718f..ff65dd1d 100644 --- a/lib_xua/src/core/buffer/decouple/decouple.xc +++ b/lib_xua/src/core/buffer/decouple/decouple.xc @@ -3,7 +3,7 @@ #include "xua.h" #include "xc_ptr.h" #include "interrupt.h" -#include "commands.h" +#include "xua_commands.h" #include "xud.h" #ifdef NATIVE_DSD diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index d20ae1d9..15ce60e6 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -14,7 +14,7 @@ #endif #endif #include "xc_ptr.h" -#include "commands.h" +#include "xua_commands.h" #include "xud.h" #include "testct_byref.h" diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index 2c4e3787..470d02a9 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -4,14 +4,12 @@ #include #include "xua.h" -#include "commands.h" +#include "xua_commands.h" #if defined(SPDIF_RX) #include "SpdifReceive.h" #endif - - #define LOCAL_CLOCK_INCREMENT 166667 #define LOCAL_CLOCK_MARGIN 1666 @@ -57,7 +55,6 @@ static int channelContainsControlToken(chanend x) default: return 0; } - } static void outInterrupt(chanend c_interruptControl, int value) diff --git a/lib_xua/src/core/clocking.h b/lib_xua/src/core/clocking/clocking.h similarity index 100% rename from lib_xua/src/core/clocking.h rename to lib_xua/src/core/clocking/clocking.h diff --git a/lib_xua/src/core/dbtable.h b/lib_xua/src/core/dbtable.h deleted file mode 100644 index 9119d7f7..00000000 --- a/lib_xua/src/core/dbtable.h +++ /dev/null @@ -1,144 +0,0 @@ -/** - * @file dbtable.h - * @brief 128 entry + neg inf db table from -inf to 0xffffffff - * @author Ross Owen, XMOS Semiconductor - * @version 1.0 - */ - -#ifndef _DBTABLE_ -#define _DBTABLE_ - -static unsigned dbTable[129] = -{ - 4294967295, /* 0 -> 0xffffffff */ - 3827893631, - 3411613790, - 3040603991, - 2709941159, - 2415237600, - 2152582777, - 1918491420, - 1709857277, - 1523911903, - 1358187913, - 1210486251, - 1078847007, - 961523407, - 856958639, - 763765191, - 680706443, - 606680256, - 540704347, - 481903257, - 429496729, - 382789363, - 341161379, - 304060399, - 270994116, - 241523760, - 215258278, - 191849142, - 170985728, - 152391190, - 135818791, - 121048625, - 107884701, - 96152341, - 85695864, - 76376519, - 68070644, - 60668026, - 54070435, - 48190326, - 42949673, - 38278936, - 34116138, - 30406040, - 27099412, - 24152376, - 21525828, - 19184914, - 17098573, - 15239119, - 13581879, - 12104863, - 10788470, - 9615234, - 8569586, - 7637652, - 6807064, - 6066803, - 5407043, - 4819033, - 4294967, - 3827894, - 3411614, - 3040604, - 2709941, - 2415238, - 2152583, - 1918491, - 1709857, - 1523912, - 1358188, - 1210486, - 1078847, - 961523, - 856959, - 763765, - 680706, - 606680, - 540704, - 481903, - 429497, - 382789, - 341161, - 304060, - 270994, - 241524, - 215258, - 191849, - 170986, - 152391, - 135819, - 121049, - 107885, - 96152, - 85696, - 76377, - 68071, - 60668, - 54070, - 48190, - 42950, - 38279, - 34116, - 30406, - 27099, - 24152, - 21526, - 19185, - 17099, - 15239, - 13582, - 12105, - 10788, - 9615, - 8570, - 7638, - 6807, - 6067, - 5407, - 4819, - 4295, - 3828, - 3412, - 3041, - 2710, - 2415, - 2153, - 1918, - 0 // -0x8000 -}; - -#endif diff --git a/lib_xua/src/core/endpoint0/xua_endpoint0.c b/lib_xua/src/core/endpoint0/xua_endpoint0.c index 61a6f3ae..c1b14088 100755 --- a/lib_xua/src/core/endpoint0/xua_endpoint0.c +++ b/lib_xua/src/core/endpoint0/xua_endpoint0.c @@ -13,13 +13,13 @@ #include "xud_device.h" /* Standard descriptor requests */ #include "dfu_types.h" #include "usbaudio20.h" /* Defines from USB Audio 2.0 spec */ -#include "xua_ep0_descriptors.h" /* This devices descriptors */ -#include "commands.h" +#include "xua_ep0_descriptors.h" /* This devices descriptors */ +#include "xua_commands.h" #include "audiostream.h" #include "hostactive.h" #include "vendorrequests.h" #include "xc_ptr.h" -#include "audiorequests.h" +#include "xua_ep0_uacreqs.h" #ifdef HID_CONTROLS #include "hid.h" #endif diff --git a/lib_xua/src/core/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h similarity index 100% rename from lib_xua/src/core/xua_ep0_descriptors.h rename to lib_xua/src/core/endpoint0/xua_ep0_descriptors.h diff --git a/lib_xua/src/core/endpoint0/audiorequests.h b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.h similarity index 100% rename from lib_xua/src/core/endpoint0/audiorequests.h rename to lib_xua/src/core/endpoint0/xua_ep0_uacreqs.h diff --git a/lib_xua/src/core/endpoint0/audiorequests.xc b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc similarity index 99% rename from lib_xua/src/core/endpoint0/audiorequests.xc rename to lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc index 9a9c3b21..0cac6cd5 100644 --- a/lib_xua/src/core/endpoint0/audiorequests.xc +++ b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc @@ -11,7 +11,7 @@ #include "usbaudio20.h" #include "usbaudio10.h" #include "dbcalc.h" -#include "commands.h" +#include "xua_commands.h" #include "xc_ptr.h" #ifdef MIXER #include "mixer.h" diff --git a/lib_xua/src/core/hostactive/hostactive.c b/lib_xua/src/core/hostactive/hostactive.c deleted file mode 100644 index b8bd33ec..00000000 --- a/lib_xua/src/core/hostactive/hostactive.c +++ /dev/null @@ -1,7 +0,0 @@ - -void UserHostActive(int active) __attribute__ ((weak)); -void UserHostActive(int active) -{ - return; -} - diff --git a/lib_xua/src/core/hostactive/hostactive.h b/lib_xua/src/core/hostactive/hostactive.h deleted file mode 100644 index 378848d3..00000000 --- a/lib_xua/src/core/hostactive/hostactive.h +++ /dev/null @@ -1,2 +0,0 @@ - -void UserHostActive(int active); diff --git a/lib_xua/src/core/locks/lock.h b/lib_xua/src/core/locks/lock.h deleted file mode 100644 index 1a027a7f..00000000 --- a/lib_xua/src/core/locks/lock.h +++ /dev/null @@ -1,25 +0,0 @@ -/** @file lock.h - * @brief Functions for using hardware locks - * @author Ross Owen, XMOS Limited - */ - -#ifndef _LOCK_H_ -#define _LOCK_H_ 1 - -typedef unsigned lock; - -/* Allocates and returns a lock resource - returns 0 if out of lock */ -lock GetLockResource(); - -/* Claims the passed lock, this is a blocking call */ -void ClaimLock(lock l); - -/* Frees the passed lock */ -void FreeLock(lock l); - -/* De-allocated the passed lock resource */ -void FreeLockResource(lock l); - - - -#endif diff --git a/lib_xua/src/core/mixer/mixer.xc b/lib_xua/src/core/mixer/mixer.xc index 4c4b3a71..77f29ce9 100644 --- a/lib_xua/src/core/mixer/mixer.xc +++ b/lib_xua/src/core/mixer/mixer.xc @@ -5,13 +5,14 @@ #include "xua.h" #include "mixer.h" #include "xc_ptr.h" -#include "commands.h" +#include "xua_commands.h" #include "dbcalc.h" #ifdef MIXER +/* FAST_MIXER has a bit of a nasty implentation but is more effcient */ #define FAST_MIXER 1 -#warning USING FAST MIXER + //#ifdef OUT_VOLUME_IN_MIXER static unsigned int multOut_array[NUM_USB_CHAN_OUT + 1]; diff --git a/lib_xua/src/core/support/locks/lock.h b/lib_xua/src/core/support/locks/lock.h deleted file mode 100644 index 1a027a7f..00000000 --- a/lib_xua/src/core/support/locks/lock.h +++ /dev/null @@ -1,25 +0,0 @@ -/** @file lock.h - * @brief Functions for using hardware locks - * @author Ross Owen, XMOS Limited - */ - -#ifndef _LOCK_H_ -#define _LOCK_H_ 1 - -typedef unsigned lock; - -/* Allocates and returns a lock resource - returns 0 if out of lock */ -lock GetLockResource(); - -/* Claims the passed lock, this is a blocking call */ -void ClaimLock(lock l); - -/* Frees the passed lock */ -void FreeLock(lock l); - -/* De-allocated the passed lock resource */ -void FreeLockResource(lock l); - - - -#endif diff --git a/lib_xua/src/core/powersave/archU_powerSaving.h b/lib_xua/src/core/support/powersave/archU_powerSaving.h similarity index 100% rename from lib_xua/src/core/powersave/archU_powerSaving.h rename to lib_xua/src/core/support/powersave/archU_powerSaving.h diff --git a/lib_xua/src/core/powersave/archU_powerSaving.xc b/lib_xua/src/core/support/powersave/archU_powerSaving.xc similarity index 100% rename from lib_xua/src/core/powersave/archU_powerSaving.xc rename to lib_xua/src/core/support/powersave/archU_powerSaving.xc diff --git a/lib_xua/src/core/xc_ptr.h b/lib_xua/src/core/support/xc_ptr.h similarity index 100% rename from lib_xua/src/core/xc_ptr.h rename to lib_xua/src/core/support/xc_ptr.h diff --git a/lib_xua/src/core/xc_ptr.xc b/lib_xua/src/core/support/xc_ptr.xc similarity index 100% rename from lib_xua/src/core/xc_ptr.xc rename to lib_xua/src/core/support/xc_ptr.xc diff --git a/lib_xua/src/core/user_hid.h b/lib_xua/src/core/user/user_hid.h similarity index 100% rename from lib_xua/src/core/user_hid.h rename to lib_xua/src/core/user/user_hid.h diff --git a/lib_xua/src/core/commands.h b/lib_xua/src/core/xua_commands.h similarity index 100% rename from lib_xua/src/core/commands.h rename to lib_xua/src/core/xua_commands.h diff --git a/lib_xua/src/core/flashlib_user.c b/lib_xua/src/dfu/flashlib_user.c similarity index 100% rename from lib_xua/src/core/flashlib_user.c rename to lib_xua/src/dfu/flashlib_user.c