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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Tom Rix | 09c82bc | 2009-10-31 12:37:41 -0500 | [diff] [blame] | 6 | */ |
| 7 | #ifndef __MUSB_UDC_H__ |
| 8 | #define __MUSB_UDC_H__ |
| 9 | |
| 10 | #include <usbdevice.h> |
| 11 | |
| 12 | /* UDC level routines */ |
| 13 | void udc_irq(void); |
| 14 | void udc_set_nak(int ep_num); |
| 15 | void udc_unset_nak(int ep_num); |
| 16 | int udc_endpoint_write(struct usb_endpoint_instance *endpoint); |
| 17 | void udc_setup_ep(struct usb_device_instance *device, unsigned int id, |
| 18 | struct usb_endpoint_instance *endpoint); |
| 19 | void udc_connect(void); |
| 20 | void udc_disconnect(void); |
| 21 | void udc_enable(struct usb_device_instance *device); |
| 22 | void udc_disable(void); |
| 23 | void udc_startup_events(struct usb_device_instance *device); |
| 24 | int udc_init(void); |
| 25 | |
| 26 | /* usbtty */ |
| 27 | #ifdef CONFIG_USB_TTY |
| 28 | |
| 29 | #define EP0_MAX_PACKET_SIZE 64 /* MUSB_EP0_FIFOSIZE */ |
| 30 | #define UDC_INT_ENDPOINT 1 |
| 31 | #define UDC_INT_PACKET_SIZE 64 |
| 32 | #define UDC_OUT_ENDPOINT 2 |
| 33 | #define UDC_OUT_PACKET_SIZE 64 |
| 34 | #define UDC_IN_ENDPOINT 3 |
| 35 | #define UDC_IN_PACKET_SIZE 64 |
| 36 | #define UDC_BULK_PACKET_SIZE 64 |
| 37 | |
| 38 | #endif /* CONFIG_USB_TTY */ |
| 39 | |
| 40 | #endif /* __MUSB_UDC_H__ */ |