Tom Rix | 09c82bc | 2009-10-31 12:37:41 -0500 | [diff] [blame] | 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 | |
| 23 | #include <usbdevice.h> |
| 24 | |
| 25 | /* UDC level routines */ |
| 26 | void udc_irq(void); |
| 27 | void udc_set_nak(int ep_num); |
| 28 | void udc_unset_nak(int ep_num); |
| 29 | int udc_endpoint_write(struct usb_endpoint_instance *endpoint); |
| 30 | void udc_setup_ep(struct usb_device_instance *device, unsigned int id, |
| 31 | struct usb_endpoint_instance *endpoint); |
| 32 | void udc_connect(void); |
| 33 | void udc_disconnect(void); |
| 34 | void udc_enable(struct usb_device_instance *device); |
| 35 | void udc_disable(void); |
| 36 | void udc_startup_events(struct usb_device_instance *device); |
| 37 | int udc_init(void); |
| 38 | |
| 39 | /* usbtty */ |
| 40 | #ifdef CONFIG_USB_TTY |
| 41 | |
| 42 | #define EP0_MAX_PACKET_SIZE 64 /* MUSB_EP0_FIFOSIZE */ |
| 43 | #define UDC_INT_ENDPOINT 1 |
| 44 | #define UDC_INT_PACKET_SIZE 64 |
| 45 | #define UDC_OUT_ENDPOINT 2 |
| 46 | #define UDC_OUT_PACKET_SIZE 64 |
| 47 | #define UDC_IN_ENDPOINT 3 |
| 48 | #define UDC_IN_PACKET_SIZE 64 |
| 49 | #define UDC_BULK_PACKET_SIZE 64 |
| 50 | |
| 51 | #endif /* CONFIG_USB_TTY */ |
| 52 | |
| 53 | #endif /* __MUSB_UDC_H__ */ |