Fix inverted isSilenced logic, add INVALID_ID constant

This commit is contained in:
Ciaran Woodward
2021-12-20 14:47:20 +00:00
parent d3d9b5ba23
commit ccc1ee4021
2 changed files with 3 additions and 2 deletions

View File

@@ -31,7 +31,8 @@ typedef struct hidEvent_t {
unsigned value;
} hidEvent_t;
#define HID_MAX_DATA_BYTES 4
#define HID_MAX_DATA_BYTES ( 4 )
#define HID_EVENT_INVALID_ID ( 0x100 )
#if( 0 < HID_CONTROLS )

View File

@@ -39,7 +39,7 @@ unsigned HidIsSetIdleSilenced( const unsigned id )
{
unsigned isSilenced = hidIsIdleActive( id );
if( isSilenced ) {
if( !isSilenced ) {
unsigned currentTime;
// Use inline assembly to access the time without creating a side-effect.
// The mapper complains if the time comes from an XC timer because this function is called in the guard of a select case.