sys_bitarray_popcount_region

Function sys_bitarray_popcount_region 

Source
pub unsafe extern "C" fn sys_bitarray_popcount_region(
    bitarray: *mut sys_bitarray,
    num_bits: usize,
    offset: usize,
    count: *mut usize,
) -> i32
Expand description

Count bits set in a bit array region

This counts the number of bits set (@p count) in a region (@p offset, @p num_bits).

@param[in] bitarray Bitarray struct @param[in] num_bits Number of bits to check, must be larger than 0 @param[in] offset Starting bit position @param[out] count Number of bits set in the region if successful

@retval 0 Operation successful @retval -EINVAL Invalid argument (e.g. out-of-bounds access, trying to count 0 bits, etc.)