From bd71651cc4919454d9d40122688843b6d1268b92 Mon Sep 17 00:00:00 2001 From: Ed Date: Wed, 11 Mar 2020 16:01:42 +0000 Subject: [PATCH 1/2] Allow access of mclk setting externally for hardware test harness --- lib_xua/src/core/buffer/ep/ep_buffer.xc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index ae58ef83..2093502f 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -182,6 +182,8 @@ void XUA_Buffer( } } +// Allows us to externally modify masterClockFreq +unsafe{volatile unsigned * unsafe masterClockFreq_ptr;} /** * Buffers data from audio endpoints @@ -268,6 +270,8 @@ void XUA_Buffer_Ep(register chanend c_aud_out, unsigned masterClockFreq = DEFAULT_MCLK_FREQ; unsigned lastClock = 0; + unsafe{masterClockFreq_ptr = &masterClockFreq;} + unsigned clocks = 0; long long clockcounter = 0; From c9989e4d872d51e91318410f87f6bbd21e888bb0 Mon Sep 17 00:00:00 2001 From: Ed Date: Thu, 12 Mar 2020 10:20:30 +0000 Subject: [PATCH 2/2] Changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8e57b5f6..d72dd59c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -24,6 +24,7 @@ lib_xua Change Log * ADDED: Ability to read or modify bcdDevice * ADDED: Override USB descriptor with sampling frequency and bit-resolution set at boot time. + * ADDED: Global pointer to allow external access to masterClockFreq 0.2.1 -----