Add descriptor validation function & fix issues it found

Note this is in progress, I either want to move the check function somewhere else,
or convert the printf calls to something else (I imagine some kind of log function
exists?)
This commit is contained in:
Ciaran Woodward
2021-12-10 18:00:04 +00:00
parent e41aed6ffb
commit 71dd8b5409
7 changed files with 189 additions and 14 deletions

View File

@@ -127,6 +127,7 @@ static const USB_HID_Short_Item_t* const hidReportDescriptorItems[] = {
&hidLogicalMaximum0,
&hidReportCount6,
&hidInputConstArray,
&hidReportCount1,
&hidLogicalMaximum1,
&(hidUsageByte1Bit7.item),
&hidInputDataVar,

View File

@@ -40,6 +40,11 @@ void setUp( void )
hidResetReportDescriptor();
}
void test_validate_report( void ) {
unsigned retVal = hidReportValidate();
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, retVal );
}
// Basic report descriptor tests
void test_unprepared_hidGetReportDescriptor( void )
{