From 2fb0bdfcc22494b558b52b4e24732d5924134fb6 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Tue, 1 Oct 2019 13:52:08 +0100 Subject: [PATCH] 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;