FreeBSD/sys/contrib/dev/acpica/compiler/aslbtypes.c
/*******************************************************************************
 *
 * FUNCTION:    AnMapBtypeToEtype
 *
 * PARAMETERS:  Btype               - Bitfield of ACPI types
 *
 * RETURN:      The Etype corresponding the the Btype
 *
 * DESCRIPTION: Convert a bitfield type to an encoded type
 *
 ******************************************************************************/
AnMapBtypeToEtype
PARAMETERS:  Btype               - Bitfield of ACPI types

The Etype corresponding the the Btype

Convert a bitfield type to an encoded type
AnMapBtypeToEtype PARAMETERS : Btype - Bitfield of ACPI types The Etype corresponding the the Btype Convert a bitfield type to an encoded type
UINT32
AnMapBtypeToEtype (
    UINT32              Btype)
{
    UINT32              i;
    UINT32              Etype;
    if (Btype == 0)
    {
        return (0);
    }
    Etype = 1;
    for (i = 1; i < Btype; i *= 2)
    {
        Etype++;
    }
    return (Etype);
}
UINT32 AnMapBtypeToEtype ( UINT32 Btype ) { UINT32 i ; UINT32 Etype ; if ( Btype == 0 ) { return ( 0 ) ; } Etype = 1 ; for ( i = 1 ; i < Btype ; i *= 2 ) { Etype ++ ; } return ( Etype ) ; }
FUNCTION:    AnMapBtypeToEtype
 PARAMETERS:  Btype               - Bitfield of ACPI types
FUNCTION : AnMapBtypeToEtype PARAMETERS : Btype - Bitfield of ACPI types