We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Sometimes in cortex M3 there are registers which get cleared on reading. like some of int registers.
Now if use
uint32_t dummy = read_register();
then if will clear the register but compiler generate warning that dummy not used again, which is ok, now this can be removed by if(dummy){}.
But can it be done by below statement:
(void)(read_regsiter());
Will it clear the register also
Not only in Cortex-M3 - it's very common & widespread...
"Not only in Cortex-M3 - it's very common & widespread..."
Almost "every" UART has such registers.