20 Commits

Author SHA1 Message Date
Michael Banther
2923f7574b Merge pull request #220 from xmos/release/v2.1.1
Release v2.1.1
2021-09-08 15:02:41 +01:00
Michael Banther
436a268781 Merge pull request #219 from xmos/develop
Prepare release of v2.1.1
2021-09-08 11:28:45 +01:00
Michael Banther
8233ef1d47 Merge pull request #218 from mbanth/feature/fix_hid_set_report_item
Fix hid set report item
2021-08-26 16:52:06 +01:00
mbanth
1109e08dd8 Increment version and add change log entry 2021-08-26 16:25:40 +01:00
mbanth
15f1d4de59 Use correct order of expected vs actual results in test assertions 2021-08-26 16:13:23 +01:00
mbanth
911a82cd83 Add test for the case of a modified item that of length 1 that overwrites data of length 2 2021-08-25 18:16:54 +01:00
mbanth
ec657d1e8d Zero the MSB if given an item of length 1 2021-08-25 18:13:12 +01:00
Luciano Martin
9e82d613bb Merge pull request #217 from xmos/release/v2.1.0
Merge release/v2.1.0 into master
2021-08-20 16:05:48 +01:00
Luciano Martin
eb62940dc6 Merge pull request #215 from xmos/develop
Merge develop into release/v2.1.0
2021-08-20 15:48:30 +01:00
Luciano Martin
ef46bd72b9 Merge pull request #216 from xmos/feature/update_dependency_version
Updare lib_xud dependency version
2021-08-20 15:48:17 +01:00
lucianom
7abcb487a9 Updare lib_xud dependency version 2021-08-20 14:55:05 +01:00
Luciano Martin
e87a53ff83 Merge pull request #214 from lucianomartin/feature/lib_xud_v2_0_0
Update clock blocks to support lib_xud v2.0.0
2021-08-06 11:50:43 +01:00
lucianom
8e05595710 Update clock in unit test 2021-08-06 10:21:38 +01:00
lucianom
ffee831f5d Updated clock blocks to support lib_xud v2.0.0 2021-08-06 08:52:36 +01:00
Michael Banther
ad88e3342e Merge pull request #211 from xmos/release/v2.0.1
Release v2.0.1
2021-07-27 13:06:03 +01:00
Michael Banther
d0986cb37f Merge pull request #210 from xmos/develop
Prepare release v2.0.1
2021-07-26 16:11:48 +01:00
Michael Banther
9d148f68a3 Merge pull request #209 from mbanth/feature/bump_version
Bump version to 2.0.1
2021-07-26 14:47:48 +01:00
mbanth
3b1b7f81dc Bumped version to 2.0.1 2021-07-26 14:23:27 +01:00
Michael Banther
1e4bcf01c7 Merge pull request #208 from mbanth/feature/revert_xud_dependency_version
Revert the dependency on lib_xud to v1.2.0
2021-07-26 13:44:04 +01:00
mbanth
46ce681a88 Revert the dependency on lib_xud to v1.2.0. XVF3510 uses that version. 2021-07-23 18:34:28 +01:00
6 changed files with 77 additions and 10 deletions

View File

@@ -1,6 +1,22 @@
lib_xua Change Log
==================
2.1.1
-----
* CHANGED: Setting of HID report items
2.1.0
-----
* CHANGED: Updated clock blocks to support lib_xud v2.0.0
* CHANGED: Updated dependency on lib_xud to v2.0.0 for use by XVF3600
2.0.1
-----
* CHANGED: Reverted dependency on lib_xud to v1.2.0 for use by XVF3510
2.0.0
-----

View File

@@ -1,8 +1,8 @@
VERSION = 2.0.0
VERSION = 2.1.1
DEPENDENT_MODULES = lib_logging(>=3.0.0) \
lib_xassert(>=4.0.0) \
lib_xud(>=2.0.0) \
lib_xud(>=2.0.1) \
lib_spdif(>=4.0.0) \
lib_mic_array(>=4.0.0)

View File

@@ -9,9 +9,9 @@
#define CLKBLK_MIDI XS1_CLKBLK_REF;
#define CLKBLK_SPDIF_TX XS1_CLKBLK_1
#define CLKBLK_SPDIF_RX XS1_CLKBLK_1
#define CLKBLK_MCLK XS1_CLKBLK_4
#define CLKBLK_MCLK XS1_CLKBLK_2
#define CLKBLK_FLASHLIB XS1_CLKBLK_3 /* Clock block for use by flash lib */
#define CLKBLK_ADAT_RX XS1_CLKBLK_REF /* Use REF for ADAT_RX on U/x200 series */
#define CLKBLK_I2S_BIT XS1_CLKBLK_5
#define CLKBLK_I2S_BIT XS1_CLKBLK_3
#endif /* _UAC_HWRESOURCES_H_ */

View File

