]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - fx2lafw.c
Update fx2lafw code to work with recent sdcc.
[sigrok-firmware-fx2lafw.git] / fx2lafw.c
index ef28431f13c6dff1dab1008fa82a1f32ff5c261e..7fe952843a6c165ef33d6ccd363bf95b77a8c719 100644 (file)
--- a/fx2lafw.c
+++ b/fx2lafw.c
@@ -50,7 +50,7 @@
 #include <gpif-acquisition.h>
 
 /* ... */
-volatile bit got_sud;
+volatile __bit got_sud;
 BYTE vendor_command;
 
 static void setup_endpoints(void)
@@ -194,24 +194,24 @@ 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();
 }
 
-void sof_isr(void) interrupt SOF_ISR using 1
+void sof_isr(void) __interrupt SOF_ISR __using 1
 {
        CLEAR_SOF();
 }
 
-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();
@@ -261,7 +261,7 @@ void fx2lafw_poll(void)
                        if ((EP0CS & bmEPBUSY) != 0)
                                break;
 
-                       if (EP0BCL == 2) {
+                       if (EP0BCL == sizeof(struct cmd_start_acquisition)) {
                                gpif_acquisition_start(
                                 (const struct cmd_start_acquisition *)EP0BUF);
                        }