How can I printf bit value of type “EventBits_t”?

How can I print bit value of type EventBits_t in C using printf? Is it integer and I should use %d in printf? Any other method to see the current value of event Bit? Thank you please.

How can I printf bit value of type “EventBits_t”?

It is an unsigned integer, so more likely to need %u, or whatever your library specifies to print unsigned integers. Can’t recall without looking it up, but I think the top bits might be used as control bits, so you may have to mask those off, or maybe they are masked off before the bits are returned.

How can I printf bit value of type “EventBits_t”?

Thanks now I get correct result using below code: ~~~ EventGroupHandle_t myeventGroup; myeventGroup = xEventGroupCreate(); int bitvalue = xEventGroupGetBits(myeventGroup); printf(“%dn”, bitvalue); ~~~ I hope I am doing it right.

How can I printf bit value of type “EventBits_t”?

Other than you are printing it as a signed value, whereas it is actually an unsigned value.

How can I printf bit value of type “EventBits_t”?

Thanks Richard for your help.