X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fstruct%2Fbitarray.h;h=791d46767ccc5012378640154108b79fa5aaa1d4;hb=e8b0472be10fba4ca6baa62d8d483db90e28c06e;hp=0dc54c9160786cd9418e3239ff7d38bbb02ba302;hpb=720e92a7406e847658acb48521684932a1977368;p=bertos.git diff --git a/bertos/struct/bitarray.h b/bertos/struct/bitarray.h index 0dc54c91..791d4676 100644 --- a/bertos/struct/bitarray.h +++ b/bertos/struct/bitarray.h @@ -144,6 +144,9 @@ INLINE bool bitarray_test(BitArray *bitx, int idx) * Check if the bitarray is full * * Only \a bitarray_len bits are tested. + * + * \param bitx BitArray to test + * \return True if \a bitx is full, false otherwise */ INLINE bool bitarray_isFull(BitArray *bitx) { @@ -170,6 +173,7 @@ INLINE bool bitarray_isFull(BitArray *bitx) * \param bitx BitArray context * \param idx Starting bit * \param offset Number of bits to test + * \return True if range is full, false otherwise */ INLINE bool bitarray_isRangeFull(BitArray *bitx, int idx, int offset) { @@ -191,6 +195,7 @@ INLINE bool bitarray_isRangeFull(BitArray *bitx, int idx, int offset) * \param bitx BitArray context * \param idx Starting bit * \param offset Number of bits to test + * \return True if range is empty, false otherwise */ INLINE bool bitarray_isRangeEmpty(BitArray *bitx, int idx, int offset) { @@ -233,6 +238,8 @@ INLINE void bitarray_dump(BitArray *bitx) kprintf("..%02x [%d]\n", bitx->array[i / 8], i); } +int bitarray_firstSetBit(BitArray *bitx); + /** * Init a BitArray. *