Alphabetise main functions in hid_report.c

This commit is contained in:
Angel Cascarino
2022-01-07 17:46:25 +00:00
parent a18e5a976f
commit c352ed1132

View File

@@ -228,14 +228,6 @@ unsigned hidGetNextReportTime( const unsigned id )
return retVal;
}
unsigned hidIsReportDescriptorPrepared( void )
{
swlock_acquire(hidStaticVarLock);
unsigned retVal = s_hidReportDescriptorPrepared;
swlock_release(hidStaticVarLock);
return retVal;
}
unsigned char* hidGetReportDescriptor( void )
{
unsigned char* retVal = NULL;
@@ -271,32 +263,6 @@ unsigned hidGetReportIdLimit ( void ) {
return retVal;
}
unsigned hidIsReportIdInUse ( void ) {
swlock_acquire(hidStaticVarLock);
if ( hidGetElementReportId( hidReports[ 0 ]->location ) ) {
swlock_release(hidStaticVarLock);
return 1;
}
swlock_release(hidStaticVarLock);
return 0;
}
unsigned hidIsReportIdValid ( unsigned id ) {
size_t retVal = 0;
swlock_acquire(hidStaticVarLock);
for( size_t idx = 0U; idx < HID_REPORT_COUNT; ++idx ) {
unsigned reportId = hidGetElementReportId( hidReports[ idx ]->location );
if( reportId == id ) {
retVal = 1;
break;
}
}
swlock_release(hidStaticVarLock);
return retVal;
}
unsigned hidGetNextValidReportId ( unsigned idPrev ) {
size_t retIndex = 0;
@@ -451,6 +417,40 @@ unsigned hidIsIdleActive( const unsigned id )
return retVal;
}
unsigned hidIsReportDescriptorPrepared( void )
{
swlock_acquire(hidStaticVarLock);
unsigned retVal = s_hidReportDescriptorPrepared;
swlock_release(hidStaticVarLock);
return retVal;
}
unsigned hidIsReportIdInUse ( void ) {
swlock_acquire(hidStaticVarLock);
if ( hidGetElementReportId( hidReports[ 0 ]->location ) ) {
swlock_release(hidStaticVarLock);
return 1;
}
swlock_release(hidStaticVarLock);
return 0;
}
unsigned hidIsReportIdValid ( unsigned id ) {
size_t retVal = 0;
swlock_acquire(hidStaticVarLock);
for( size_t idx = 0U; idx < HID_REPORT_COUNT; ++idx ) {
unsigned reportId = hidGetElementReportId( hidReports[ idx ]->location );
if( reportId == id ) {
retVal = 1;
break;
}
}
swlock_release(hidStaticVarLock);
return retVal;
}
void hidPrepareReportDescriptor( void )
{
swlock_acquire(hidStaticVarLock);