OSA : OS_Flag_Check_AllOn

bool OS_Flag_Check_AllOn (flags, mask)
bool OS_Flag_Check_AllOn_I (flags, mask)

Check if all 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 != mask
true flags & mask == mask

Example:

OST_FLAG flag;
 
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Flag_Check_AllOn (flag, 0x5);  // Check bits 0 and 2
        /*...*/
    }
}

Old style name

OS_CheckAllFlag

OS_Flag_Check_AllOn

See also