OSA : OS_Flag_Check_On

bool OS_Flag_Check_On (flags, mask)
bool OS_Flag_Check_On_I (flags, mask)

Check if any mask bits in flags are set.

Call allowed:

Everywhere

Parameters:

flags Variable of OST_FLAGx (x = 8, 16, 32) type
mask Bit mask to operate on

Returns:

false flags & mask == 0
true flags & mask != 0

Example:

OST_FLAG flag;
 
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Flag_Check_On (flag, 9);  // Check if bit 0 or bit 3 is set
        /*...*/
    }
}

Old style name

OS_CheckAnyFlag

OS_Flag_Check_On

See also