Advertisement
Guest User

fg

a guest
Jan 6th, 2010
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  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 */
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement