[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: RTT and RTC support (#8842)
notifications at github.com
Thu Apr 18 18:03:20 CEST 2019
@ZetaR60 Keep also in byte that the hardware-mapped memory like `TIMSK2` is indeed (and correctly) `volatile`:
#define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
#define _SFR_MEM8(mem_addr) _MMIO_BYTE(mem_addr)
#define TIMSK2 _SFR_MEM8(0x70)
So the access to `TIMSK2` will be "a fence" regarding the reordering of sequence points. There really is nothing to gain from declaring `rtt_state` to be `volatile`.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications