1 /*******************************************************************************
2  * Copyright 2019-2020 Microchip FPGA Embedded Systems Solutions.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22  * IN THE SOFTWARE.
23  *
24  * PolarFire SoC MSS USB Driver Stack
25  *
26  * MSS USB Driver stack configuration parameters.
27  * User must choose the constant definitions in this file to select the mode of
28  * operation.
29  * The constants defined in this file are used by MSS USB driver stack to
30  * function as per configuration.
31  *
32  */
33 
34 #ifndef __MSS_USB_CONFIG_H_
35 #define __MSS_USB_CONFIG_H_
36 
37 #include "mpfs_hal/mss_hal.h"
38 
39 /*-------------------------------------------------------------------------*//**
40   Definitions Internally generated for use in the Core and logical layer.
41 */
42 #ifdef MSS_USB_OTG_DUAL_ROLE_MODE
43     #define MSS_USB_HOST_ENABLED
44     #define MSS_USB_DEVICE_ENABLED
45     #define MSS_USB_OTG_SRP_ENABLED
46     #define MSS_USB_OTG_HNP_ENABLED
47 #endif
48 
49 #ifdef MSS_USB_OTG_PERIPHERAL_MODE
50     #define MSS_USB_DEVICE_ENABLED
51     #define MSS_USB_OTG_SRP_ENABLED
52 #endif
53 
54 #ifdef MSS_USB_PERIPHERAL_MODE
55     #define MSS_USB_DEVICE_ENABLED
56     #define MSS_USB_DEVICE_PRINTER
57 #endif
58 
59 #ifdef MSS_USB_OTG_HOST_MODE
60     #define MSS_USB_HOST_ENABLED
61     #define MSS_USB_OTG_SRP_ENABLED
62 #endif
63 
64 #endif  /* __MSS_USB_CONFIG_H_ */
65