Fix merge issues

This commit is contained in:
Ciaran Woodward
2021-12-09 17:28:16 +00:00
parent 5f971af054
commit 353d7c3c8d
4 changed files with 6 additions and 9 deletions

View File

@@ -4,7 +4,7 @@
#ifndef __hid_report_descriptor_h__
#define __hid_report_descriptor_h__
#include "xua_hid_report_descriptor.h"
#include "xua_hid_report.h"
#define USB_HID_REPORT_ID_KEYBOARD ( 0x01 )
#define USB_HID_REPORT_ID_CONSUMER ( 0x02 )

View File

@@ -4,7 +4,7 @@
#include <stdio.h>
#include "xua_unit_tests.h"
#include "xua_hid_report_descriptor.h"
#include "xua_hid_report.h"
// Test constants related to the report descriptor defined in hid_report_descriptor.h
#define REPORT1_MAX_VALID_BIT ( 3 )
@@ -49,6 +49,7 @@ static unsigned construct_usage_header( unsigned size )
void setUp( void )
{
hidReportInit();
hidResetReportDescriptor();
}

View File

@@ -4,7 +4,7 @@
#ifndef __hid_report_descriptor_h__
#define __hid_report_descriptor_h__
#include "xua_hid_report_descriptor.h"
#include "xua_hid_report.h"
#define USB_HID_USAGE_PAGE_ID_CONSUMER ( 0x0C )

View File

@@ -42,6 +42,7 @@ static unsigned construct_usage_header( unsigned size )
void setUp( void )
{
hidReportInit();
hidResetReportDescriptor();
}
@@ -59,7 +60,7 @@ void test_unprepared_hidGetReportDescriptor( void )
void test_prepared_hidGetReportDescriptor( void )
{
const unsigned reportId = 0;
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );
@@ -70,7 +71,6 @@ void test_prepared_hidGetReportDescriptor( void )
void test_reset_unprepared_hidGetReportDescriptor( void )
{
hidReportInit();
hidPrepareReportDescriptor();
hidResetReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
@@ -79,7 +79,6 @@ void test_reset_unprepared_hidGetReportDescriptor( void )
void test_reset_prepared_hidGetReportDescriptor( void )
{
hidReportInit();
hidPrepareReportDescriptor();
hidResetReportDescriptor();
hidPrepareReportDescriptor();
@@ -453,7 +452,6 @@ void test_initial_modification_with_subsequent_preparation( void )
const unsigned char header = construct_usage_header( sizeof data / sizeof( unsigned char ));
const unsigned char page = CONSUMER_CONTROL_PAGE;
hidReportInit();
unsigned retVal = hidSetReportItem( reportId, byte, bit, page, header, data );
TEST_ASSERT_EQUAL_UINT( HID_STATUS_GOOD, retVal );
@@ -536,7 +534,6 @@ void test_initial_modification_with_subsequent_verification_2( void )
void test_modification_without_subsequent_preparation( void )
{
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );
@@ -558,7 +555,6 @@ void test_modification_without_subsequent_preparation( void )
void test_modification_with_subsequent_preparation( void )
{
hidReportInit();
hidPrepareReportDescriptor();
unsigned char* reportDescPtr = hidGetReportDescriptor();
TEST_ASSERT_NOT_NULL( reportDescPtr );