forked from PAWPAW-Mirror/lib_xua
Fix inverted isSilenced logic, add INVALID_ID constant
This commit is contained in:
@@ -31,7 +31,8 @@ typedef struct hidEvent_t {
|
|||||||
unsigned value;
|
unsigned value;
|
||||||
} hidEvent_t;
|
} hidEvent_t;
|
||||||
|
|
||||||
#define HID_MAX_DATA_BYTES 4
|
#define HID_MAX_DATA_BYTES ( 4 )
|
||||||
|
#define HID_EVENT_INVALID_ID ( 0x100 )
|
||||||
|
|
||||||
#if( 0 < HID_CONTROLS )
|
#if( 0 < HID_CONTROLS )
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ unsigned HidIsSetIdleSilenced( const unsigned id )
|
|||||||
{
|
{
|
||||||
unsigned isSilenced = hidIsIdleActive( id );
|
unsigned isSilenced = hidIsIdleActive( id );
|
||||||
|
|
||||||
if( isSilenced ) {
|
if( !isSilenced ) {
|
||||||
unsigned currentTime;
|
unsigned currentTime;
|
||||||
// Use inline assembly to access the time without creating a side-effect.
|
// 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.
|
// The mapper complains if the time comes from an XC timer because this function is called in the guard of a select case.
|
||||||
|
|||||||
Reference in New Issue
Block a user