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:
parent
7a84ad71dc
commit
a456c4a52d
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ static void watchdogConfig(uint8_t x) {
|
|||
WDTCSR = x;
|
||||
}
|
||||
|
||||
static void watchdogReset() {
|
||||
static FORCE_INLINE void watchdogReset() {
|
||||
__asm__ __volatile__ (
|
||||
"wdr\n"
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue