zig-bitjuggle
zig-bitjuggle copied to clipboard
Various "bit juggling" helpers and functionality
zig-bitjuggle
This package contains various "bit juggling" helpers and functionality:
-
isBitSet
- Check if a bit is set -
getBit
- Get the value of a bit -
getBits
- Get a range of bits -
setBit
- Set a specific bit -
setBits
- Set a range of bits -
Bitfield
- Used along withextern union
to represent arbitrary bit fields -
Bit
- Used along withextern union
to represent bit fields -
Boolean
- Used along withextern union
to represent boolean bit fields
The Bitfield
, Bit
& Boolean
types are taken pretty much verbatim from Florence (see LICENSE-FLORENCE for original license)
How to get
Gyro
gyro add leecannon/bitjuggle
Zigmod
zigmod aq add 1/leecannon/bitjuggle
Git
Submodule
git submodule add https://github.com/leecannon/zig-bitjuggle zig-bitjuggle
Clone
git clone https://github.com/leecannon/zig-bitjuggle