Write a C function to set, clear, and toggle specific bits in a 32-bit hardware register at Benchmark Space Systems.