mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
The reboot process for ATmegas is to enable the watchdog timer and loop until the wdt reboots this MCU. However, this reboot will keep the wdt configuration, so that the wdt needs to be disabled during boot. This is done in get_mcusr, but without the attribute "used" it will be optimized out in LTO builds. This commits adds the attribute "used" to get_mcusr. Also simplified the backward compatibility with older ATmegas (currently not supported by RIOT) on outdated versions of avrlibc.