mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/bitfield: improve documentation of bf_get_unset()
This commit is contained in:
parent
f3e519e27a
commit
d406f12028
@ -21,11 +21,11 @@
|
||||
#include "bitfield.h"
|
||||
#include "irq.h"
|
||||
|
||||
int bf_get_unset(uint8_t field[], int size)
|
||||
int bf_get_unset(uint8_t field[], size_t size)
|
||||
{
|
||||
int result = -1;
|
||||
int nbytes = (size + 7) / 8;
|
||||
int i = 0;
|
||||
size_t i = 0;
|
||||
|
||||
unsigned state = irq_disable();
|
||||
|
||||
@ -43,5 +43,5 @@ int bf_get_unset(uint8_t field[], int size)
|
||||
}
|
||||
|
||||
irq_restore(state);
|
||||
return(result);
|
||||
return result;
|
||||
}
|
||||
|
@ -182,12 +182,12 @@ static inline void bf_inv(uint8_t out[], const uint8_t a[], size_t len)
|
||||
* This function can be used to record e.g., empty entries in an array.
|
||||
*
|
||||
* @param[in,out] field The bitfield
|
||||
* @param[in] size The size of the bitfield
|
||||
* @param[in] len The number of bits in the bitfield to consider
|
||||
*
|
||||
* @return number of bit that was set
|
||||
* @return -1 if no bit was unset
|
||||
*/
|
||||
int bf_get_unset(uint8_t field[], int size);
|
||||
int bf_get_unset(uint8_t field[], size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user