From: Matthew Cengia Date: Tue, 15 Aug 2023 00:39:32 +0000 (+1000) Subject: fx2lafw: Update __interrupt syntax for sdcc>=4.2.3 X-Git-Url: http://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=commitdiff_plain;h=3e08500d22f87f69941b65cf8b8c1b85f9b41173 fx2lafw: Update __interrupt syntax for sdcc>=4.2.3 The SDCC user manual https://sdcc.sourceforge.net/doc/sdccman.pdf section 1.5 "Compatibility with previous versions" on page 11 states: > In 4.2.3, support for non-parenthesized arguments to __using and > __interrupt was dropped. Adjust the sigrok fx2lafw application source to unbreak compilation with more recent SDCC versions. --- diff --git a/fx2lafw.c b/fx2lafw.c index 1035713d..42129219 100644 --- a/fx2lafw.c +++ b/fx2lafw.c @@ -191,14 +191,14 @@ BOOL handle_set_configuration(BYTE cfg) return (cfg == 1) ? TRUE : FALSE; } -void sudav_isr(void) __interrupt SUDAV_ISR +void sudav_isr(void) __interrupt(SUDAV_ISR) { got_sud = TRUE; CLEAR_SUDAV(); } /* IN BULK NAK - the host started requesting data. */ -void ibn_isr(void) __interrupt IBN_ISR +void ibn_isr(void) __interrupt(IBN_ISR) { /* * If the IBN interrupt is not disabled, clearing @@ -229,19 +229,19 @@ void ibn_isr(void) __interrupt IBN_ISR SYNCDELAY(); } -void usbreset_isr(void) __interrupt USBRESET_ISR +void usbreset_isr(void) __interrupt(USBRESET_ISR) { handle_hispeed(FALSE); CLEAR_USBRESET(); } -void hispeed_isr(void) __interrupt HISPEED_ISR +void hispeed_isr(void) __interrupt(HISPEED_ISR) { handle_hispeed(TRUE); CLEAR_HISPEED(); } -void timer2_isr(void) __interrupt TF2_ISR +void timer2_isr(void) __interrupt(TF2_ISR) { /* Blink LED during acquisition, keep it on otherwise. */ if (gpif_acquiring == RUNNING) { diff --git a/include/scope.inc b/include/scope.inc index 96422f1b..c6990853 100644 --- a/include/scope.inc +++ b/include/scope.inc @@ -43,36 +43,36 @@ static volatile __bit dosuspend = FALSE; extern __code BYTE highspd_dscr; extern __code BYTE fullspd_dscr; -void resume_isr(void) __interrupt RESUME_ISR +void resume_isr(void) __interrupt(RESUME_ISR) { CLEAR_RESUME(); } -void sudav_isr(void) __interrupt SUDAV_ISR +void sudav_isr(void) __interrupt(SUDAV_ISR) { dosud = TRUE; CLEAR_SUDAV(); } -void usbreset_isr(void) __interrupt USBRESET_ISR +void usbreset_isr(void) __interrupt(USBRESET_ISR) { handle_hispeed(FALSE); CLEAR_USBRESET(); } -void hispeed_isr(void) __interrupt HISPEED_ISR +void hispeed_isr(void) __interrupt(HISPEED_ISR) { handle_hispeed(TRUE); CLEAR_HISPEED(); } -void suspend_isr(void) __interrupt SUSPEND_ISR +void suspend_isr(void) __interrupt(SUSPEND_ISR) { dosuspend = TRUE; CLEAR_SUSPEND(); } -void timer2_isr(void) __interrupt TF2_ISR +void timer2_isr(void) __interrupt(TF2_ISR) { /* Toggle the probe calibration pin, only accurate up to ca. 8MHz. */ TOGGLE_CALIBRATION_PIN();