From e671fa1fd173429eea27bb38cecb537707036b86 Mon Sep 17 00:00:00 2001 From: "Mr.Blinky" Date: Wed, 23 Feb 2022 16:25:14 +0100 Subject: [PATCH] Update ArduboyFX.cpp Fix return values of readPendingUInt24 readPendingLastUInt24 --- board-package-source/libraries/ArduboyFX/src/ArduboyFX.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board-package-source/libraries/ArduboyFX/src/ArduboyFX.cpp b/board-package-source/libraries/ArduboyFX/src/ArduboyFX.cpp index 10a9204..5b6274f 100644 --- a/board-package-source/libraries/ArduboyFX/src/ArduboyFX.cpp +++ b/board-package-source/libraries/ArduboyFX/src/ArduboyFX.cpp @@ -265,9 +265,10 @@ uint24_t FX::readPendingUInt24() asm volatile ( "call ArduboyFX_cpp_readPendingUInt16 \n" - "mov %C[val], r25 \n" "mov %B[val], r24 \n" "call ArduboyFX_cpp_readPendingUInt8 \n" + "mov %A[val], r24 \n" + "mov %C[val], r25 \n" : [val] "=&r" (result) : "" (readPendingUInt16), "" (readPendingUInt8) @@ -287,9 +288,10 @@ uint24_t FX::readPendingLastUInt24() asm volatile ( "call ArduboyFX_cpp_readPendingUInt16 \n" - "mov %C[val], r25 \n" "mov %B[val], r24 \n" "call ArduboyFX_cpp_readPendingLastUInt8 \n" + "mov %A[val], r24 \n" + "mov %C[val], r25 \n" : [val] "=&r" (result) : "" (readPendingUInt16), "" (readPendingLastUInt8)