24#ifndef ZEPHYR_BLUESYNC_SRC_BLUESYNC_BITFIELDS_H_
25#define ZEPHYR_BLUESYNC_SRC_BLUESYNC_BITFIELDS_H_
36bool is_bit_set(uint8_t *bitfield,
size_t bit_index);
44void set_bit(uint8_t *bitfield,
size_t bit_index);
void bitwise_and_bitfields(uint8_t *result, const bluesync_timestamps_t *rcv, const bluesync_timestamps_t *local, size_t num_bytes)
Perform a bitwise AND between two bitfields and store the result.
size_t count_set_bits(uint8_t *bitfield, size_t num_bytes)
Count the number of bits set to 1 in a bitfield.
void set_bit(uint8_t *bitfield, size_t bit_index)
Set a specific bit in the bitfield.
bool is_bit_set(uint8_t *bitfield, size_t bit_index)
Check if a specific bit is set in the bitfield.
static struct local_time local