musb_udc.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2009 Wind River Systems, Inc.
  3. * Tom Rix <Tom.Rix@windriver.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  18. * MA 02111-1307 USA
  19. */
  20. #ifndef __MUSB_UDC_H__
  21. #define __MUSB_UDC_H__
  22. #include <usbdevice.h>
  23. /* UDC level routines */
  24. void udc_irq(void);
  25. void udc_set_nak(int ep_num);
  26. void udc_unset_nak(int ep_num);
  27. int udc_endpoint_write(struct usb_endpoint_instance *endpoint);
  28. void udc_setup_ep(struct usb_device_instance *device, unsigned int id,
  29. struct usb_endpoint_instance *endpoint);
  30. void udc_connect(void);
  31. void udc_disconnect(void);
  32. void udc_enable(struct usb_device_instance *device);
  33. void udc_disable(void);
  34. void udc_startup_events(struct usb_device_instance *device);
  35. int udc_init(void);
  36. /* usbtty */
  37. #ifdef CONFIG_USB_TTY
  38. #define EP0_MAX_PACKET_SIZE 64 /* MUSB_EP0_FIFOSIZE */
  39. #define UDC_INT_ENDPOINT 1
  40. #define UDC_INT_PACKET_SIZE 64
  41. #define UDC_OUT_ENDPOINT 2
  42. #define UDC_OUT_PACKET_SIZE 64
  43. #define UDC_IN_ENDPOINT 3
  44. #define UDC_IN_PACKET_SIZE 64
  45. #define UDC_BULK_PACKET_SIZE 64
  46. #endif /* CONFIG_USB_TTY */
  47. #endif /* __MUSB_UDC_H__ */