std1.0.0-beta-7 SafeC docs

Module interrupt::bitfield

#include <std/interrupt/bitfield.h> source

Bitfield Helpers Pure functions for register bit manipulation. Freestanding-safe.

Functions

bf_extract32
bf_insert32Insert field into bits [hi:lo] of val. Returns modified value.
bf_set32Set bits [hi:lo] to all 1s.
bf_clear32Clear bits [hi:lo] to all 0s.
bf_toggle32Toggle bits [hi:lo].
bf_test32Check if bit n is set. Returns 1 if set.
bf_mask32Return a mask with bits [hi:lo] set.
bf_popcount32Count set bits in a 32-bit value.