rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
ports
cypress
serial_over_usb
usbconfig.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2013-2016, Cypress Semiconductor Corporation or a *
3
* subsidiary of Cypress Semiconductor Corporation. All rights reserved. *
4
* *
5
* This software, including source code, documentation and related *
6
* materials ("Software"), is owned by Cypress Semiconductor Corporation or *
7
* one of its subsidiaries ("Cypress") and is protected by and subject to *
8
* worldwide patent protection (United States and foreign), United States *
9
* copyright laws and international treaty provisions. Therefore, you may use *
10
* this Software only as provided in the license agreement accompanying the *
11
* software package from which you obtained this Software ("EULA"). *
12
* *
13
* If no EULA applies, Cypress hereby grants you a personal, non-exclusive, *
14
* non-transferable license to copy, modify, and compile the *
15
* Software source code solely for use in connection with Cypress's *
16
* integrated circuit products. Any reproduction, modification, translation, *
17
* compilation, or representation of this Software except as specified *
18
* above is prohibited without the express written permission of Cypress. *
19
* *
20
* Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO *
21
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, *
22
* BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED *
23
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
24
* PARTICULAR PURPOSE. Cypress reserves the right to make *
25
* changes to the Software without notice. Cypress does not assume any *
26
* liability arising out of the application or use of the Software or any *
27
* product or circuit described in the Software. Cypress does not *
28
* authorize its products for use in any products where a malfunction or *
29
* failure of the Cypress product may reasonably be expected to result in *
30
* significant property damage, injury or death ("High Risk Product"). By *
31
* including Cypress's product in a High Risk Product, the manufacturer *
32
* of such system or application assumes all risk of such use and in doing *
33
* so agrees to indemnify Cypress against all liability. *
34
*******************************************************************************/
35
/******************************************************************************/
36
/** \file usbconfig.h
37
**
38
** Part of FSEU USB Driver Module
39
**
40
** History:
41
** - 2012-07-17 2.0 MSc New Version for use with M3 L3 USB driver
42
** - 2012-10-02 2.1 MSc use of external interrupts without L3 implemented
43
** - 2012-01-31 2.2 MSc DMA settings added
44
** - 2013-06-04 2.3 MSc FM4 support added
45
** - 2013-09-23 2.4 MSc Version for PDL
46
*****************************************************************************/
47
48
#ifndef __USBCONFIG_H__
49
#define __USBCONFIG_H__
50
51
/*****************************************************************************/
52
/* Global pre-processor symbols/macros ('#define') */
53
/*****************************************************************************/
54
55
//-------- <<< Use Configuration Wizard in Context Menu>>> -----------------
56
// <h>USB Debug
57
// =======================
58
//
59
// <o>Use USB debug functionality via UART
60
// <0=> OFF
61
// <1=> ON
62
#ifndef USEUSBDBG
63
#define USEUSBDBG 0
64
#endif
65
66
// <o>Precompiler Warning Level
67
// <0=> no warnings
68
// <1=> hard warnings
69
// <2=> all warnings
70
#ifndef USBWARNLEVEL
71
#define USBWARNLEVEL 0
//0: no warnings, 1: hard warnings, 2: all warnings
72
#endif
73
// </h>
74
75
// <h>Use of Headerfiles
76
// =======================
77
//
78
// <o>Use usbdescriptors.h
79
// <0=> OFF
80
// <1=> ON
81
#ifndef USE_USBDESCRIPTORS_H
82
#define USE_USBDESCRIPTORS_H 1
//<- 1 use usbdescriptors.h file for USB descriptors settings, 0 for disabling
83
#endif
84
85
// <o>Use usbdevicehw.h
86
// <0=> OFF
87
// <1=> ON
88
#ifndef USE_USBDEVICEHW_H
89
#define USE_USBDEVICEHW_H 1
//<- 1 use usbdevicehw.h file for gpio settings, 0 for disabling
90
#endif
91
92
// <o>Use usbhosthw.h
93
// <0=> OFF
94
// <1=> ON
95
#ifndef USE_USBHOSTHW_H
96
#define USE_USBHOSTHW_H 1
//<- 1 use usbhosthw.h file for gpio settings, 0 for disabling
97
#endif
98
99
// <o>Use sbhostclassdrivertable.h
100
// <0=> OFF
101
// <1=> ON
102
#ifndef USE_USBHOSTCLASSDRIVERTABLE_H
103
#define USE_USBHOSTCLASSDRIVERTABLE_H 0
//<- 1 use usbhostclassdrivertable.h file
104
#endif
105
// </h>
106
107
// <h>Use USB within a low level library
108
// =======================
109
//
110
// <o>Use with L3 (old library for FM3 MCUs)
111
// <0=> OFF
112
// <1=> ON
113
#ifndef USB_USE_L3
114
#define USB_USE_L3 0
//<- 1 use as part of L3 library, 0 for using without L3 library
115
#endif
116
117
// <o>Use with PDL
118
// <0=> OFF
119
// <1=> ON
120
#define USB_USE_PDL 0
//<- 1 use as part of PDL library, 0 for using without PDL library
121
//</h>
122
123
124
#if (USB_USE_PDL == 0) && (USB_USE_L3 == 0)
125
/* START Middleware Modules */
126
127
/* DEVICE */
128
// <h>USB Device middleware modules
129
// =======================
130
//
131
// <o>USB Device CDC
132
// <0=> OFF
133
// <1=> ON
134
#ifndef USBDEVICECDCCOM_ENABLED
135
#define USBDEVICECDCCOM_ENABLED ON
//Middleware USB CDC Communication Class
136
#endif
137
138
// <o>USB Device HID (data communication)
139
// <0=> OFF
140
// <1=> ON
141
#ifndef USBDEVICEHIDCOM_ENABLED
142
#define USBDEVICEHIDCOM_ENABLED OFF
143
#endif
144
145
// <o>USB Device HID Joystick
146
// <0=> OFF
147
// <1=> ON
148
#ifndef USBDEVICEHIDJOYSTICK_ENABLED
149
#define USBDEVICEHIDJOYSTICK_ENABLED OFF
150
#endif
151
152
// <o>USB Device HID Keyboard
153
// <0=> OFF
154
// <1=> ON
155
#ifndef USBDEVICEHIDKEYBOARD_ENABLED
156
#define USBDEVICEHIDKEYBOARD_ENABLED OFF
157
#endif
158
159
// <o>USB Device HID Mouse
160
// <0=> OFF
161
// <1=> ON
162
#ifndef USBDEVICEHIDMOUSE_ENABLED
163
#define USBDEVICEHIDMOUSE_ENABLED OFF
164
#endif
165
166
// <o>USB Device LibUSB
167
// <0=> OFF
168
// <1=> ON
169
#ifndef USBDEVICELIBUSB_ENABLED
170
#define USBDEVICELIBUSB_ENABLED OFF
171
#endif
172
173
// <o>USB Device Printer
174
// <0=> OFF
175
// <1=> ON
176
#ifndef USBDEVICEPRINTER_ENABLED
177
#define USBDEVICEPRINTER_ENABLED OFF
178
#endif
179
180
// <o>USB Device Mass Storage
181
// <0=> OFF
182
// <1=> ON
183
#ifndef USBDEVICEMASSSTORAGE_ENABLED
184
#define USBDEVICEMASSSTORAGE_ENABLED OFF
185
#endif
186
//</h>
187
188
189
190
/* HOST */
191
// <h>USB Host middleware modules
192
// =======================
193
//
194
// <o>USB Host HID (Data communication)
195
// <0=> OFF
196
// <1=> ON
197
#ifndef USBHOSTHIDCOM_ENABLED
198
#define USBHOSTHIDCOM_ENABLED OFF
199
#endif
200
201
// <o>USB Host HID Keyboard
202
// <0=> OFF
203
// <1=> ON
204
#ifndef USBHOSTHIDKEYBOARD_ENABLED
205
#define USBHOSTHIDKEYBOARD_ENABLED OFF
/* [andreika] */
206
#endif
207
208
// <o>USB Host HID Mouse
209
// <0=> OFF
210
// <1=> ON
211
#ifndef USBHOSTHIDMOUSE_ENABLED
212
#define USBHOSTHIDMOUSE_ENABLED OFF
/* [andreika] */
213
#endif
214
215
// <o>USB Host Mass Storage
216
// <0=> OFF
217
// <1=> ON
218
#ifndef USBHOSTMASSSTORAGE_ENABLED
219
#define USBHOSTMASSSTORAGE_ENABLED OFF
/* [andreika] */
220
#endif
221
222
// <o>USB Host NDIS
223
// <0=> OFF
224
// <1=> ON
225
#ifndef USBHOSTNDIS_ENABLED
226
#define USBHOSTNDIS_ENABLED OFF
/* [andreika] */
227
#endif
228
229
// <o>USB Host Printer
230
// <0=> OFF
231
// <1=> ON
232
#ifndef USBHOSTPRINTER_ENABLED
233
#define USBHOSTPRINTER_ENABLED OFF
/* [andreika] */
234
#endif
235
//</h>
236
237
/* END Middleware Modules */
238
239
/* only used if USB is used without L3 or PDL*/
240
#define USB0_HOST_ENABLED 0
241
#define USB0_DEVICE_ENABLED 1
242
#define USB1_HOST_ENABLED 0
243
#define USB1_DEVICE_ENABLED 0
244
#define USB0_DEVICE_IRQ_ENABLED 1
245
#define USB0_HOST_IRQ_ENABLED 1
246
#define USB1_DEVICE_IRQ_ENABLED 1
247
#define USB1_HOST_IRQ_ENABLED 1
248
#define USB_USE_EXT_INT 0
249
#define IRQ_LEVEL_USB0 3
250
#define IRQ_LEVEL_USB1 3
251
#define USB_USES_DMA 0
252
#define USB_USES_DMA_0 1
253
#define USB_USES_DMA_1 1
254
#define USB_USES_DMA_2 0
255
#define USB_USES_DMA_3 0
256
#define USB_USES_DMA_4 0
257
#define USB_USES_DMA_5 0
258
#define USB_USES_DMA_6 0
259
#define USB_USES_DMA_7 0
260
261
#endif
//(USB_USE_PDL == 0) && (USB_USE_L3 == 0)
262
263
#endif
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8