From 64441b810c0e7f95ab1bf0934128ab8962ee49a0 Mon Sep 17 00:00:00 2001 From: "Mr.Blinky" <4971163+MrBlinky@users.noreply.github.com> Date: Mon, 22 Jul 2019 22:41:31 +0200 Subject: [PATCH] update ATMlib --- .../libraries/ATMlib/library.json | 2 +- .../libraries/ATMlib/library.properties | 2 +- .../libraries/ATMlib/src/ATMlib.cpp | 2 +- .../libraries/ATMlib/src/ATMlib.h | 56 +++++++------------ 4 files changed, 23 insertions(+), 39 deletions(-) diff --git a/board-package-source/libraries/ATMlib/library.json b/board-package-source/libraries/ATMlib/library.json index 3d417df..103d1de 100644 --- a/board-package-source/libraries/ATMlib/library.json +++ b/board-package-source/libraries/ATMlib/library.json @@ -7,7 +7,7 @@ "type": "git", "url": "https://github.com/TEAMarg/ATMlib.git" }, - "version": "1.2.5", + "version": "1.2.6", "exclude": "extras", "frameworks": "arduino", "platforms": "atmelavr" diff --git a/board-package-source/libraries/ATMlib/library.properties b/board-package-source/libraries/ATMlib/library.properties index d4a9e6e..15e07c4 100644 --- a/board-package-source/libraries/ATMlib/library.properties +++ b/board-package-source/libraries/ATMlib/library.properties @@ -1,5 +1,5 @@ name=ATMlib -version=1.2.5 +version=1.2.6 author=TEAM a.r.g., Davey Taylor aka STG, Joeri Gantois aka JO3RI maintainer=info@TEAM_arg.org sentence=The Arduboy Tracker Music library. diff --git a/board-package-source/libraries/ATMlib/src/ATMlib.cpp b/board-package-source/libraries/ATMlib/src/ATMlib.cpp index 9c744af..e924b8d 100644 --- a/board-package-source/libraries/ATMlib/src/ATMlib.cpp +++ b/board-package-source/libraries/ATMlib/src/ATMlib.cpp @@ -28,7 +28,7 @@ byte ChannelActiveMute = 0b11110000; extern uint16_t cia; // Exports -osc_t osc[4]; +osc_t __attribute__((used)) osc[4]; const word noteTable[64] PROGMEM = { diff --git a/board-package-source/libraries/ATMlib/src/ATMlib.h b/board-package-source/libraries/ATMlib/src/ATMlib.h index 2927f5e..e72bd32 100644 --- a/board-package-source/libraries/ATMlib/src/ATMlib.h +++ b/board-package-source/libraries/ATMlib/src/ATMlib.h @@ -63,15 +63,12 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "push r2 " "\n\t" \ "in r2, __SREG__ " "\n\t" \ "push r18 " "\n\t" \ - "lds r18, half \n\t" \ - "com r18 \n\t" \ - "sts half, r18 \n\t" \ - "breq continue \n\t" \ - "pop r18 " "\n\t" \ - "out __SREG__, r2 " "\n\t" \ - "pop r2 " "\n\t" \ - "reti " "\n\t" \ - "continue: \n\t" \ + "lds r18, half " "\n\t" \ + "com r18 " "\n\t" \ + "sts half, r18 " "\n\t" \ + "breq 1f " "\n\t" \ + "rjmp 3f " "\n\t" \ + "1: " "\n\t" \ "push r27 " "\n\t" \ "push r26 " "\n\t" \ "push r0 " "\n\t" \ @@ -154,14 +151,8 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "breq call_playroutine " "\n\t" \ "sts cia_count+1, r27 " "\n\t" \ "sts cia_count, r26 " "\n\t" \ - "pop r1 " "\n\t" \ - "pop r0 " "\n\t" \ - "pop r26 " "\n\t" \ - "pop r27 " "\n\t" \ - "pop r18 " "\n\t" \ - "out __SREG__, r2 " "\n\t" \ - "pop r2 " "\n\t" \ - "reti " "\n\t" \ + "rjmp 2f " "\n\t" \ + \ "call_playroutine: " "\n\t" \ \ "lds r27, cia+1 " "\n\t" \ @@ -192,11 +183,12 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "pop r21 " "\n\t" \ "pop r20 " "\n\t" \ "pop r19 " "\n\t" \ - \ + "2: " "\n\t" \ "pop r1 " "\n\t" \ "pop r0 " "\n\t" \ "pop r26 " "\n\t" \ "pop r27 " "\n\t" \ + "3: " "\n\t" \ "pop r18 " "\n\t" \ "out __SREG__, r2 " "\n\t" \ "pop r2 " "\n\t" \ @@ -217,15 +209,12 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "push r2 " "\n\t" \ "in r2, __SREG__ " "\n\t" \ "push r18 " "\n\t" \ - "lds r18, half \n\t" \ - "com r18 \n\t" \ - "sts half, r18 \n\t" \ - "breq continue \n\t" \ - "pop r18 " "\n\t" \ - "out __SREG__, r2 " "\n\t" \ - "pop r2 " "\n\t" \ - "reti " "\n\t" \ - "continue: \n\t" \ + "lds r18, half " "\n\t" \ + "com r18 " "\n\t" \ + "sts half, r18 " "\n\t" \ + "breq 1f " "\n\t" \ + "rjmp 3f " "\n\t" \ + "1: " "\n\t" \ "push r27 " "\n\t" \ "push r26 " "\n\t" \ "push r0 " "\n\t" \ @@ -309,14 +298,8 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "breq call_playroutine " "\n\t" \ "sts cia_count+1, r27 " "\n\t" \ "sts cia_count, r26 " "\n\t" \ - "pop r1 " "\n\t" \ - "pop r0 " "\n\t" \ - "pop r26 " "\n\t" \ - "pop r27 " "\n\t" \ - "pop r18 " "\n\t" \ - "out __SREG__, r2 " "\n\t" \ - "pop r2 " "\n\t" \ - "reti " "\n\t" \ + "rjmp 2f " "\n\t" \ + \ "call_playroutine: " "\n\t" \ \ "lds r27, cia+1 " "\n\t" \ @@ -347,11 +330,12 @@ ISR(TIMER4_OVF_vect, ISR_NAKED) { \ "pop r21 " "\n\t" \ "pop r20 " "\n\t" \ "pop r19 " "\n\t" \ - \ + "2: " "\n\t" \ "pop r1 " "\n\t" \ "pop r0 " "\n\t" \ "pop r26 " "\n\t" \ "pop r27 " "\n\t" \ + "3: " "\n\t" \ "pop r18 " "\n\t" \ "out __SREG__, r2 " "\n\t" \ "pop r2 " "\n\t" \