diff options
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); } |