diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0f6fee2f..10a4cb0b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ lib_xua Change Log ================== +UNRELEASED +---------- + + * CHANGED: Exclude HID Report functions unless the HID feature is enabled + 3.1.0 ----- diff --git a/lib_xua/src/hid/hid_report.c b/lib_xua/src/hid/hid_report.c index 02c8122c..325aee9f 100644 --- a/lib_xua/src/hid/hid_report.c +++ b/lib_xua/src/hid/hid_report.c @@ -1,5 +1,7 @@ // Copyright 2021-2022 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. +#if( 0 < HID_CONTROLS ) + #include #include #include @@ -851,3 +853,5 @@ unsigned hidReportValidate( void ) return hidReportValidateInfoStruct( &info ); } } + +#endif // ( 0 < HID_CONTROLS ) diff --git a/tests/xua_unit_tests/CMakeLists.txt b/tests/xua_unit_tests/CMakeLists.txt index 9487a471..6bccf6d6 100644 --- a/tests/xua_unit_tests/CMakeLists.txt +++ b/tests/xua_unit_tests/CMakeLists.txt @@ -49,6 +49,7 @@ foreach( testsourcefile ${APP_SOURCES} ) "-fxscope" "-target=XCORE-AI-EXPLORER" "${CMAKE_CURRENT_SOURCE_DIR}/config.xscope" + "-DHID_CONTROLS=1" "-DUNITY_SUPPORT_64" "-DUNITY_INCLUDE_DOUBLE" ) diff --git a/tests/xua_unit_tests/wscript b/tests/xua_unit_tests/wscript index da0e1fc2..a31dbfaf 100644 --- a/tests/xua_unit_tests/wscript +++ b/tests/xua_unit_tests/wscript @@ -230,6 +230,7 @@ def build(bld): makefile_opts['XCC_FLAGS'] = ['-O2', '-g', '-Wall', + '-DHID_CONTROLS=1', '-DUNITY_SUPPORT_64', '-DUNITY_INCLUDE_DOUBLE', '-DXUD_CORE_CLOCK=600',