@@ -241,6 +241,10 @@ unsigned hidSetReportItem(
item.data[ dataIdx ] = data[ dataIdx ];
}
for( unsigned dataIdx = bSize; dataIdx < HID_REPORT_ITEM_MAX_SIZE; ++dataIdx ) {
item.data[ dataIdx ] = 0;
}
*hidConfigurableItems[ itemIdx ] = item;
retVal = HID_STATUS_GOOD;
} else {

View File

@@ -14,6 +14,7 @@
#define CONSUMER_CONTROL_PAGE ( 0x0C )
#define LOUDNESS_CONTROL ( 0xE7 )
#define AL_CONTROL_PANEL ( 0x019F )
static unsigned construct_usage_header( unsigned size )
{
@@ -411,7 +412,7 @@ void test_initial_modification_with_subsequent_preparation( void )
TEST_ASSERT_NOT_NULL( reportDescPtr );
}
void test_initial_modification_with_subsequent_verification( void )
void test_initial_modification_with_subsequent_verification_1( void )
{
const unsigned bit = MIN_VALID_BIT;
const unsigned byte = MIN_VALID_BYTE;
@@ -429,10 +430,56 @@ void test_initial_modification_with_subsequent_verification( void )
unsigned getRetVal = hidGetReportItem( byte, bit, &get_page, &get_header, get_data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, getRetVal );
TEST_ASSERT_EQUAL_UINT( get_page, set_page );
TEST_ASSERT_EQUAL_UINT( get_header, set_header );
TEST_ASSERT_EQUAL_UINT( get_data[ 0 ], set_data[ 0 ]);
TEST_ASSERT_EQUAL_UINT( get_data[ 1 ], set_data[ 1 ]);
TEST_ASSERT_EQUAL_UINT( set_page, get_page );
TEST_ASSERT_EQUAL_UINT( set_header, get_header );
TEST_ASSERT_EQUAL_UINT( set_data[ 0 ], get_data[ 0 ]);
TEST_ASSERT_EQUAL_UINT( 0, get_data[ 1 ]); // Should be MSB of data from hidUsageByte0Bit0 in hid_report_descriptor.h
}
void test_initial_modification_with_subsequent_verification_2( void )
{
const unsigned bit = MIN_VALID_BIT;
const unsigned byte = MIN_VALID_BYTE;
{
unsigned char get_data[ HID_REPORT_ITEM_MAX_SIZE ] = { 0xFF, 0xFF };
unsigned char get_header = 0xFF;
unsigned char get_page = 0xFF;
const unsigned char set_data[ 2 ] = {( AL_CONTROL_PANEL & 0x00FF ), (( AL_CONTROL_PANEL & 0xFF00 ) >> 8 )};
const unsigned char set_header = construct_usage_header( sizeof set_data / sizeof( unsigned char ));
const unsigned char set_page = CONSUMER_CONTROL_PAGE;
unsigned setRetVal = hidSetReportItem( byte, bit, set_page, set_header, set_data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, setRetVal );
unsigned getRetVal = hidGetReportItem( byte, bit, &get_page, &get_header, get_data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, getRetVal );
TEST_ASSERT_EQUAL_UINT( set_page, get_page );
TEST_ASSERT_EQUAL_UINT( set_header, get_header );
TEST_ASSERT_EQUAL_UINT( set_data[ 0 ], get_data[ 0 ]);
TEST_ASSERT_EQUAL_UINT( set_data[ 1 ], get_data[ 1 ]);
}
{
unsigned char get_data[ HID_REPORT_ITEM_MAX_SIZE ] = { 0xFF, 0xFF };
unsigned char get_header = 0xFF;
unsigned char get_page = 0xFF;
const unsigned char set_data[ 1 ] = { LOUDNESS_CONTROL };
const unsigned char set_header = construct_usage_header( sizeof set_data / sizeof( unsigned char ));
const unsigned char set_page = CONSUMER_CONTROL_PAGE;
unsigned setRetVal = hidSetReportItem( byte, bit, set_page, set_header, set_data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, setRetVal );
unsigned getRetVal = hidGetReportItem( byte, bit, &get_page, &get_header, get_data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, getRetVal );
TEST_ASSERT_EQUAL_UINT( set_page, get_page );
TEST_ASSERT_EQUAL_UINT( set_header, get_header );
TEST_ASSERT_EQUAL_UINT( set_data[ 0 ], get_data[ 0 ]);
TEST_ASSERT_EQUAL_UINT( 0, get_data[ 1 ]); // The call to hidSetReportItem with size 1 in the header should return the MSB to zero
}
}
void test_modification_without_subsequent_preparation( void )

View File

@@ -13,7 +13,7 @@ in port p_mclk_in = XS1_PORT_1D;
/* Clock-block declarations */
clock clk_audio_bclk = on tile[0]: XS1_CLKBLK_1; /* Bit clock */
clock clk_audio_mclk = on tile[0]: XS1_CLKBLK_4; /* Master clock */
clock clk_audio_mclk = on tile[0]: XS1_CLKBLK_2; /* Master clock */
// Supply missing but unused function
void AudioHwConfig(unsigned samFreq, unsigned mClk, unsigned dsdMode, unsigned sampRes_DAC, unsigned sampRes_ADC)