[riot-notifications] [RIOT-OS/RIOT] cpu/atmega_common: RTT and RTC support (#8842)

Marian Buschsieweke 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`:

``` C
#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:
https://github.com/RIOT-OS/RIOT/pull/8842#issuecomment-484574092
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190418/d988fa09/attachment.html>


More information about the notifications mailing list