typedef unsigned int StatusCode;
StatusCode quality = 0;
#define PARTIALBIT 0x05
quality |= PARTIALBIT ;// I am setting a partial bit here
// ….
At other part of code I have to check if paritial bit is set and I have to clear it.
How do I acheive this in C ?
Thanks!
Try this:
Also, if you have to set bit 5, then you’re on the wrong way. If you want to set bit 5, use:
instead.