diff options
author | Marcus Müller <marcus.mueller@ettus.com> | 2017-01-16 15:54:57 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-06-29 15:53:15 -0700 |
commit | d9bcf00f69313b6dd42346d6af340a1a9874ba9f (patch) | |
tree | 62185d7ea2c20952d60cf8f6a558866ecf1d54bf /firmware/fx2/common/usb_common.c | |
parent | c77bd0c46a598d5e69b179d76a3df6091e982129 (diff) | |
download | uhd-d9bcf00f69313b6dd42346d6af340a1a9874ba9f.tar.gz uhd-d9bcf00f69313b6dd42346d6af340a1a9874ba9f.tar.bz2 uhd-d9bcf00f69313b6dd42346d6af340a1a9874ba9f.zip |
made FX2 EEPROMS and firmware build with modern SDCC 3.6
Diffstat (limited to 'firmware/fx2/common/usb_common.c')
-rw-r--r-- | firmware/fx2/common/usb_common.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/firmware/fx2/common/usb_common.c b/firmware/fx2/common/usb_common.c index 3b0547b2f..6a7a1038a 100644 --- a/firmware/fx2/common/usb_common.c +++ b/firmware/fx2/common/usb_common.c @@ -28,12 +28,12 @@ #include "usb_descriptors.h" #include "usb_requests.h" -extern xdata char str0[]; -extern xdata char str1[]; -extern xdata char str2[]; -extern xdata char str3[]; -extern xdata char str4[]; -extern xdata char str5[]; +extern __xdata char str0[]; +extern __xdata char str1[]; +extern __xdata char str2[]; +extern __xdata char str3[]; +extern __xdata char str4[]; +extern __xdata char str5[]; #define bRequestType SETUPDAT[0] @@ -48,15 +48,15 @@ extern xdata char str5[]; #define MSB(x) (((unsigned short) x) >> 8) #define LSB(x) (((unsigned short) x) & 0xff) -volatile bit _usb_got_SUDAV; +volatile __bit _usb_got_SUDAV; unsigned char _usb_config = 0; unsigned char _usb_alt_setting = 0; // FIXME really 1/interface -xdata unsigned char *current_device_descr; -xdata unsigned char *current_devqual_descr; -xdata unsigned char *current_config_descr; -xdata unsigned char *other_config_descr; +__xdata unsigned char *current_device_descr; +__xdata unsigned char *current_devqual_descr; +__xdata unsigned char *current_config_descr; +__xdata unsigned char *other_config_descr; static void setup_descriptors (void) @@ -81,21 +81,21 @@ setup_descriptors (void) } static void -isr_SUDAV (void) interrupt +isr_SUDAV (void) __interrupt { clear_usb_irq (); _usb_got_SUDAV = 1; } static void -isr_USBRESET (void) interrupt +isr_USBRESET (void) __interrupt { clear_usb_irq (); setup_descriptors (); } static void -isr_HIGHSPEED (void) interrupt +isr_HIGHSPEED (void) __interrupt { clear_usb_irq (); setup_descriptors (); @@ -133,7 +133,7 @@ plausible_endpoint (unsigned char ep) // return pointer to control and status register for endpoint. // only called with plausible_endpoints -xdata volatile unsigned char * +__xdata volatile unsigned char * epcs (unsigned char ep) { if (ep == 0x01) // ep1 has different in and out CS regs @@ -234,7 +234,7 @@ usb_handle_setup_packet (void) if (wValueL >= nstring_descriptors) fx2_stall_ep0 (); else { - xdata char *p = string_descriptors[wValueL]; + __xdata char *p = string_descriptors[wValueL]; SUDPTRH = MSB (p); SUDPTRL = LSB (p); } |