Make watchdogReset() force_inline

It makes no sense keeping watchdogReset as a separate function which
must be called, since it only contains one instruction: "wdr".

Not only was the code larger by 32 bytes in total, but also much slower
(call+ret take 4 cycles together for no reason in this case).

Surprisingly, doing just this on FW 3.9.3 solves issue #2954 on the one
affected EINSY board, even though it makes not much sense (there must be
some other timing issue).
This commit is contained in:
D.R.racer 2021-02-17 13:04:46 +01:00
parent 7a84ad71dc
commit a456c4a52d

View file

@ -43,7 +43,7 @@ static void watchdogConfig(uint8_t x) {
WDTCSR = x;
}
static void watchdogReset() {
static FORCE_INLINE void watchdogReset() {
__asm__ __volatile__ (
"wdr\n"
);