Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

fg

By: a guest on Jan 6th, 2010  |  syntax: None  |  size: 0.88 KB  |  hits: 138  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: firmware/target/arm/usb-s3c6400x.c
  2. ===================================================================
  3. --- firmware/target/arm/usb-s3c6400x.c  (revision 24144)
  4. +++ firmware/target/arm/usb-s3c6400x.c  (working copy)
  5.  -51,6 +51,9 @@
  6.  static struct ep_type endpoints[5];
  7.  static struct usb_ctrlrequest ctrlreq USB_DEVBSS_ATTR;
  8.  
  9. +static unsigned char dummy_data[32] USB_DEVBSS_ATTR;
  10. +
  11. +
  12.  int usb_drv_port_speed(void)
  13.  {
  14.      return (DSTS & 2) == 0 ? 1 : 0;
  15.  -271,6 +274,7 @@
  16.  
  17.  void ep_send(int ep, void *ptr, int length)
  18.  {
  19. +    if(ptr==NULL) ptr = dummy_data;
  20.      endpoints[ep].busy = true;
  21.      endpoints[ep].size = length;
  22.      DIEPCTL(ep) |= 0x8000;  /* EPx OUT ACTIVE */
  23.  -285,6 +289,7 @@
  24.  
  25.  void ep_recv(int ep, void *ptr, int length)
  26.  {
  27. +    if(ptr==NULL) ptr = dummy_data;
  28.      endpoints[ep].busy = true;
  29.      endpoints[ep].size = length;
  30.      DOEPCTL(ep) &= ~0x20000;  /* EPx UNSTALL */