WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
Bitmap
Bitmap 的协作图:

宏定义

#define LOS_INVALID_BIT_INDEX   32
 

函数

void LOS_BitmapSet (UINT32 *bitmap, UINT16 pos)
 Set one bit.
 
void LOS_BitmapClr (UINT32 *bitmap, UINT16 pos)
 Clear one bit.
 
UINT16 LOS_LowBitGet (UINT32 bitmap)
 Find the lowest one bit that is set.
 
UINT16 LOS_HighBitGet (UINT32 bitmap)
 Find the highest one bit that is set.
 

详细描述

宏定义说明

◆ LOS_INVALID_BIT_INDEX

#define LOS_INVALID_BIT_INDEX   32

Flag that indicates the invalid bit index.

The effective bit index is from 0 to 31.

函数说明

◆ LOS_BitmapClr()

void LOS_BitmapClr ( UINT32 bitmap,
UINT16  pos 
)

Clear one bit.

Description:
This API is used to clear one bit of variable according to the parameter.
注意
  • When the value of pos is greater than 31, the bit (pos & 0x1f) of bitmap will be clear.
参数
bitmap[IN] The bitmap variable pointer.
pos[IN] The number bit to be cleared.
返回值
None.
Dependency:
  • los_bitmap.h: the header file that contains the API declaration.
参见
LOS_BitmapSet.
自从
Huawei LiteOS V100R001C00

◆ LOS_BitmapSet()

void LOS_BitmapSet ( UINT32 bitmap,
UINT16  pos 
)

Set one bit.

Description:
This API is used to set one bit of variable according to the parameter.
注意
  • When the value of pos is greater than 31, the bit (pos & 0x1f) of bitmap will be set.
参数
bitmap[IN] The bitmap variable pointer.
pos[IN] The number bit to be set.
返回值
None
Dependency:
  • los_bitmap.h: the header file that contains the API declaration.
参见
LOS_BitmapClr
自从
Huawei LiteOS V100R001C00

◆ LOS_HighBitGet()

UINT16 LOS_HighBitGet ( UINT32  bitmap)

Find the highest one bit that is set.

Description:
This API is used to find the highest one bit that is set and return the bit index.
注意
None.
参数
bitmap[IN] The bitmap variable.
返回值
UINT16The bit index of the highest one bit that is set.
Dependency:
  • los_bitmap.h: the header file that contains the API declaration.
参见
LOS_LowBitGet
自从
Huawei LiteOS V100R001C00

◆ LOS_LowBitGet()

UINT16 LOS_LowBitGet ( UINT32  bitmap)

Find the lowest one bit that is set.

Description:
This API is used to find the lowest one bit that is set and return the bit index.
注意
None.
参数
bitmap[IN] The bitmap variable.
返回值
UINT16The bit index of the lowest one bit that is set.
Dependency:
  • los_bitmap.h: the header file that contains the API declaration.
参见
LOS_HighBitGet
自从
Huawei LiteOS V100R001C00