Module tm4c129x_hal::bb

source ·
Expand description

Code to handle bit-banding.

Bit-banding is where the SoC maps each 8-bit byte to 8 consecutive 32-bit words. Writing a 1 to that word sets the matching bit. Writing a 0 clears the matching bit. It means you can perform atomic bit set/clear; i.e. without a read-modify-write.

Functions

Sets/Clears a bit at the given address atomically, using the bit-banding feature. We take a const pointer and mutate it, but that’s because the svd2rust crate will only give us const pointers.
Reads a bit at the given address atomically, using the bit-banding feature.
Spins while reading a bit at the given address atomically, using the bit- banding feature. We take a const pointer and mutate it, but that’s because the svd2rust crate will only give us const pointers.
Sets and then Clears a bit at the given address atomically, using the bit- banding feature. We take a const pointer and mutate it, but that’s because the svd2rust crate will only give us const pointers.