41 #define QBITFIELD_SIZE( NBITS ) ( 4 * ( ( ( (NBITS)-1 ) / 32 ) + 1 ) )
54 const size_t area_size );
104 const size_t index );
148 const size_t index );
void * qBitField_Dump(const qBitField_t *const b, void *const dst, size_t n)
Copies n bytes from the bit-field instance to a designed memory area.
Definition qbitfield.c:293
int qBitField_WriteFloat(qBitField_t *const b, const size_t index, float value)
Writes a 32-bit floating point value to the BitField.
Definition qbitfield.c:276
float qBitField_ReadFloat(const qBitField_t *const b, const size_t index)
Reads a 32-bit floating point value from the BitField.
Definition qbitfield.c:260
int qBitField_ClearBit(qBitField_t *const b, const size_t index)
Clears one bit in a BitField.
Definition qbitfield.c:151
int qBitField_SetBit(qBitField_t *const b, const size_t index)
Sets one bit in a BitField.
Definition qbitfield.c:138
int qBitField_WriteUINTn(qBitField_t *const b, const size_t index, uint32_t value, size_t xBits)
Writes an unsigned n-bit value from the BitField.
Definition qbitfield.c:230
int qBitField_ClearAll(qBitField_t *const b)
Clear all the bits in the BitField.
Definition qbitfield.c:114
int qBitField_WriteBit(qBitField_t *const b, const size_t index, uint8_t value)
Writes one bit in a bitfield.
Definition qbitfield.c:189
int qBitField_Setup(qBitField_t *const b, void *const area, const size_t area_size)
Setup a initialize a BitField instance.
Definition qbitfield.c:95
uint8_t qBitField_ReadBit(const qBitField_t *const b, const size_t index)
Retrieve the state of a bit in a bitfield.
Definition qbitfield.c:177
uint32_t qBitField_ReadUINTn(const qBitField_t *const b, const size_t index, size_t xBits)
Reads an unsigned 32-bit value from the BitField.
Definition qbitfield.c:208
int qBitField_ToggleBit(qBitField_t *const b, const size_t index)
Toggles (i.e. reverses the state of) a bit in a BitField.
Definition qbitfield.c:164
int qBitField_SetAll(qBitField_t *const b)
Set all the bits in the BitField.
Definition qbitfield.c:126
A BitField object.
Definition qbitfield.h:30