// An example function to clear a bit in a bitwise array.void Clearbit(unsigned int *puiBitArray, unsigned int uiID){ // Derive the array element in which the requested bit resides and the // actual offset of the bit. // 8 * sizeof(unsigned int) will be 32 with ARM compilers, but I have used // sizeof so that your code will be slightly more portable. Note that this // assumes that a byte is 8 bits. unsigned int uiArrayElement = uiID / (8 * sizeof(unsigned int)); unsigned int uiElementBit = uiID % (8 * sizeof(unsigned int)); // Clear the relevant bit. puiBitArray[uiArrayElement] &= ~(1 << uiElementBit);}