From d7be8419d8b213798768f986402b4df2bd75ea81 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Mon, 30 Sep 2019 13:52:22 +0100 Subject: [PATCH 01/11] Add a 1b port for receiving the NDP10x interrupt. --- lib_xua/api/xua_buffer.h | 2 ++ lib_xua/src/core/buffer/ep/ep_buffer.xc | 5 ++++- lib_xua/src/core/user/user_hid.h | 2 +- lib_xua/src/core/user/user_hid.xc | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib_xua/api/xua_buffer.h b/lib_xua/api/xua_buffer.h index 93ca3219..5e7f65e4 100644 --- a/lib_xua/api/xua_buffer.h +++ b/lib_xua/api/xua_buffer.h @@ -60,6 +60,7 @@ void XUA_Buffer( in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid + , in port p_int #endif , chanend c_aud ); @@ -99,6 +100,7 @@ void XUA_Buffer_Ep(chanend c_aud_out, in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid + , in port p_int #endif #ifdef CHAN_BUFF_CTRL , chanend c_buff_ctrl diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index 5916da17..b3c28856 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -122,6 +122,7 @@ void XUA_Buffer( in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid + , in port p_int #endif , chanend c_aud ) @@ -166,6 +167,7 @@ void XUA_Buffer( c_sof, c_aud_ctl, p_off_mclk #if( 0 < HID_CONTROLS ) , c_hid + , p_int #endif #ifdef CHAN_BUFF_CTRL , c_buff_ctrl @@ -225,6 +227,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out, in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid + , in port p_int #endif #ifdef CHAN_BUFF_CTRL , chanend c_buff_ctrl @@ -880,7 +883,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out, case XUD_SetData_Select(c_hid, ep_hid, result): { g_hidData[0]=0; - UserReadHIDData(g_hidData); + UserReadHIDData(p_int, g_hidData); XUD_SetReady_In(ep_hid, g_hidData, 1); } break; diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index 6620c7dd..736ab13a 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -11,5 +11,5 @@ #define HID_DATA_SIZE 1 -void UserReadHIDData(unsigned char hidData[HID_DATA_SIZE]); +void UserReadHIDData(in port p_int, unsigned char hidData[HID_DATA_SIZE]); diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index 4319bf43..1306a892 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -14,7 +14,7 @@ static unsigned int curr_time = 0; static unsigned int last_time = 0; static unsigned int tick_count = 0; -void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]) +void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) { timer tmr; From 660b483d1e129f6e8c587aebe35dd2f9127250bc Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Mon, 30 Sep 2019 16:12:16 +0100 Subject: [PATCH 02/11] Clean up whitespace, no functional change. --- lib_xua/src/core/user/user_hid.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index 736ab13a..9c135744 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -2,12 +2,12 @@ /* These defines relate to the HID report desc - do not mod */ -#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00 -#define HID_CONTROL_NEXT_SHIFT 0x01 -#define HID_CONTROL_PREV_SHIFT 0x02 -#define HID_CONTROL_VOLUP_SHIFT 0x03 -#define HID_CONTROL_VOLDN_SHIFT 0x04 -#define HID_CONTROL_MUTE_SHIFT 0x05 +#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00 +#define HID_CONTROL_NEXT_SHIFT 0x01 +#define HID_CONTROL_PREV_SHIFT 0x02 +#define HID_CONTROL_VOLUP_SHIFT 0x03 +#define HID_CONTROL_VOLDN_SHIFT 0x04 +#define HID_CONTROL_MUTE_SHIFT 0x05 #define HID_DATA_SIZE 1 From e1b72c47bcb43b608bd1914b95783695f9c46755 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Mon, 30 Sep 2019 16:14:16 +0100 Subject: [PATCH 03/11] Add a version of UserReadHIDData() which uses a signal on a port to set the Voice Command bit in the HID Report data. This commit preserves the ability to simulate the NDP100 entirely, i.e. without using a port for input. --- lib_xua/src/core/user/user_hid.h | 29 +++++++++++++++++++++++++++++ lib_xua/src/core/user/user_hid.xc | 24 ++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index 9c135744..edf4ebda 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -11,5 +11,34 @@ #define HID_DATA_SIZE 1 +#ifndef HID_SIMULATE_INTERRUPTS +#define HID_SIMULATE_INTERRUPTS 0 +#endif + +#ifndef HID_SIMULATE_NDP10X +#define HID_SIMULATE_NDP10X 0 +#endif + +#ifndef NDP_ASSERT_HIGH +#define NDP_ASSERT_HIGH 0 +#endif + +#if( 0 < HID_CONTROLS ) + +#if( 0 < NDP_ASSERT_HIGH ) +#define NDP100_ASSERT_LEVEL 1 +#define NDP100_DEASSERT_LEVEL 0 +#else +#define NDP100_ASSERT_LEVEL 0 +#define NDP100_DEASSERT_LEVEL 1 +#endif + +#if(( 0 < HID_SIMULATE_INTERRUPTS ) || ( 0 < HID_SIMULATE_NDP10X )) +#define HID_DEASSERT_COUNT 10000000 +#define HID_INTERRUPT_COUNT 1000000000 +#endif + +#endif /* ( 0 < HID_CONTROLS ) */ + void UserReadHIDData(in port p_int, unsigned char hidData[HID_DATA_SIZE]); diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index 1306a892..79d4cb76 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -4,8 +4,9 @@ #include #include "user_hid.h" -#define HID_DEASSERT_COUNT 10000000 -#define HID_INTERRUPT_COUNT 1000000000 +#if( 0 < HID_CONTROLS ) +#if( 0 < HID_SIMULATE_NDP10X ) + #define HID_REPORT_DATA 0x01 static unsigned char initialised = 0; @@ -42,3 +43,22 @@ void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) last_time = curr_time; } } +#else /* ( 0 < HID_SIMULATE_NDP10X ) */ + +#define HID_REPORT_INTERRUPT_ASSERTED 0x01 +#define HID_REPORT_INTERRUPT_DEASSERTED 0x00 + +void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) +{ + unsigned curr_val; + + p_int :> curr_val; + hidData[ 0 ] = ( curr_val == NDP100_ASSERT_LEVEL ) ? HID_REPORT_INTERRUPT_ASSERTED : HID_REPORT_INTERRUPT_DEASSERTED; + + for( unsigned idx = 1; idx < HID_DATA_SIZE; ++idx ) { + hidData[ idx ] = 0U; + } +} + +#endif /* ( 0 < HID_SIMULATE_NDP10X ) */ +#endif /* ( 0 < HID_CONTROLS ) */ From d32235d0f03901167605ee7c118b7737af500fef Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Tue, 1 Oct 2019 11:57:54 +0100 Subject: [PATCH 04/11] Final clean-up of HID -- NDP10x Interrupt integration. --- lib_xua/src/core/user/user_hid.h | 20 ++++++-------- lib_xua/src/core/user/user_hid.xc | 43 +------------------------------ 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index edf4ebda..ca0fcf93 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -15,25 +15,21 @@ #define HID_SIMULATE_INTERRUPTS 0 #endif -#ifndef HID_SIMULATE_NDP10X -#define HID_SIMULATE_NDP10X 0 -#endif - -#ifndef NDP_ASSERT_HIGH -#define NDP_ASSERT_HIGH 0 +#ifndef NDP_ASSERT_LEVEL +#define NDP_ASSERT_LEVEL 0 #endif #if( 0 < HID_CONTROLS ) -#if( 0 < NDP_ASSERT_HIGH ) -#define NDP100_ASSERT_LEVEL 1 -#define NDP100_DEASSERT_LEVEL 0 +#if( 0 < NDP_ASSERT_LEVEL ) +#define NDP10X_ASSERT_LEVEL 1 +#define NDP10X_DEASSERT_LEVEL 0 #else -#define NDP100_ASSERT_LEVEL 0 -#define NDP100_DEASSERT_LEVEL 1 +#define NDP10X_ASSERT_LEVEL 0 +#define NDP10X_DEASSERT_LEVEL 1 #endif -#if(( 0 < HID_SIMULATE_INTERRUPTS ) || ( 0 < HID_SIMULATE_NDP10X )) +#if( 0 < HID_SIMULATE_INTERRUPTS ) #define HID_DEASSERT_COUNT 10000000 #define HID_INTERRUPT_COUNT 1000000000 #endif diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index 79d4cb76..d10960cf 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -5,46 +5,6 @@ #include "user_hid.h" #if( 0 < HID_CONTROLS ) -#if( 0 < HID_SIMULATE_NDP10X ) - -#define HID_REPORT_DATA 0x01 - -static unsigned char initialised = 0; - -static unsigned int curr_time = 0; -static unsigned int last_time = 0; -static unsigned int tick_count = 0; - -void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) -{ - timer tmr; - - if( !initialised ) { - tmr :> last_time; - initialised = 1; - } else { - tmr :> curr_time; - tick_count += ( last_time < curr_time ) ? curr_time - last_time : curr_time + ( UINT_MAX - last_time ); - - if(( HID_INTERRUPT_COUNT <= tick_count ) && ( tick_count <= ( HID_INTERRUPT_COUNT + HID_DEASSERT_COUNT ))) { - for( unsigned idx = 0; idx < HID_DATA_SIZE; ++idx ) { - hidData[ idx ] = HID_REPORT_DATA; - } - } else { - for( unsigned idx = 0; idx < HID_DATA_SIZE; ++idx ) { - hidData[ idx ] = 0x00; - } - - if (( HID_INTERRUPT_COUNT + HID_DEASSERT_COUNT ) <= tick_count ) { - tick_count = 0; - } - } - - last_time = curr_time; - } -} -#else /* ( 0 < HID_SIMULATE_NDP10X ) */ - #define HID_REPORT_INTERRUPT_ASSERTED 0x01 #define HID_REPORT_INTERRUPT_DEASSERTED 0x00 @@ -53,12 +13,11 @@ void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) unsigned curr_val; p_int :> curr_val; - hidData[ 0 ] = ( curr_val == NDP100_ASSERT_LEVEL ) ? HID_REPORT_INTERRUPT_ASSERTED : HID_REPORT_INTERRUPT_DEASSERTED; + hidData[ 0 ] = ( curr_val == NDP10X_ASSERT_LEVEL ) ? HID_REPORT_INTERRUPT_ASSERTED : HID_REPORT_INTERRUPT_DEASSERTED; for( unsigned idx = 1; idx < HID_DATA_SIZE; ++idx ) { hidData[ idx ] = 0U; } } -#endif /* ( 0 < HID_SIMULATE_NDP10X ) */ #endif /* ( 0 < HID_CONTROLS ) */ From 2fb0bdfcc22494b558b52b4e24732d5924134fb6 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Tue, 1 Oct 2019 13:52:08 +0100 Subject: [PATCH 05/11] A slightly different way of saying the same thing. I've changed to an if - else construct to make it easy to add in debugging print statements if needed. --- lib_xua/src/core/user/user_hid.xc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index d10960cf..2c907f16 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -13,7 +13,12 @@ void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) unsigned curr_val; p_int :> curr_val; - hidData[ 0 ] = ( curr_val == NDP10X_ASSERT_LEVEL ) ? HID_REPORT_INTERRUPT_ASSERTED : HID_REPORT_INTERRUPT_DEASSERTED; + + if( curr_val == NDP10X_ASSERT_LEVEL ) { + hidData[ 0 ] = HID_REPORT_INTERRUPT_ASSERTED; + } else { + hidData[ 0 ] = HID_REPORT_INTERRUPT_DEASSERTED; + } for( unsigned idx = 1; idx < HID_DATA_SIZE; ++idx ) { hidData[ idx ] = 0U; From 17317093d588625733c695d298c54ab144215e8a Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Tue, 1 Oct 2019 17:04:13 +0100 Subject: [PATCH 06/11] Rework HID data processing. Move port handling up into XUA_Buffer_lite2() to take advantage of its select operator. Add functions to initialise and set the HID data. --- lib_xua/src/core/buffer/ep/ep_buffer.xc | 2 +- lib_xua/src/core/user/user_hid.h | 9 +++++---- lib_xua/src/core/user/user_hid.xc | 26 ++++++++++++++++--------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index b3c28856..53244092 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -883,7 +883,7 @@ void XUA_Buffer_Ep(register chanend c_aud_out, case XUD_SetData_Select(c_hid, ep_hid, result): { g_hidData[0]=0; - UserReadHIDData(p_int, g_hidData); + UserReadHIDData(g_hidData); XUD_SetReady_In(ep_hid, g_hidData, 1); } break; diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index ca0fcf93..24699c14 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -30,11 +30,12 @@ #endif #if( 0 < HID_SIMULATE_INTERRUPTS ) -#define HID_DEASSERT_COUNT 10000000 +#define HID_DEASSERT_COUNT 10000 #define HID_INTERRUPT_COUNT 1000000000 #endif +void UserInitHIDData(void); +void UserReadHIDData(unsigned char hidData[ HID_DATA_SIZE ]); +void UserSetHIDData(const unsigned hidData); + #endif /* ( 0 < HID_CONTROLS ) */ - -void UserReadHIDData(in port p_int, unsigned char hidData[HID_DATA_SIZE]); - diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index 2c907f16..dfba7fed 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -8,20 +8,28 @@ #define HID_REPORT_INTERRUPT_ASSERTED 0x01 #define HID_REPORT_INTERRUPT_DEASSERTED 0x00 -void UserReadHIDData( in port p_int, unsigned char hidData[ HID_DATA_SIZE ]) +static unsigned char s_hidData; + +void UserInitHIDData( void ) { - unsigned curr_val; + s_hidData = HID_REPORT_INTERRUPT_DEASSERTED; +} - p_int :> curr_val; +void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]) +{ + hidData[ 0 ] = s_hidData; - if( curr_val == NDP10X_ASSERT_LEVEL ) { - hidData[ 0 ] = HID_REPORT_INTERRUPT_ASSERTED; - } else { - hidData[ 0 ] = HID_REPORT_INTERRUPT_DEASSERTED; + for( unsigned i = 1; i < HID_DATA_SIZE; ++i ) { + hidData[ i ] = 0U; } +} - for( unsigned idx = 1; idx < HID_DATA_SIZE; ++idx ) { - hidData[ idx ] = 0U; +void UserSetHIDData( const unsigned hidData ) +{ + if( hidData == NDP10X_ASSERT_LEVEL ) { + s_hidData = HID_REPORT_INTERRUPT_ASSERTED; + } else { + s_hidData = HID_REPORT_INTERRUPT_DEASSERTED; } } From 0440020c2f2de5cf693e5cf5afead62e17b521c3 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 2 Oct 2019 15:24:28 +0100 Subject: [PATCH 07/11] Change pre-processor symbol names to make them generic. --- lib_xua/src/core/user/user_hid.h | 12 ++++++------ lib_xua/src/core/user/user_hid.xc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index 24699c14..afcbb2e9 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -15,18 +15,18 @@ #define HID_SIMULATE_INTERRUPTS 0 #endif -#ifndef NDP_ASSERT_LEVEL -#define NDP_ASSERT_LEVEL 0 +#ifndef INTERRUPT_ASSERT_LEVEL +#define INTERRUPT_ASSERT_LEVEL 0 #endif #if( 0 < HID_CONTROLS ) #if( 0 < NDP_ASSERT_LEVEL ) -#define NDP10X_ASSERT_LEVEL 1 -#define NDP10X_DEASSERT_LEVEL 0 +#define INT_ASSERT_LEVEL 1 +#define INT_DEASSERT_LEVEL 0 #else -#define NDP10X_ASSERT_LEVEL 0 -#define NDP10X_DEASSERT_LEVEL 1 +#define INT_ASSERT_LEVEL 0 +#define INT_DEASSERT_LEVEL 1 #endif #if( 0 < HID_SIMULATE_INTERRUPTS ) diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc index dfba7fed..75cb8df6 100644 --- a/lib_xua/src/core/user/user_hid.xc +++ b/lib_xua/src/core/user/user_hid.xc @@ -26,7 +26,7 @@ void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]) void UserSetHIDData( const unsigned hidData ) { - if( hidData == NDP10X_ASSERT_LEVEL ) { + if( hidData == INT_ASSERT_LEVEL ) { s_hidData = HID_REPORT_INTERRUPT_ASSERTED; } else { s_hidData = HID_REPORT_INTERRUPT_DEASSERTED; From ce24c73dc0b85a35e84c45aa960e339c59d0936f Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 2 Oct 2019 16:51:46 +0100 Subject: [PATCH 08/11] Change pre-processor symbol names to make them generic. --- lib_xua/src/core/user/user_hid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index afcbb2e9..f0894d65 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -21,7 +21,7 @@ #if( 0 < HID_CONTROLS ) -#if( 0 < NDP_ASSERT_LEVEL ) +#if( 0 < INTERRUPT_ASSERT_LEVEL ) #define INT_ASSERT_LEVEL 1 #define INT_DEASSERT_LEVEL 0 #else From e7e8b58275f37337e01b31655c4a94fc4d79ac67 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 2 Oct 2019 16:54:38 +0100 Subject: [PATCH 09/11] Move user_hid.xc from lib_xua to the application (sw_xvf3510). --- lib_xua/src/core/user/user_hid.xc | 36 ------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 lib_xua/src/core/user/user_hid.xc diff --git a/lib_xua/src/core/user/user_hid.xc b/lib_xua/src/core/user/user_hid.xc deleted file mode 100644 index 75cb8df6..00000000 --- a/lib_xua/src/core/user/user_hid.xc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2019, XMOS Ltd, All rights reserved -#include -#include -#include -#include "user_hid.h" - -#if( 0 < HID_CONTROLS ) -#define HID_REPORT_INTERRUPT_ASSERTED 0x01 -#define HID_REPORT_INTERRUPT_DEASSERTED 0x00 - -static unsigned char s_hidData; - -void UserInitHIDData( void ) -{ - s_hidData = HID_REPORT_INTERRUPT_DEASSERTED; -} - -void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]) -{ - hidData[ 0 ] = s_hidData; - - for( unsigned i = 1; i < HID_DATA_SIZE; ++i ) { - hidData[ i ] = 0U; - } -} - -void UserSetHIDData( const unsigned hidData ) -{ - if( hidData == INT_ASSERT_LEVEL ) { - s_hidData = HID_REPORT_INTERRUPT_ASSERTED; - } else { - s_hidData = HID_REPORT_INTERRUPT_DEASSERTED; - } -} - -#endif /* ( 0 < HID_CONTROLS ) */ From 74564edde86f186858f5f2d1633183d277d0b075 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 2 Oct 2019 16:55:42 +0100 Subject: [PATCH 10/11] Add HID trigger function. --- lib_xua/src/core/user/user_hid.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib_xua/src/core/user/user_hid.h b/lib_xua/src/core/user/user_hid.h index f0894d65..687b2445 100644 --- a/lib_xua/src/core/user/user_hid.h +++ b/lib_xua/src/core/user/user_hid.h @@ -34,8 +34,9 @@ #define HID_INTERRUPT_COUNT 1000000000 #endif -void UserInitHIDData(void); -void UserReadHIDData(unsigned char hidData[ HID_DATA_SIZE ]); -void UserSetHIDData(const unsigned hidData); +select UserHIDTrigger( unsigned* hidValueLatched ); +void UserInitHIDData( void ); +void UserReadHIDData( unsigned char hidData[ HID_DATA_SIZE ]); +void UserSetHIDData( const unsigned hidData ); #endif /* ( 0 < HID_CONTROLS ) */ From 211a49f26fcbcf9c472ff35334fe85b043cca7f8 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Wed, 2 Oct 2019 16:57:42 +0100 Subject: [PATCH 11/11] Remove unnecessary port parameters passed through XUA Buffer (whether the traditional one or the Lite version). --- lib_xua/api/xua_buffer.h | 2 -- lib_xua/src/core/buffer/ep/ep_buffer.xc | 3 --- 2 files changed, 5 deletions(-) diff --git a/lib_xua/api/xua_buffer.h b/lib_xua/api/xua_buffer.h index 5e7f65e4..93ca3219 100644 --- a/lib_xua/api/xua_buffer.h +++ b/lib_xua/api/xua_buffer.h @@ -60,7 +60,6 @@ void XUA_Buffer( in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid - , in port p_int #endif , chanend c_aud ); @@ -100,7 +99,6 @@ void XUA_Buffer_Ep(chanend c_aud_out, in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid - , in port p_int #endif #ifdef CHAN_BUFF_CTRL , chanend c_buff_ctrl diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index 53244092..5916da17 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -122,7 +122,6 @@ void XUA_Buffer( in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid - , in port p_int #endif , chanend c_aud ) @@ -167,7 +166,6 @@ void XUA_Buffer( c_sof, c_aud_ctl, p_off_mclk #if( 0 < HID_CONTROLS ) , c_hid - , p_int #endif #ifdef CHAN_BUFF_CTRL , c_buff_ctrl @@ -227,7 +225,6 @@ void XUA_Buffer_Ep(register chanend c_aud_out, in port p_off_mclk #if( 0 < HID_CONTROLS ) , chanend c_hid - , in port p_int #endif #ifdef CHAN_BUFF_CTRL , chanend c_buff_ctrl