Mistake on this page?
Report an issue in GitHub or email us
USBPhyTypes.h
1 /*
2  * Copyright (c) 2018-2019, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef USBPHY_TYPES_H
19 #define USBPHY_TYPES_H
20 
21 #include <stdint.h>
22 
23 typedef uint8_t usb_ep_t;
24 
25 typedef enum {
26  USB_EP_TYPE_CTRL = 0,
27  USB_EP_TYPE_ISO = 1,
28  USB_EP_TYPE_BULK = 2,
29  USB_EP_TYPE_INT = 3
30 } usb_ep_type_t;
31 
32 enum {
33  USB_EP_ATTR_ALLOW_CTRL = 1 << USB_EP_TYPE_CTRL,
34  USB_EP_ATTR_ALLOW_BULK = 1 << USB_EP_TYPE_BULK,
35  USB_EP_ATTR_ALLOW_INT = 1 << USB_EP_TYPE_INT,
36  USB_EP_ATTR_ALLOW_ISO = 1 << USB_EP_TYPE_ISO,
37  USB_EP_ATTR_ALLOW_ALL = USB_EP_ATTR_ALLOW_CTRL | USB_EP_ATTR_ALLOW_BULK |
38  USB_EP_ATTR_ALLOW_INT | USB_EP_ATTR_ALLOW_ISO,
39 
40  USB_EP_ATTR_DIR_IN = 0 << 4,
41  USB_EP_ATTR_DIR_OUT = 1 << 4,
42  USB_EP_ATTR_DIR_IN_OR_OUT = 2 << 4,
43  USB_EP_ATTR_DIR_IN_AND_OUT = 3 << 4,
44  USB_EP_ATTR_DIR_MASK = 3 << 4
45 };
46 typedef uint8_t usb_ep_attr_t;
47 
49  usb_ep_attr_t attributes;
50  uint8_t byte_cost;
51  uint16_t base_cost;
52 };
53 
55  uint32_t resources;
56  usb_ep_entry_t table[16];
57 };
58 
59 #endif
Definition: USBPhyTypes.h:48
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.